Shelly Device Handlers for Hubitat

I understand, would you give me some indication of in which line of code I could change the polling time, for this specific device it would be good for me and I think I won't lose anything for my specific use.

greetings

This driver simply has no polling interval. It's not polling at all. All the events are issued by shelly device itself.

If you want polling, you need to set RM calling root device 'Refresh' method. It makes async http request for full status update. (child devices use websocket connection for partial updates and will require event stream running). All child device commands except child 'Refresh' are also using async http request and so will remain functional.

And comment out code at line 833 to avoid automatically opening event stream to device at boot time.

void initialize() {
// connect() < ----
}

If you want to make any modifications I can explain what code does what.
But it should not be confusing as functions mostly have self explanatory names. Except maybe few of them.

1 Like

Good, sorry for not answering, I have had the focus of. i time on other matters.

Thank you very much for offering your code, I don't have the time right now to deal with it. But I thank you for your offer. We will return to it later.

all the best

Hi

I use a Shelly plus 2 with a liniar actuator with buildin limit switches.
So I use Shelly timer (movement time limits) to signal end of limit.
I use shelly Cloud app to program the above.

The Child hubitat driver has OPEN - CLOSE - STOP_POSITION_CHANGE
But I have no access to use them in the Hubitat dashboard
The Parent driver does not support OPEN - CLOSE - STOP_POSITION_CHANGE

Also I use Shelly input switch as Control button mode:single that perform OPEN - STOP - CLOSE sequence for each button press
The Hubitat child driver for Shelly inputs does not work when I press the PUSH button in the driver - no state changes in the input driver

Is it possible that your Shelly driver can support liniar actuator with buildin limit switches ?

Otherwise great driver that works as Dashboard Shade - but cannot stop Shade halfways with a liniar actuator

best regards
Per
Denmark

Has anyone managed to get a shelly 1 pm pro working with these drivers? thanks

Was struggling with this today found this driver would work for Shelly 1 Mini gen 3. good luck. Hubitat-Drivers/Shelly-as-a-Switch.groovy at master · ShellyUSA/Hubitat-Drivers · GitHub

Hi @dmitry.rozovik, with the new dashbord there is a function to see when a device is offline.
The parent device of your driver can not be add to the dashboard, the healtstatus is not available on the child,
In this example the "140 switch 1" (shelly 2PM) is offline


do you see a way to show the healtstaus on child level to?

1 Like

I see. I'll add helthStatus to all custom child devices to make it possible.

1 Like

Bitbucket driver it tested using Shelly Pro 2PM that is roughly half of 1PM. All the functionality is exactly the same except the number of channels

1 Like

Hi

Sorry for the long delay.

I'm trying to get into your case.

If I got it correctly you are using Shelly plus 2 in 'cover' mode.

What driver are you using?
Bitbucket driver if configured should correctly accept input events.

If input is set as 'button' it should trigger events instead of 'contact' state. Events alter button related attributes depending on how many pushes were made. They are not so intuitive to inspect visually. Yet 'button controller' apps should work correctly.
Not sure what you mean by 'input switch' as bitbucket driver has separate child devices for 'input' and for 'switch'.

I need to check how limit switches are interacting with event stream. In general case it should work out of the box. But handling extra events on the case might be missing.

A bit more info on your setup would be helpfull to understand the full picture.

1 Like

Hi Dmitry,

I got a similar or the same issue.

Shelly 1Pm Pro - I've set both inputs as detached

The input should come on for maybe 20 seconds at a time.

I've set "Input Toggled On" action to http://192.168.199.89:39501/button/0/on/ I also tried it button/1/on and input/0/on I've set the "Input Toggled Off" in similar manner.

In logs under "Hub" I get multiple times the error -> Received data from 192.168.199.70, no matching device found for 192.168.199.70, C0A8C746:FF97, EC62608282EC or C0A8C746.

The IP address above is the IP address of the Shelly device.

Occasionally in the logs for the child device I get the info message "Contact was open" and the info message "Contact was closed"

dev:9574 2024-05-31 18:50:32.380 info Contact was closed
dev:9574 2024-05-31 18:50:31.936 info Contact was open

Notice the tiny amount of time between the two log entries.

i'm using your drivers - last downloaded from bitbucket a couple of days ago.

I hope this helps. Thanks, Simon

Hi
device = liniar actuator with buildin limit switches.

Shelly plus 2 setup in Cover mode
Shelly input 1 setup = Button (hardware wired)
Shelly Control button mode= single

Child hubitat dashboard tile (Input 1 child) = Button
The Button tile does not do anything
Shelly hardware wired Input switch 1 does OPEN - STOP - CLOSE the cover

Child hubitat dashboard tile = Shade
the shade tile 0...100 does nothing - the shade does not run

I use your " [Shelly Plus/Pro xPM]"
No version info
but in top of the driver
#include drozovyk.common1
#include drozovyk.meter1
#include drozovyk.sensor1
#include drozovyk.version1

hope this helps

Ok. So if I got your case correctly..

You have Shelly Plus 2 in "cover" mode with detached inputs. And it's configured with timeout limits.

A "shade" dashboard tile of child driver instance has no effect. Yet child device itself is working fine.

An input of your shelly device is configured as a detached "button" or "switch". And input driver instance has no effect on shelly device when altered from your hub.

Is it right summary/desription?

If so, the "cover " with limits it is something I need to check.
Note: You mentioned that parent/root driver instance has no "cover" interface functionality. Yes, it doesn't. A dashboard tile needs to be targeted towards child driver instance, not the root/parent.
This is done this way as some shelly devices might have more than one "cover" instance. Like Shelly Pro 4PM with dual cover firmware.

The input driver instances are rather shelly input state sensors. They do not send any commands to shelly devices. And input child device instance controls/buttons are attached to attributes by hubitat platform design (cannot be hidden). When you make some rule or app listen input child driver instance for physical interactions with your shelly device, child driver instance buttons may be used to debug your rules (to simulate inbound input event). So it is ok that you cant alter your shelly plus from software button of the corresponding input child driver instance.

1 Like

Hi

Yes - configured with Shelly timeout limits and it works fine - no need for anything else.

Inputs is not detached.
Shelly input 1 setup = Button (hardware wired to a button)
Shelly Control button mode= single (not detached)

I have an button hardwired to shelly input 1 - Each push on this button and Shelly cycles UP-STOP-DOWN on my shades

BUT - the hubitat shelly CHILD-COVER driver does absolute nothing at all.
In dasboard tile I tried using a switch and relay, but then a question mark is shown - only SHADE tile does not show a question mark.

hope this can be solved :slight_smile:

regards
per

Yep)) This is why I'm trying to get as much info as possible) To fix it)

1 Like

great - thanks :grinning:
Just ask if I should help testing it.....

The driver is updated:

  • Added 'healthStatus' to all custom child devices for convinience (for dashboard tiles)
  • Added draft support for Shelly Plus RGBW PM [rgb and rgbw components]:
    • Light profile should be fully supported
    • RGB and RGBW profiles lack color control and color state feedback. SetLevel gets no effect from light transition time argument.