Shelly Smart Devices | Direct Device control with http(s) requests / webhooks
Vložit
- čas přidán 22. 11. 2023
- A guide for Direct Device to Device (DDD) Control/communication for Shelly smart devices using http(s) requests. You can use these http requests from one Shelly device to another, or to communicate to non-Shelly http devices.
Where to get your Shelly:
Get the Shelly em on Amazon: amzn.to/3Nbki87
Check out the Shelly Store: amzn.to/49XiLwd
Shelly http(s) Requests shown in the video
The default Syntax:
[deviceIP]/[deviceType]/[channel]?[command]&[command]
If you have a username and password, the syntax it is:
user:pass@[deviceIP]/[deviceType]/[channel]?[command]&[command]
Device Type
• Relays
• Rollers
• Lights
• Colour lights
Command for relays
• turn=on - switch output ON
• turn=off - switch output OFF
• turn=toggle - reverse current state
Examples
XXX.XXX.X.XXX/relay/0?turn=on
XXX.XXX.X.XXX/relay/0?turn=off
XXX.XXX.X.XXX/relay/0?turn=toggle
XXX.XXX.X.XXX/relay/0?turn=on&...
replace XXX.XXX.X.XXX with your Shelly device local IP address
Shelly EM is a Wi-Fi-operated energy meter with contactor control. It allows you to simultaneously monitor the consumption of any home appliances, electric circuits, and office equipment (lights, power lines, security systems, heating, cooling, etc.) in 2 circuits on the same phase or individually. Shelly EM is perfect for measuring solar energy production, monitoring household consumption, and controlling heavier-load appliances. - Věda a technologie
Thanks, this fixed a communication issue I had with one Shelly relay controlling another.
Your welcome. Glad it helped you out 👍
thank you. nice explaination
You are welcome
How would the Auth_ ID be incorporated into the URL when remotely communicating with the Shelly Cloud over the internet? I cannot find any documentation about how to do this anywhere.
For user and password the format would be something like this: user:pass@[deviceIP]/[deviceType]/[channel]?[command]&[command]
perfect, exactly what i needed :)
Your welcome 👍
Thank for the video
I tried to do the same through websoket but nothing happened, do you know hot to do that through websoket?
Hi , I have a shelly 3 EM and I need to read my power consumption / production from with my ESP 32 I was going to get this API data from the internet. What does the request for that look like that I will need to post ? I use in my Arduino code string jsonPayload Http request tough.
I don't have a 3EM but you could try:
Read values from channel 0:
192.168.xxx.xxx/emeter/0/3em_data
Read values from channel 1:
192.168.xxx.xxx/emeter/1/3em_data
Read values from channel 2:
192.168.xxx.xxx/emeter/2/3em_data
Very interesting. Useful video thanks.
How do you get it to return the measured voltage, power, power factor etc?
Hi..you can use IPaddress/status which will return an array of all variables, or IPaddress/power for just the power related variables.
Great. Many thanks.@@Builtbypete
Your welcome.