openLuup: Shelly Bridge plugin
-
IP was used for HTTP request to get device name in an early version, and that piece of code remained.
The whole point of MQTT is that it doesn’t need one, of course.
Edit: It is, however, used to the browser window in the openLuup device page of the parent device, so that you can interact directly with the it for firmware updates, etc..
-
Working fine except for a couple of small points. In the earlier H&T device the battery topic is:
shellies/shellyht-<deviceid>/sensor/battery
In the newer device it's:
shellyplusht-<Device_ID>/status/devicepower:0
and returns:
{ "id": 0, "battery": { "V": 0.43, "percent": 0 }, "external": { "present": true } }
It would be good if "external" is true ie USB powered; that battery percent is set to 100% and the Voltage (variable V) to 5 Volts. ie USB Voltage. Any battery values are incorrect, as you are meant to remove the batteries, when running off USB power.
Interesting the battery percent in the UI dashboard for the parent device shows the value of "CurrentLevel" ie the actual humidity percentage measured. Not sure how that got in there! Looks like if the battery level is missing, something else gets plugged into there.
The service urn:micasaverde-com:serviedId:HumiditySensor1 service saves the humidity as "CurrentLevel". In the Historian rules this gets picked up as Current as in Amperes.
CurrentHumidityLevel would have been nice but that's MIOS.
-
My wishes have been granted on the USB! The parent device shows the humidity % just to the right of the Shelley Icon. Not sure why the temperature is not there as well. Sounds like an AltUI thing. Sorry; got a bit confused between the battery percentage and the humidity, so ignore that. The v variable should be a capital V for Volts but that's my OCD again. So looking good. Thanks.
-
Oh, you’re looking at AltUI. I don’t even have that installed on my production system since everything configuration-related can be done with the openLuup console.
I agree with ‘V’, however the ‘v’ is a hangover from the native naming in earlier Shellies. It should probably be in a different service anyway.
-
Has anyone got a Shelly Plus Uni yet...?
...and done anything with it??I've just acquired a couple of them, and pleased to say that they're immediately recognised by the latest Shelly bridge in openLuup.
What's a bit missing from the Shelly site, AFAIK, is any decent instructions about device configuration. I'm planning to use these as pulse counters for utility meters (which Shelly do advertise as an application.)
-
Has anyone got a Shelly Plus Uni yet...?
...and done anything with it??I've just acquired a couple of them, and pleased to say that they're immediately recognised by the latest Shelly bridge in openLuup.
What's a bit missing from the Shelly site, AFAIK, is any decent instructions about device configuration. I'm planning to use these as pulse counters for utility meters (which Shelly do advertise as an application.)
-
No - I don't have one at this time but I'll order one up, as I would very much like to make use of one. The Remote Procedure Calls (RPC) seems to be the new direction. On the H&T device, you have to enable some of the older topics (via a checkbox) to get it to work with the plugin.
I've been battling with Z-Wave JS of late. Looks like the ZWay plugin could be a good basis for communicating with that. ie swapping the http rx/tx over to MQTT. Sounds simple - right!!
-
No - I don't have one at this time but I'll order one up, as I would very much like to make use of one. The Remote Procedure Calls (RPC) seems to be the new direction. On the H&T device, you have to enable some of the older topics (via a checkbox) to get it to work with the plugin.
I've been battling with Z-Wave JS of late. Looks like the ZWay plugin could be a good basis for communicating with that. ie swapping the http rx/tx over to MQTT. Sounds simple - right!!
OK - updates have been made to the Shelley plugin. All is still working OK here.
On the Shelly H&T device: AltUI shows (under unknown circumstances) in the UI of the parent device: Line 1 and line 2 show the temperature and humidity - that's good. However, at later times, it shows Line 1 and line 2 as the humidity and blank. Not sure if AltUi or openLuup is the issue.
I now have a "Shelly Pro 3em". If you are interested in integrating it, let me know how I help. I see at the other place, they are still having problems with this one!
-
OK - updates have been made to the Shelley plugin. All is still working OK here.
On the Shelly H&T device: AltUI shows (under unknown circumstances) in the UI of the parent device: Line 1 and line 2 show the temperature and humidity - that's good. However, at later times, it shows Line 1 and line 2 as the humidity and blank. Not sure if AltUi or openLuup is the issue.
I now have a "Shelly Pro 3em". If you are interested in integrating it, let me know how I help. I see at the other place, they are still having problems with this one!
@a-lurker said in openLuup: Shelly Bridge plugin:
On the Shelly H&T device: AltUI shows (under unknown circumstances) in the UI of the parent device: Line 1 and line 2 show the temperature and humidity - that's good. However, at later times, it shows Line 1 and line 2 as the humidity and blank. Not sure if AltUi or openLuup is the issue.
Yes, I know this one. If a device has a standard Temperature or Humidity variable, then AltUI will display the value on the panel. Unfortunately, if it has both, then only the humidity is shown after the first update.
-
Had a quick look at the Shelly pro 3em. Looks like it gets ignored at line 643:
if not shelly: match "^shellyplus" then return end ...
The H&T device publishes: "shellyplusht-MAC_address". However the Shelly pro 3em publishes: "shellypro3em-MAC_address". So no "plus" found. And the user can change this label in the device's web page under "MQTT prefix". I changed the prefix so it included "plus" but that didn't seem to help. EDIT: it did help - I had just plugged the "plus" in the wrong spot. See post further below.
On the shelly-gen2-cmd/rpc topic I only see the H&T device - not the shellypro3em.
I don't have a Gen 1 device, so I can't see what would identify one from the other. Could have a numeric value associated with each known device indicating its generation. Also the RPC communication seems to be purely Gen 2?