Accept a HTTP Post from Shelly H&T Sensor

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jmone
Posts: 5
Joined: Friday 07 June 2019 7:41
Target OS: -
Domoticz version:
Contact:

Accept a HTTP Post from Shelly H&T Sensor

Post 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
Attachments
ShellyHT.PNG
ShellyHT.PNG (383.26 KiB) Viewed 5570 times
jmone
Posts: 5
Joined: Friday 07 June 2019 7:41
Target OS: -
Domoticz version:
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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"
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
jmone
Posts: 5
Joined: Friday 07 June 2019 7:41
Target OS: -
Domoticz version:
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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?
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
jmone
Posts: 5
Joined: Friday 07 June 2019 7:41
Target OS: -
Domoticz version:
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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&param=udevice&idx=29&nvalue=0&svalue=TEMP;HUM;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command&param=udevice&idx=29&svalue=TEMP;HUM;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command&param=udevice&idx=29&svalue=tmp.value;hum.value;HUM_STAT
http://192.168.1.xx:8080/json.htm?type=command&param=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
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post by Derik »

Is this Shelly sensor working Domoticz?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
knights
Posts: 17
Joined: Monday 22 February 2016 20:05
Target OS: -
Domoticz version:
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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
gerbenhwk
Posts: 1
Joined: Thursday 24 November 2022 17:55
Target OS: -
Domoticz version:
Contact:

Re: Accept a HTTP Post from Shelly H&T Sensor

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest