[Problem] Event with time won't trigger

cantarevolare
Posts: 16
Joined: Wednesday 08 November 2017 20:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: [Problem] Event with time won't trigger

Post by cantarevolare » Tuesday 19 December 2017 20:13

Yes, I checked and there is only one device that's named like that.

I tried with another device that's named differently, and there is still this return :

2017-12-19 19:14:58.226 dzVents: curtemp:

I just thought of something and that's my bad of not telling you earlier, but this is a device that gives the temperature and the humidity. Maybe there is a sub function of the device or something like that to call in order to obtair the temperature only ?

I think I found the solution thanks to the wiki and you:

Code: Select all

sTemperature, sWeatherHumidity = otherdevices_svalues['Chambre temp']:match("([^;]+);([^;]+)")
curtemp = tonumber(sTemperature);
print("curtemp : " .. curtemp .. " ");
The result : 2017-12-19 19:31:53.247 dzVents: curtemp: 16.9

Let see if it matches exactly what I need.

Thank you very much for your help.

User avatar
jvdz
Posts: 1398
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Westland/Netherlands
Contact:

Re: [Problem] Event with time won't trigger

Post by jvdz » Tuesday 19 December 2017 21:26

That explains it.You could also do it this way:

Code: Select all

curtemp = tonumber(otherdevices_temperature['Chambre temp']);
print("curtemp : " .. curtemp .. " ");
Jos

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests