Page 1 of 1

Code device sensorMultilevel problem!

Posted: 12 Feb 2019 07:38
by ricargr
Hi,

I have a daikin AC and it have external and internal temperature sensor. I have every value (number) updated to a file with a simple bash script.

What i want to do is create two virtual temperature sensorMultilevel in zway (ver 2.3.6), for that I tried with the app “Code Device” but I am not able to get the value. I am trying with: system(“cat /home/pi/tempvalue”)

Please could you help me? I see my knowlegde is low.

Thank you very much

Re: Code device sensorMultilevel problem!

Posted: 12 Feb 2019 15:42
by ricargr
Please any help?

I have more information; when reading with cat the plain file with the number 27, in the virtual sensor created shows [0,"27\n"] instead of 27.
Thank you very much

Re: Code device sensorMultilevel problem!

Posted: 14 Feb 2019 23:08
by PoltoS
parseInt(system(“cat /home/pi/tempvalue”)[1], 10)