Device HTTP

Avatar
  • updated

Hi,

I would like to be able to connect a Shelly with ComfortClick.
I think the best way was to use an HTTP Device.
But I am not able to configure. Is there an example for me to base myself on?
To make Shelly on / off, just roll a link and to know its status just access a link in JSON.

Thanks

Avatar
Vitor Morim

You're right :)

Avatar
Ricardo Pinto

You're welcome.

Let's keep this in English, or other may think we're talking an alien dialect :-P

In the meanwhile we'll exchange contacts on LinkedIn.

Cumpts

Avatar
Vitor Morim

Ricardo,

Muito obrigado pela ajuda.

Qualquer coisa que possa ser útil, contacte-me por Linkedin, fui eu que lhe enviei um convite.

Cumprimentos

Avatar
Ricardo Pinto

Perfect! Now you can start the integration of Shelly devices.

For post commands, you need to set the "Send Cyclically" to false, otherwise, as in the picture tells me, you're sending the off command every 1 second. You can use that for the status, but it's not recommended for the post command in this case, as you just want to send the value once.

Cumprimentos compatriota

Avatar
Vitor Morim

Ricardo,

It works perfectly. Thanks a lot.


I take this opportunity to ask one more question. To order the On / Off shelly, just turn the following link: http://192.168.1.90/relay/0?turn=off

If i put this in command: 

They send the command and turn off the Shelly, but do this contantanly.


How can I do this using a Boolean?

Thanks again

Avatar
Ricardo Pinto

On the Command, write "status" without the ""

On the token, insert:

relays.[0].ison

See if gets something.

On an online json path expression tester, it returns false (the actual value on the response), so hopefully it will work.

Test it out and tell us the feedback. Some of us are having problems with HTTP devices, so I can't promise it will work right away.

Online Json path expression tester used: https://jsonpath.curiousconcept.com/

Avatar
Vitor Morim

Hi Ricardo,

Yes

{"wifi_sta":{"connected":true,"ssid":"CasaMorim","ip":"192.168.1.90","rssi":-77},"cloud":{"enabled":true,"connected":true},"mqtt":{"connected":false},"time":"13:48","unixtime":1585662523,"serial":4169,"has_update":false,"mac":"DC4F22608DF2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0, "overpower":false}],"meters":[{"power":0.00,"is_valid":true,"timestamp":1585662523,"counters":[0.000, 0.000, 0.000],"total":0}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"temperature":33.67,"overtemperature":false,"tmp":{"tC":33.67,"tF":92.61, "is_valid":"true"},"update":{"status":"idle","has_update":false,"new_version":"20200312-124223/v1.6.1@112262fd","old_version":"20200312-124223/v1.6.1@112262fd"},"ram_total":50328,"ram_free":33856,"fs_size":233681,"fs_free":153361,"uptime":258235}

Thanks

Avatar
Ricardo Pinto

Hi,

Can you past the JSON response here in plain text, so I can filter the value to see if it gets you somewhere?

Best regards

Avatar
Vitor Morim

Hi Ricardo,

Thanks for your answer.

When I acess the 192.168.1.90/status, i get this information.

I need the information it stay in blue box.

In the ComfortClick project I put the following:

In "Shelly" Configurations i put this:

Now, I don't now what i need to put in the other things:

This is the first time i use JSON.

If can help me with this information, I am very grateful

Avatar
Ricardo Pinto

Hi,

I never used Shelly devices, but their documentation looks very detailed:

https://shelly-api-docs.shelly.cloud/#shelly-family-overview

As I don't own any Shelly device, I can try to read some of the documentation, but I won't have the chance to test it out.

And yes, HTTP device is the best way to use with Shelly, so it can be used to send and get status from Shelly devices, by the interpretation of JSON responses.


Best regards