python-openzwave
python-openzwave copied to clipboard
set_switch() not working on gen5 (Model ZW075-C16)
Hi, I have a problem with my switch gen5 (Model ZW075-C16). it works with z-way-server, i can switch it off and on.
the switch is identified in python_openzwave (my raspberry shield is id 1, my switch is id 6) I have a variable my_nw which is a ZWaveNetwork, and it works. if i do
my_nw.nodes[6].get_switches() i get an int (72057594143391744)
with the previous versions, i did this to switch it on
my_nw.nodes[6].set_switch(72057594143391744, True)
It is no more working with version 4.x the state value is always false, even if i try to set it to true (with set_switch() )
my_nw.nodes[6].get_switch_state(72057594143391744)
when i try to get all possible value, i get None
my_nw.nodes[6].get_switch_all_items(72057594143391744)
I wonder if i keep the link with my object... As if i have the connection at the beginning, but then no refresh at all... no communication.. My first question is Am i doing it the correct way ?
Sorry for the long delay. Yes its the way to use it. Look at tests : https://github.com/OpenZWave/python-openzwave/blob/master/tests/api/test_switch.py#L81 Did you try to control it with openzave control panel ?
Yes, it works with openzwave control panel.. I can swith it on and off. Is it normal that get_switch_all_items() gives None ?