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

0.7 migration

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2384 b32b6428-25c9-4566-ad07-03861ab6144f
parent a032f094
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ class GW(gevent.Greenlet):
if not cfg:
cfg= tools.new_cfg(PACKAGE_NAME)
cfg['config']['port'] = '/dev/ttyUSB0'
cfg['config']['base_addr'] = tools.get_random_uuid()[0:-10]
cfg['config']['base_addr'] = str(tools.get_random_base_uuid())
logger.warn("Created an empty config file")
cfg.write()
self.cfg = cfg
......@@ -55,7 +55,8 @@ class GW(gevent.Greenlet):
def setup_gw(self):
# last step build the GW device
addr = self.cfg['config'].get('addr',None)
tmp = self.cfg['config'].get('addr',None)
addr = tools.get_uuid(tmp)
gw = devices.gateway(addr)
gw.vendor_id = "IHSEV"
gw.product_id = "Edisio Gateway"
......@@ -125,7 +126,8 @@ class GW(gevent.Greenlet):
l = []
addr_list = []
for i in range(0,8):
btn = Device('button.basic',base_addr+addr+'%02d'%(i+1))
tmp = tools.get_uuid( base_addr+addr+'%02d'%(i+1) )
btn = Device('button.basic',tmp)
btn.vendor_id = 'Edisio'
btn.product_id = 'Edision Switches'
btn.hw_id = 'Btn:%s/%s' % (addr,i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment