Using Shelly devices with the MQTT plugin
-
Espressomatic
- Posts: 73
- Joined: Sun Dec 30, 2018 10:37 am
Using Shelly devices with the MQTT plugin
Is anyone working on a Shelly-specific plugin? MQTT has a lot of possibilities and supports a lot of messaging from a lot of very different products, but Shelly publishes details to directly integrate their products with anyone's platform. Cloud API, REST API, direct device-to-device API.
IMO, I won't ever waste my time flashing Tasmota on a SONOFF when Shelly has done things properly from the start. 4 switches arriving shortly along with some buttons to turn a pair of them into lamp-cord switches. H&T, Switch 2.5 and then their smoke detector later in the spring.
IMO, I won't ever waste my time flashing Tasmota on a SONOFF when Shelly has done things properly from the start. 4 switches arriving shortly along with some buttons to turn a pair of them into lamp-cord switches. H&T, Switch 2.5 and then their smoke detector later in the spring.
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Introducing the Shims plugin
Why would you need one? Shelly does MQTT.Espressomatic wrote:Is anyone working on a Shelly-specific plugin?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Introducing the Shims plugin
Pre-release available - https://github.com/FlyingDiver/Indigo-S ... /tag/0.1.3
Minor changes to support Shelly native MQTT.
Changed commands sent to lower case. This is to accommodate Shelly devices that require lower case commands. See https://github.com/FlyingDiver/Indigo-Shims/issues/8 for specifics.
Tested with a Sonoff/Tasmota device and it seems to work fine.
Please test action commands from Indigo to relay type devices. Specifically on/off/toggle. That's the only thing that changed.
Minor changes to support Shelly native MQTT.
Changed commands sent to lower case. This is to accommodate Shelly devices that require lower case commands. See https://github.com/FlyingDiver/Indigo-Shims/issues/8 for specifics.
Tested with a Sonoff/Tasmota device and it seems to work fine.
Please test action commands from Indigo to relay type devices. Specifically on/off/toggle. That's the only thing that changed.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Introducing the Shims plugin
Will this plugin support all Shelly devices? I bought a Shelly switch to use with Alexa, but it would be fine to integrate it with Indigo
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Introducing the Shims plugin
I really don't know anything about Shelly devices, other than they (at least some) do MQTT natively. If that's true, then I would expect you can use it with my MQTT plugins. If there are issues doing so, and I can fix them without breaking something else, I'll do so.MarcoGT wrote:Will this plugin support all Shelly devices? I bought a Shelly switch to use with Alexa, but it would be fine to integrate it with Indigo
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Introducing the Shims plugin
Ok fine.
I did a quick research and it seems that the dimmer (I bought the dimmer, not the switch) and it seems that it support MQTT
I did a quick research and it seems that the dimmer (I bought the dimmer, not the switch) and it seems that it support MQTT
Re: Introducing the Shims plugin
I have just received a Shelly 1PM and having spent all day trying to get my head around MQTT and failing so I just setup two Actions to turn on and turn off the Shelly, works fine. Also have a Shelly dimmer and so I will need to try and sort out MQTT but it just confuses me.MarcoGT wrote:Will this plugin support all Shelly devices? I bought a Shelly switch to use with Alexa, but it would be fine to integrate it with Indigo
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Re: Introducing the Shims plugin
How do you turn it on and off? Using MQTT?
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Using Shelly devices with the MQTT plugin
I moved the discussion of Shelly devices to a new thread.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Using Shelly devices with the MQTT plugin
Here's the docs for using MQTT with Shelly devices: https://shelly-api-docs.shelly.cloud/#reboot
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Using Shelly devices with the MQTT plugin
Really interested in the Shelly 1 and the button to give hardwired control to lamps but also remote control them.
Re: Using Shelly devices with the MQTT plugin
Except it's only for their switch and not their dimmer. Two buttons on it would be perfect.
Re: Using Shelly devices with the MQTT plugin
I am using 2 actions that run either On or Off python scriptsMarcoGT wrote:How do you turn it on and off? Using MQTT?
Code: Select all
# Shelly Turn Off
import urllib2
import socket
ShellyIP = "192.168.100.236"
TurnOn = "/relay/0?turn=on"
TurnOff = "/relay/0?turn=off"
#url_cmd = "http://" + ShellyIP + TurnOn
url_cmd = "http://" + ShellyIP + TurnOff
indigo.server.log(u"Sending to Shelly at " + ShellyIP)
try:
response = urllib2.urlopen(url_cmd)
response.read()
response.close()
except socket.timeout:
indigo.server.log(u"Timed out when talking to Shelly at " + ShellyIP)
except urllib2.URLError, e:
if hasattr(e, 'reason'):
indigo.server.log(u"Error: We failed to find Shelly at " + ShellyIP)
indigo.server.log("Reason: " + str(e.reason))
elif hasattr(e, 'code'):
indigo.server.log(u"Error: The Shelly couldn\'t fulfill the request.")
indigo.server.log("Error code: " + str(e.code))
else:
indigo.server.log(u"Sent to Shelly at " + ShellyIP)
Yes, I have been staring at it all day but can't get my head around Mosquitto, MQTT plugin, Shims plugin and Shelly.FlyingDiver wrote:Here's the docs for using MQTT with Shelly devices: https://shelly-api-docs.shelly.cloud/#reboot
If anyone gets a Shelly and installs with these plugins please can you put a "how to" here (in idiot steps) and I will be eternally grateful
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Re: Using Shelly devices with the MQTT plugin
I have always found The Hook Up to be very clear in his explanations.
https://www.youtube.com/watch?v=NjKK5ab0-Kk
As an alternative to shims, and as described in above video, you could also use nodered, which can do nodered to follow along with the above and use the indigo action nodered pluging / palette to control the devices
https://www.youtube.com/watch?v=NjKK5ab0-Kk
As an alternative to shims, and as described in above video, you could also use nodered, which can do nodered to follow along with the above and use the indigo action nodered pluging / palette to control the devices
Re: Using Shelly devices with the MQTT plugin
Yes watched that also this afternoon but it is based around Home Assistant which seems to have a very large base of Shelly support, as for Node-Red I uninstalled that a few days ago as I now have the Alexa back working with the Echo Gen 1 so did not need it, not sure I would manage to get my head around it, would rather a step by step how to for FlyingDiver's MQTT and Shims plugins, once I get one switch setup I should be fine for others.siclark wrote:I have always found The Hook Up to be very clear in his explanations.
https://www.youtube.com/watch?v=NjKK5ab0-Kk
As an alternative to shims, and as described in above video, you could also use nodered, which can do nodered to follow along with the above and use the indigo action nodered pluging / palette to control the devices
CliveS
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer