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

Use static group_id for HA.


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2971 b32b6428-25c9-4566-ad07-03861ab6144f
parent d8d916ba
Branches
No related tags found
No related merge requests found
......@@ -12,11 +12,6 @@ import time
PACKAGE_NAME = "xaal.edisio"
logger = logging.getLogger(PACKAGE_NAME)
def hex_to_str(data):
r = ""
for k in data:
r = r + '%02x ' % k
return r
def addr_to_str(addr):
r = ""
......@@ -120,12 +115,12 @@ class GW(gevent.Greenlet):
dev.send_notification('click')
def add_buttons(self, addr):
base_addr = self.cfg['config'].get('base_addr')
group_id = tools.get_random_uuid()
base_addr = tools.get_uuid(self.cfg['config'].get('base_addr'))
group_id = base_addr + (int(addr, 16) << 8) + 0xff
l = []
addr_list = []
for i in range(0, 8):
tmp = tools.get_uuid( base_addr+addr+'%02d'%(i+1) )
tmp = base_addr + (int(addr, 16) << 8) + (i + 1)
btn = Device('button.basic',tmp)
btn.vendor_id = 'Edisio'
btn.product_id = 'Edision Switches'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment