Page 1 of 1

Bug in Domoticz Blocky - parsing sensor values

Posted: Sunday 15 October 2017 15:29
by psb777

Domoticz 3.8153
Raspberry Pi
Debian Stretch
Various brands of multisensor, all exhibiting the same problem in Blocky

I have searched the forum and I think I see what is really this issue reported several times in different ways but never resolved. I think I have found the underlying bug. Possibly it isn't Blocky but some layer beneath but this is the best I can do and I hope it is found useful.

Here is my Blocky code: (please ignore the Tuesday comparison!)
domo-bug.png (55.26 KiB) Viewed 553 times
Here is the relevant extract from the log

Code: Select all

2017-10-15 14:10:00.007 XXXX Temp:
2017-10-15 14:10:00.007 21.4;50;1
2017-10-15 14:10:00.007 XXXX Tstat:
2017-10-15 14:10:00.007 21.50
2017-10-15 14:10:00.007 XXXX Dining radiator OFF
2017-10-15 14:10:00.008 XXXX Dining radiator ON
You will see from line 2 the temperature value according to Blocky but this is the raw un-parsed string from the multi-sensor. Blocky should know to parse that string to extract the value before the first ";" semi-colon. The same sensor is visible under both humidity and temperature. Bockly should select the correct part of the ";" delimited sensor string but does not do so - as you can see from the log.

As a consequence of incorrect parsing the comparison of the thermostats number - correctly returned - with the un-parsed string from the multi-sensor does not and can not work.

Also, this is not a sensor problem - I have three different types of multisensor - they all return strings formatted like this, and other parts of Domoticz do correctly extract the correct sub-string.

Re: Bug in Domoticz Blocky - parsing sensor values

Posted: Thursday 18 January 2018 13:03
by Tico
Hi There,


I am experiencing same issue with same Domoticz version.

Re: Bug in Domoticz Blocky - parsing sensor values

Posted: Sunday 04 February 2018 6:42
by poushag
Line 2 appears to be showing three variable values that are elements of the same array. I think your code could work if you had a block that would explicitly assign a single array element (the temperature value) to a variable and compare that with your t-stat setpoint value.
Cheers, Andrew