Fast Forward to Razberry

Discussions about RaZberry - Z-Wave board for Raspberry computer
LOCOSP
Posts: 29
Joined: 22 Sep 2013 02:33

Re: Fast Forward to Razberry

Post by LOCOSP »

pz1 wrote:This thread is mostly about the older Z-Cloud which behaves differently from present RaZberry. Refer to the developers documentation
OK I understand, but I am not using Z-Cloud, I want local use only, and didn't find anything what can help me in documentation ...
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Fast Forward to Razberry

Post by pz1 »

LOCOSP wrote: I try with

Code: Select all

ZWaveAPI/Run/devices[4].instances[0].commandClasses[0x26].Get()
The developers manual refers in section 8.30 on page 94 to Command class *SwitchBinary* You better take the habit of using those names instead of the numbers:

Code: Select all

ZWaveAPI/Run/devices[4].instances[0].SwitchBinary.Get()
It does make the code more readable, and you avoid mistakes, because you had to use 0x25 instead of 0x26.
Do read that piece carefully, so you understand what is happening. This Get command only instructs the controller to place this value in the dataholder, from where you must read it for your application:

Code: Select all

ZWaveAPI/Run/devices[4].instances[0].SensorBinary.data.level.value
Note: the more modern binary switches are automatically updated. Then there is no need to issue the Get() command.
Hope this helps (I haven't tested, just copied from an old code base)
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply