$dht.temperature changes THEN execute "curl --silent -X PATCH --header \"Content-Type:application/json\" --user \"admin:admin\" --data '\{\"type\": \"value\", \"valueOrExpression\": $dht.temperature\}' http://192.168.2.118:82/api/variables/RemoteDHT > /dev/null"
-
[solved]DHT22 Sensor from one pi to another
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
thank you for the quick response.
@koffienl on what pi must i set the rule? On the pi wich is connected to the DHT22 or on the other. And what devices i have to create?
Thank you -
The exmaple rule reads temperature from local DHT and sends it to a other Pi that doesn’t have the DHT
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl ok, thank you. So i must create a shell sensor on the pi wich doesen´t have the dht sensors right?
Can i send temperature and humidity to the same device?
-
Why a shell sensor ?
You let the first Pi (with the DHT sensor) push the value into a variable on the second Pi. You can do the same for other sensors.
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Ah, ok i push it in a variable.
and how can i show the variable on the gui? -
add a variable device : http://forum.pimatic.org/topic/257/how-to-display-variable/2
Follow my domotica project on http://maredana.nl
-
Thank you.
Can i show 2 variables in a variable-device? -
I think so
try{ "id": "mode", "name": "Mode", "class": "VariablesDevice", "variables": [ { "name": "modeVar1", "expression": "$mode1", "type": "string" }, { "name": "modeVar2", "expression": "$mode2", "type": "string" } ] },
Follow my domotica project on http://maredana.nl
-
thank you,
i will test it and report!
-
Good evening,
i have tested some things and now it works nearly perfect.
Now i have to create a Device which show me the temperatur and humidity in the mobile-frontend.@incmve your VariableDevice show me the variables but withot a unit and all of the numbers after the dot. But i want max 2number after a dot and the unit (°C and after the variable. Is that possible?
Thank you
-
{ "variables": [ { "name": "var-woonkamer-termperatuur", "expression": "$WoonkamerTemperatuur", "type": "number", "unit": "ºC", "label": "" } ], "xLink": "", "id": "id-woonkamer-temperatuur", "name": "Woonkamer Temperatuur", "class": "VariablesDevice" },
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
regarding the digits you can use round in the expression like this
"expression": “round(($mode1),2)”,
this will round the variable for two digits.pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Good Morning,
now i made it like this:
{
“id”: “mode”,
“name”: “Testgerät”,
“class”: “VariablesDevice”,
“variables”: [
{
“name”: “Temperatur”,
“expression”: “round(($temperatur-wc.temperature),2)”,
“type”: “number”,
“unit”: “°C”
},
{
“name”: “Feuchte”,
“expression”: “round(($temperatur-wc.humidity),2)”,
“type”: “number”,
“unit”: “%”
}
]
}but i have no unit in the mobile-frontend
Temperatur WCWhere is my problem now?
Thank you
-
I tried your code in my pimatic and it works for me
I have no idea why it doesn’t work for you.Anyone else has an idea?
Follow my domotica project on http://maredana.nl
-
mhhhh,
ok, i will restart my pi completly and have a look if this helps.
(A reboot is always good! ) -
Good Evening,
after i restart my pi and update all the plugins and so on it works.
However now it works fine for me.
SO for me it is solved!Thanks to all.