Skip to content
Snippets Groups Projects
Commit 23a73e15 authored by jkerdreu's avatar jkerdreu
Browse files

- SYNC old stuff


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2994 b32b6428-25c9-4566-ad07-03861ab6144f
parent 485b3369
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,10 @@ SCEN = UUID(['00796898-20bb-11e9-b352-a4badbf92500','00796898-20bb-11e9-b352-a4 ...@@ -33,6 +33,10 @@ SCEN = UUID(['00796898-20bb-11e9-b352-a4badbf92500','00796898-20bb-11e9-b352-a4
BTN_LUM = UUID(['ee220704-e54d-11eb-9dbb-a4badbf92500','ee249546-e54d-11eb-9dbb-a4badbf92500','ee25b43a-e54d-11eb-9dbb-a4badbf92500','ee25238a-e54d-11eb-9dbb-a4badbf92500','ee22bfaa-e54d-11eb-9dbb-a4badbf92500' ]) BTN_LUM = UUID(['ee220704-e54d-11eb-9dbb-a4badbf92500','ee249546-e54d-11eb-9dbb-a4badbf92500','ee25b43a-e54d-11eb-9dbb-a4badbf92500','ee25238a-e54d-11eb-9dbb-a4badbf92500','ee22bfaa-e54d-11eb-9dbb-a4badbf92500' ])
BTN_SHUT = UUID(['ee23caee-e54d-11eb-9dbb-a4badbf92500','ee23caee-e54d-11eb-9dbb-a4badbf92501','ee23caee-e54d-11eb-9dbb-a4badbf92502' ]) BTN_SHUT = UUID(['ee23caee-e54d-11eb-9dbb-a4badbf92500','ee23caee-e54d-11eb-9dbb-a4badbf92501','ee23caee-e54d-11eb-9dbb-a4badbf92502' ])
BTN_SCREEN = UUID(['ee22bfaa-e54d-11eb-9dbb-a4badbf92501',])
SCREEN_POWER = UUID(['2d42a742-aa2f-11e9-ac3b-a4badbf92501',])
# Edisio bureau # Edisio bureau
#BTNS = ['c4b33536-c314-11e8-a5d6-000673742b01','c4b33536-c314-11e8-a5d6-000673742b03','c4b33536-c314-11e8-a5d6-000673742b05', #BTNS = ['c4b33536-c314-11e8-a5d6-000673742b01','c4b33536-c314-11e8-a5d6-000673742b03','c4b33536-c314-11e8-a5d6-000673742b05',
# 'c4b33536-c314-11e8-a5d6-000673742b07','c4b33536-c314-11e8-a5d6-000673742b08'] # 'c4b33536-c314-11e8-a5d6-000673742b07','c4b33536-c314-11e8-a5d6-000673742b08']
...@@ -109,6 +113,7 @@ def handle_msg(msg): ...@@ -109,6 +113,7 @@ def handle_msg(msg):
if msg.source == SCEN[0]: if msg.source == SCEN[0]:
# "soirée TV" # "soirée TV"
send(SCREEN_POWER,'turn_on')
send([SHUTERS[0]],'down') send([SHUTERS[0]],'down')
send(LAMPS,'turn_off') send(LAMPS,'turn_off')
send(SPOTS+AMBI,'turn_on') send(SPOTS+AMBI,'turn_on')
...@@ -157,6 +162,18 @@ def handle_msg(msg): ...@@ -157,6 +162,18 @@ def handle_msg(msg):
if msg.source == BTN_SHUT[2]: if msg.source == BTN_SHUT[2]:
send(SHUTERS,'stop') send(SHUTERS,'stop')
# ======= TV
if msg.source in BTN_SCREEN:
tv = mon.devices.get_with_addr(SCREEN_POWER[0])
if tv:
state = tv.attributes.get('power',None)
if state == True:
send(SCREEN_POWER,'turn_off')
elif state == False:
send(SCREEN_POWER,'turn_on')
else:
print('Unkown state for main screen')
if msg.action == 'double_click': if msg.action == 'double_click':
if msg.source in AQUARA: if msg.source in AQUARA:
send([SHUTERS[0],],'stop') send([SHUTERS[0],],'stop')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment