Page 1 of 1
Accept a HTTP Post from Shelly H&T Sensor
Posted: Friday 07 June 2019 7:55
by jmone
Newbie Q : I've got a
Shelly H&T WiFi sensor that can wake up and send (as a GET Parameter) to a HTTP url the sensor values when it changes (by x amount). That great but I'm not sure how to:
1) Setup Domoticz to receive these to update a virtual sensor value, and
2) The correct string to use in the Shelly H&T to report the Humidity
AIM: I'm going to use this sensor to trigger an event (turn on a Daikin Split AC in Dry Mode) when the Humidity Level is above say 60% and turn off again if it is below 55%. I've ordred the WiFi board for the Daikin but it is not here yet.
Thanks
Nathan
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Friday 07 June 2019 7:58
by jmone
FYI - I tried this string in Shelly H&T in the hope I would see what it was sending:
"
http://192.168.1.xx:8080/json.htm?type= ... e&message="
... but all I got in the Domoticz Log was:
"2019-06-07 15:26:42.328 Status: Incoming connection from: 192.168.1.xx"
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Saturday 08 June 2019 8:56
by philchillbill
Did you URL encode the test message? No spaces, brackets etc are allowed so they need encoding. Also no quotes around the message. If you just try with &message=thisisatest you can skip encoding as that will work as-is.
Sent from my iPhone using Tapatalk
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Thursday 13 June 2019 10:47
by jmone
Mmmm. I can get Domotics to receive a Msg from the Shelly, but I don't know what the Syntax is for passing the Humidity Value instead of just text. So far I've tried a few different Syntax but I'm only getting the text not the value.
, eg I put in "
http://192.168.1.xx:8080/json.htm?type= ... ="+various test vars, in the Shelly and see in the Log the following is received.
[code
2019-06-13 18:06:05.996 Status: Incoming connection from: 192.168.1.xx
2019-06-13 18:11:08.796 Status: hum
2019-06-13 18:13:45.926 Status: hum.value
2019-06-13 18:36:27.966 Status: $_GET["hum.value"]
22019-06-13 18:37:27.996 Status: GET["hum.value"]
2019-06-13 18:37:38.006 Status: GET[hum.value]
2019-06-13 18:37:58.014 Status: [hum.value]
2019-06-13 18:40:38.789 Status: [hum]
2019-06-13 18:40:48.696 Status: status
2019-06-13 18:41:18.723 Status: /status
2019-06-13 18:41:49.049 Status: [status]
2019-06-13 18:41:58.992 Status: "status"
[/code]
Any Idea what the syntax is for the Shelly?
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Thursday 13 June 2019 10:54
by philchillbill
The syntax is not for the Shelly as such, the syntax is about where the info should be sent towards Domoticz. Check out this link about updating sensors via JSON:
https://www.domoticz.com/wiki/Domoticz_ ... .2Fsensors
That way, you don't need to go via the log or messaging.
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Thursday 13 June 2019 22:53
by jmone
So I created a Dummy Sensor for Temp/Hum, then in Shelly tried the following:
Code: Select all
http://192.168.1.xx:8080/json.htm?type=command¶m=udevice&idx=29&nvalue=0&svalue=TEMP;HUM;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command¶m=udevice&idx=29&svalue=TEMP;HUM;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command¶m=udevice&idx=29&svalue=tmp.value;hum.value;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command¶m=udevice&idx=29&svalue=tmp;hum;HUM_STAT
I can see that the Domoticz is receiving the connection and passing data to the Dummy Sensor as Last Seen on the Sensor is updated but the data for TEMP and HUM is 0 and is not the actual TEMP/HUM being recorded in the Shelly.
Thanks
Nathan
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Tuesday 17 December 2019 19:41
by Derik
Is this Shelly sensor working Domoticz?
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Wednesday 23 February 2022 9:34
by knights
I would like to have the same functionality : )
Did you come up with a working which you could share ?
I Tried the mariopeters script Shelly Cloud, but this crashes my domoticz everytime
Re: Accept a HTTP Post from Shelly H&T Sensor
Posted: Thursday 24 November 2022 17:58
by gerbenhwk
Hi,
did one of you manage to get this working? I'm also struggling to insert the right variable from Shelly. They said it should be $temp and $hum but Domoticz isn't getting the values.
thanks