python-openzwave icon indicating copy to clipboard operation
python-openzwave copied to clipboard

set_switch() not working on gen5 (Model ZW075-C16)

Open sylvaincherrier opened this issue 7 years ago • 3 comments

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)

sylvaincherrier avatar Jun 02 '17 10:06 sylvaincherrier

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 ?

sylvaincherrier avatar Jun 02 '17 10:06 sylvaincherrier

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 ?

bibi21000 avatar Jun 11 '17 20:06 bibi21000

Yes, it works with openzwave control panel.. I can swith it on and off. Is it normal that get_switch_all_items() gives None ?

sylvaincherrier avatar Jun 12 '17 15:06 sylvaincherrier