MMore / pimatic-z-way

pimatic plugin for controlling devices using Z-Way
GNU General Public License v2.0
7 stars 9 forks source link

Obsolete zway switch update command #8

Closed ds2216 closed 8 years ago

ds2216 commented 8 years ago

The plugin sends update commands for z-wave switches to the z-way server every (@config.interval) seconds. That forces the server to communicate with the z-wave switch in the configured intervals. Z-Way Server is responsible to keep track of the status of devices and if everything is configured well, sending an update command is not necessary. Line 76 in z-way.coffee is obsolete. Please consider changing this in the next update.

MMore commented 8 years ago

Hey @ds2216, thanks for this information. But you can set the interval to 0 to avoid this polling. We implemented polling to ensure that after another application changed the device state it is represented correctly in pimatic. Maybe I misunderstood you...

ds2216 commented 8 years ago

Polling is ok and we really need it to know when a device state was changed manually or by other applications. But the @getState() in line 77 does the job well enough. Z-Wave devices always send state changes to the controller (RazBerry). So the the z-way server always has the correct state and it does not need to the ask the device periodically. Believe me, I commented line 76 out 4 weeks ago and it's working well. I do switch my switches manually too and pimatic always has the correct state ;-).

MMore commented 8 years ago

Thanks, understood. I removed the line, so this will be included in the next release.