iancmcc/ouimeaux

Maker has no attribute - Version 0.7.9

Closed this issue · 4 comments

I am not a Linux or python guy -so I am open to the fact I may be doing something wrong.

simply command wemo status generates error when reaching a maker

root@raspberrypi:/home/pi/WEMO# wemo status
Switch: Front Porch 0
Traceback (most recent call last):
File "/usr/local/bin/wemo", line 9, in
load_entry_point('ouimeaux==0.7.9-r0', 'console_scripts', 'wemo')()
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/cli.py", line 361, in wemo
args.func(args)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/cli.py", line 260, in status
scan(args, on_switch, on_motion, on_bridge, on_maker)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/cli.py", line 29, in scan
env.start()
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/environment.py", line 82, in start
self._process_device(dev, cache=False)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/environment.py", line 184, in _process_device
callback(device)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/cli.py", line 238, in on_maker
if maker.switch_mode:
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/device/maker.py", line 54, in switch_mode
return self.maker_attribs['switchmode']
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/device/maker.py", line 32, in maker_attribs
makerresp = self.deviceevent.GetAttributes().get('attributeList')
AttributeError: 'Maker' object has no attribute 'deviceevent'

via python

print env.get_maker(env.list_makers()[1])
<WeMo Maker "Garage Door - Small">
print env.get_maker(env.list_makers()[1]).sensor_state
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/device/maker.py", line 50, in sensor_state
return self.maker_attribs['sensorstate']
File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.9_r0-py2.7.egg/ouimeaux/device/maker.py", line 32, in maker_attribs
makerresp = self.deviceevent.GetAttributes().get('attributeList')
AttributeError: 'Maker' object has no attribute 'deviceevent'

On a separate note, I believe the maker device should support the toggle() function as is coded for the switch.

Nope, that's legitimate! In order to support the new firmware, that service was removed. We'll certainly have to fix it.

You're right, the Maker should have toggle().

Made issue #85 for Maker.toggle().

Commenting out the following line in /devices/init.py restored the Maker attributes and removed the error.
if svcname != "deviceevent":

I am a newbie to this also, but it appears that the maker does not produce any sensor signals or events. Is this a known issue?