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

Added stuff


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2840 b32b6428-25c9-4566-ad07-03861ab6144f
parent af767e99
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,9 @@ SDB = UUID(['fb1f8648-20ba-11e9-b352-a4badbf92500','fb1f8648-20ba-11e9-b352-a4
SCEN = UUID(['00796898-20bb-11e9-b352-a4badbf92500','00796898-20bb-11e9-b352-a4badbf92501','00796898-20bb-11e9-b352-a4badbf92502'])
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' ])
# Edisio bureau
#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']
......@@ -47,6 +50,7 @@ mon = None
def send(targets,action,body=None):
global mon
engine = mon.dev.engine
print(f"{targets} {action}")
engine.send_request(dev,targets,action,body)
def search_for_light(lamps):
......@@ -122,7 +126,37 @@ def handle_msg(msg):
send([SHUTERS[0]],'stop')
send([SHUTERS[1]],'stop')
send(SIRENS,'stop')
# ========= Commande éclairage séparé =====
if msg.source == BTN_LUM[0]:
on_off_light([LAMPS[0]])
if msg.source == BTN_LUM[1]:
on_off_light([LAMPS[1]])
if msg.source == BTN_LUM[2]:
on_off_light([LAMPS[2]])
if msg.source == BTN_LUM[3]:
on_off_light([LAMPS[4]])
if msg.source == BTN_LUM[4]:
on_off_light([LAMPS[5]])
# ======== Commandes des volets =========
if msg.source == BTN_SHUT[0]:
send(SHUTERS,'up')
if msg.source == BTN_SHUT[1]:
send(SHUTERS,'down')
if msg.source == BTN_SHUT[2]:
send(SHUTERS,'stop')
if msg.action == 'double_click':
if msg.source in AQUARA:
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