Python Forum
tkinter toggle buttons not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter toggle buttons not working
#10
Let me see what I can find for this. I am using tasmota to control a Sonoff relay and a basic ESP8266 relay. https://tasmota.github.io/docs/Commands/

I am looking at some commands like this:
r = requests.get('http://192.168.0.101/control?cmnd=Status,gpio,14')
print(r.status_code)
It just returns a code 404 which seems to be like a "No Response". So for this I was trying to check the status of the LED that is onboard the Relay. Not much luck here so far.

I was also trying to figure out how to put space between the buttons. I tried using "padx=20", but it seems to ignore it.
def main():
    app = tk.Tk()
    buttons = [
        new_button('living_room', "http://192.168.0.101/", app, grid=(0, 0), padx=20),
        new_button('front_porch', "http://192.168.0.113/", app, grid=(0, 1), padx=20)
    ]
Reply


Messages In This Thread
tkinter toggle buttons not working - by Nu2Python - Jan-15-2022, 05:17 AM
RE: tkinter toggle buttons not working - by Yoriz - Jan-15-2022, 02:39 PM
RE: tkinter toggle buttons not working - by Nu2Python - Jan-16-2022, 02:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Tkinter inside function not working Ensaimadeta 5 5,413 Dec-03-2023, 01:50 PM
Last Post: deanhystad
  [Tkinter] Radio Buttons Working Bassackwards gw1500se 6 2,458 Dec-07-2021, 07:13 PM
Last Post: menator01
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 5,312 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  TkInter Binding Buttons ifigazsi 5 5,032 Apr-06-2020, 08:30 AM
Last Post: ifigazsi
  python file(.py) not working with my tkinter project DeanAseraf1 9 7,537 Mar-22-2020, 10:58 PM
Last Post: ifigazsi
  Tkinter scaling windows conten to or with its size not working Detzi 5 4,700 Jan-12-2020, 12:42 PM
Last Post: Detzi
  Issue on tkinter with buttons Reldaing 1 2,529 Jan-07-2020, 08:21 AM
Last Post: berckut72
  Need tkinter help with clicking buttons pythonprogrammer 2 2,567 Jan-03-2020, 04:43 AM
Last Post: joe_momma
  [Tkinter] Mouse click event not working on multiple tkinter window evrydaywannabe 2 3,911 Dec-16-2019, 04:47 AM
Last Post: woooee
  Tkinter Buttons action d3fi 1 2,083 Nov-20-2019, 09:16 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020