Page 1 of 2

Fibaro Multisensor - advice needed please

Posted: 25 Oct 2013 12:42
by krambriw
Hello, I have a Fibaro multisensor (2 inputs, one 1wire with a temp sensor connected). In earlier versions of the z-wave running in a RPi, the callbacks worked perfectly according to the below sample from my main.js.But with the new version it is not working anymore, I get no callbacks from the multisensor. The bind function seems to work since I get no error messages.However,  the same method still works fine for binary switches, for those callbacks are received just as before.Could you give advice of recommended way to make callbacks for the multisensor to work again? I try to avoid polling...Best regards, Walterzway.devices[3].instances[1].SensorBinary.data.level.bind(function() { eventString = 'Device_3_Instance_1'; try { system( "python /home/pi/Desktop/network_send.py", eventString, this.value, zone, port ); return; } catch(err) { debugPrint("Failed to execute script system call: " + err); } });

A small modification....

Posted: 25 Oct 2013 12:42
by krambriw
I made a change to the js above, see below.Now the multisensor automatically reports temperatur readings via callback. For the inputs, the same problem still exist.If I execute ...devices[3].instances[1].SensorBinary.Get(), the status is reported instantly via the callbacks so the script syntax seems to work. The problem must be that the controller is not activating this by itself when input statuses are changed. I think...Any hints are very much appreciated!Best regards, Walterzway.devices[3].instances[1].SensorBinary.data[1].level.bind(function() { eventString = 'Device_3_Instance_1'; try { system( "python /home/pi/Desktop/network_send.py", eventString, this.value, zone, port ); return; } catch(err) { debugPrint("Failed to execute script system call: " + err); } });

From the log....

Posted: 25 Oct 2013 12:42
by krambriw
If I look into the log, I can see the log entries from the temp prob  (devices.3.instances.3)  correctly looks as expected but for the sensor input nbr 1 I get confused. Instead of (devices.1.instances.1.commandClasses.32.data.level = 255) , I would expect (devices.3.instances.1.commandClasses.48.data.level = 255). The same also for input nbr 2.Is this a bug??? [2013-10-27 07:18:33.319] RECEIVED: ( 01 12 00 04 00 03 0C 60 0D 03 03 31 05 01 44 00 00 09 9E 6D )[2013-10-27 07:18:33.320] SENT ACK[2013-10-27 07:18:33.320] SETDATA devices.3.data.lastReceived = 0 (0x00000000)[2013-10-27 07:18:33.320] SETDATA devices.3.instances.3.commandClasses.49.data.1.deviceScale = 0 (0x00000000)[2013-10-27 07:18:33.321] SETDATA devices.3.instances.3.commandClasses.49.data.1.scale = 0 (0x00000000)[2013-10-27 07:18:33.322] SETDATA devices.3.instances.3.commandClasses.49.data.1.val = 24.620001[2013-10-27 07:18:33.323] SETDATA devices.3.instances.3.commandClasses.49.data.1.scaleString = "°C"[2013-10-27 07:18:33.323] SETDATA devices.3.instances.3.commandClasses.49.data.1 = Empty[2013-10-27 07:18:37.426] RECEIVED: ( 01 0D 00 04 00 03 07 60 0D 01 01 20 01 FF 41 )[2013-10-27 07:18:37.426] SENT ACK[2013-10-27 07:18:37.427] SETDATA devices.3.data.lastReceived = 0 (0x00000000)[2013-10-27 07:18:37.427] SETDATA devices.1.instances.1.commandClasses.32.data.level = 255 (0x000000ff)[2013-10-27 07:18:37.437] RECEIVED: ( 01 0D 00 04 00 03 07 60 0D 01 01 20 01 FF 41 )[2013-10-27 07:18:37.438] SENT ACK[2013-10-27 07:18:37.438] SETDATA devices.3.data.lastReceived = 0 (0x00000000)[2013-10-27 07:18:37.438] SETDATA devices.1.instances.1.commandClasses.32.data.level = 255 (0x000000ff)[2013-10-27 07:28:44.610] RECEIVED: ( 01 0D 00 04 00 03 07 60 0D 02 02 20 01 FF 41 )[2013-10-27 07:28:44.610] SENT ACK[2013-10-27 07:28:44.611] SETDATA devices.3.data.lastReceived = 0 (0x00000000)[2013-10-27 07:28:44.611] SETDATA devices.1.instances.2.commandClasses.32.data.level = 255 (0x000000ff)[2013-10-27 07:28:44.632] RECEIVED: ( 01 0D 00 04 00 03 07 60 0D 02 02 20 01 FF 41 )[2013-10-27 07:28:44.632] SENT ACK[2013-10-27 07:28:44.632] SETDATA devices.3.data.lastReceived = 0 (0x00000000)[2013-10-27 07:28:44.633] SETDATA devices.1.instances.2.commandClasses.32.data.level = 255 (0x000000ff)

Further testing just to verify....

Posted: 25 Oct 2013 12:42
by krambriw
If I modify my main.js accordingly and use instead a syntax like:

zway.devices[1].instances[2].Basic.data.level.bind(function()

my callbacks are working again...but device[1] is referring to my controller, not the multisensor


Please try it our with v1.4.1

Posted: 25 Oct 2013 12:42
by PoltoS
Please try it our with v1.4.1-rc1.

Should work.

After upgrading to rc1 I see

Posted: 25 Oct 2013 12:42
by krambriw
After upgrading to rc1 I see that it looks ok in the log but instead I have now a problem executing system call from main.js. The policy is denying the callI receive in the log:[2013-11-01 10:21:39.900] Failed to execute script system call: This command is denied by policy   From the log and below from my main.js [2013-11-01 10:21:39.892] RECEIVED: ( 01 12 00 04 00 03 0C 60 0D 03 03 31 05 01 44 00 00 08 D6 24 )
[2013-11-01 10:21:39.893] SENT ACK
[2013-11-01 10:21:39.893] SETDATA devices.3.data.lastReceived = 0 (0x00000000)
[2013-11-01 10:21:39.893] SETDATA devices.3.instances.3.commandClasses.49.data.1.deviceScale = 0 (0x00000000)
[2013-11-01 10:21:39.894] SETDATA devices.3.instances.3.commandClasses.49.data.1.scale = 0 (0x00000000)
[2013-11-01 10:21:39.894] SETDATA devices.3.instances.3.commandClasses.49.data.1.val = 22.620001[2013-11-01 10:21:39.896] SETDATA devices.3.instances.3.commandClasses.49.data.1.scaleString = "°C"[2013-11-01 10:21:39.896] SETDATA devices.3.instances.3.commandClasses.49.data.1 = Empty[2013-11-01 10:21:39.898] --- EVENT: 2013-11-01T09:21:39.897Z 1383297700 zway.dataUpdate [3,3,49,null,22.6200008392334,null][2013-11-01 10:21:39.899] --- EVENT: 2013-11-01T09:21:39.898Z 1383297700 device.metricUpdated ["ZWayVDev_3:3:49:1","level",22.6200008392334][2013-11-01 10:21:39.900] Failed to execute script system call: This command is denied by policy


 From main.js  zway.devices[3].instances[3].commandClasses.SensorMultilevel.data[1].val.bind(function() { eventString = 'Device_3_Instance_3_temperature' try { system( "python /home/pi/Desktop/network_send.py", eventString, this.value, zone, port ); return; } catch(err) { debugPrint("Failed to execute script system call: " + err); }});

If you do a system call, the

Posted: 25 Oct 2013 12:42
by pz1
If you do a system call, the command name, in your case python, should be entered in file .systemcommands in the automation directory. Restart Z-way, and you should have permission to run the command.

Thank you!

Posted: 25 Oct 2013 12:42
by krambriw
It works now, thank you!!!
I missed the .syscommand file when I upgraded to rc1, I had it already correct in the previous installation folder but forgot that one...

Best regards, Walter

Yes I recognise your problem.

Posted: 25 Oct 2013 12:42
by pz1
Yes I recognise your problem. Before I had the .syscommands working under directory htdocs. The Z-Way manual refers to .syscommands in two places. with confusing texts. I sent an email to the developers about that.

Indeed, we need to copy it

Posted: 25 Oct 2013 12:42
by PoltoS
Indeed, we need to copy it from the old version to the new one. Fixed!