I have two DS18b20 sensors , one connected to the cold and the other to the warmwater pipe of my central heating.
Both values are received by domoticz. Now I also want to display the temperature_difference into domoticz.
I could easy do this in domoticz with a script but I thought it must be easy for EASPEasy to do this for me.
Sending the temperature with Publish domoticz/in works but the value is displayed as a string.
this is my Rules:
Code: Select all
On System#Boot do
timerSet,1,30
endon
On Rules#Timer=1 do
Diff = Warm#Temperature-Cold#Temperature
Publish domoticz/in,{"idx":775,"nvalue":0,"svalue":Diff}
timerSet,1,30
endon
The log looks like this:
I tried it in several ways but I cannot make it work so that the Diff string is replaced by the calculated difference of warm & cold.2089230 : DS : Temperature: 40.75 (28-d4-41-45-92-e-2-44)
2089231 : EVENT: Cold#Temperature=40.75
2089301 : DS : Temperature: 45.44 (28-9-4a-45-92-e-2-ba)
2089303 : EVENT: Warm#Temperature=45.44
2089378 : MQTT : Connected to broker
2089381 : Subscribed to: domoticz/out
2095542 : EVENT: Rules#Timer=1
2095546 : ACT : Diff = Warm#Temperature-Cold#Temperature
2095550 : ACT :
2095554 : ACT : Publish domoticz/in,{"idx":775,"nvalue":0,"svalue":Diff}
2095563 : ACT : timerSet,1,30
Is this possible to do in ESPEasy 1.48 ?
How can it be done ?
Or do I need to go to ther mega version ?