Closed Dominion0815 closed 6 years ago
What DECT devices do you use?
Can you please send the output of the following command from the pyfritzhome module:
frithome -f <YOUR-FRITZ-BOX-IP> -u <YOUR-USERNAME> -p <YOUR-PASSWORD> -v list
and also check your installed version of pyfritzhome with:
pip show fritzhome
can you please send the output of the following command from the pyfritzhome module:
frithome -f <YOUR-FRITZ-BOX-IP> -u <YOUR-USERNAME> -p <YOUR-PASSWORD> -v list
and also check your installed version of pyfritzhome with:
pip show fritzhome
my version is 0.3.3 but I used the one in "deps" folder. I tried this workaround and it works for now with Comet DECT
.homeassistant/deps/lib/python3.6/site-packages/pyfritzhome/fritzhome.py
27 def get_node_value(node, name):
28 try:
29 return get_text(node.getElementsByTagName(name)[0].childNodes)
30 except:
31 return "0"
As you mentioned it is a workaround for you. Could you please provide the info I requested above to find a real fix.
% pip3 show pyfritzhome :(
Name: pyfritzhome
Version: 0.3.3
Summary: Fritz!Box Smarthome Python Library
Home-page: http://github.com/hthiery/python-fritzhome
Author: Heiko Thiery
Author-email: heiko.thiery@gmail.com
License: LGPLv2+
Location: /usr/lib/python3.6/site-packages
Requires: requests
DEBUG:pyfritzhome.fritzhome:<device functionbitmask="896" fwversion="03.59" id="16" identifier="08761 0373130" manufacturer="AVM" productname="FRITZ!DECT 200">
<present>1</present>
<name>FRITZ!DECT 200 #1</name>
<switch>
<state>1</state>
<mode>manuell</mode>
<lock>1</lock>
</switch>
<powermeter>
<power>114580</power>
<energy>87830</energy>
</powermeter>
<temperature>
<celsius>220</celsius>
<offset>0</offset>
</temperature>
</device>
INFO:pyfritzhome.fritzhome:logout
Traceback (most recent call last):
File "/usr/bin/fritzhome", line 11, in <module>
load_entry_point('pyfritzhome==0.3.3', 'console_scripts', 'fritzhome')()
File "/usr/lib/python3.6/site-packages/pyfritzhome/cli.py", line 153, in main
args.func(fritzbox, args)
File "/usr/lib/python3.6/site-packages/pyfritzhome/cli.py", line 12, in list_all
devices = fritz.get_devices()
File "/usr/lib/python3.6/site-packages/pyfritzhome/fritzhome.py", line 133, in get_devices
device = FritzhomeDevice(self, node=element)
File "/usr/lib/python3.6/site-packages/pyfritzhome/fritzhome.py", line 239, in __init__
self._update_from_node(node)
File "/usr/lib/python3.6/site-packages/pyfritzhome/fritzhome.py", line 272, in _update_from_node
self.device_lock = bool(get_node_value(n, 'devicelock'))
File "/usr/lib/python3.6/site-packages/pyfritzhome/fritzhome.py", line 28, in get_node_value
return get_text(node.getElementsByTagName(name)[0].childNodes)
IndexError: list index out of range
Thank you. Now it seems to be a little bit clearer ... I guess that an older firmware of the fritzbox does not show the devicelock
state in the device node. So I will do only add this in case of value present. I think about what values are really needed.
<device identifier="08761 0000434" id="17" functionbitmask="896" fwversion="03.33" manufacturer="AVM" productname="FRITZ!DECT 200">
<present>1</present>
<name>Steckdose</name>
<switch>
<state>1</state>
<mode>auto</mode>
<lock>0</lock>
<devicelock>0</devicelock>
</switch>
<powermeter>
<power>0</power>
<energy>707</energy>
</powermeter>
<temperature>
<celsius>285</celsius>
<offset>0</offset>
</temperature>
</device>
I opened an issue on the pyfritzhome module
Hi,
I have a problem with fritz 6490 Cable and OS version 6.51, a newer one is not possbile because of provider. Also I'am not able to use a smarthome user, only admin user works with other HomeAssistant components.
Thanks in advanced.
Error Message in Home Assistant:
greetz, Dominion