Uncomment the os actions
This commit is contained in:
parent
6808e1222c
commit
a2d0cc09ed
|
|
@ -37,13 +37,13 @@ def on_message(client, userdata, message):
|
||||||
elif message.payload.decode('UTF-8') == 'display_on':
|
elif message.payload.decode('UTF-8') == 'display_on':
|
||||||
if monitor_state == 0:
|
if monitor_state == 0:
|
||||||
monitor_state = 1
|
monitor_state = 1
|
||||||
# os.system("/home/pi/display_on.sh")
|
os.system("/home/pi/display_on.sh")
|
||||||
print("display on")
|
print("display on")
|
||||||
|
|
||||||
elif message.payload.decode('UTF-8') == 'display_off':
|
elif message.payload.decode('UTF-8') == 'display_off':
|
||||||
if monitor_state == 1:
|
if monitor_state == 1:
|
||||||
monitor_state = 0
|
monitor_state = 0
|
||||||
# os.system("/home/pi/display_off.sh")
|
os.system("/home/pi/display_off.sh")
|
||||||
print("display off")
|
print("display off")
|
||||||
|
|
||||||
def on_publish(client, userdata, mid, reason_codes, properties):
|
def on_publish(client, userdata, mid, reason_codes, properties):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue