Shelly Device Handlers for Hubitat

Show me a screen shot of your driver settings... and you are using the right motion driver.

My mistake here. Had an extra / that caused the error. Now fixed. Thanks :slight_smile:

1 Like

Hey @Evilborg,

just wondering if you'd thought about including the drivers in the Hubitat Package Manager.
This way, people could quickly and easily install your packages, and keep them up to date.

just wanted to throw that in here :slight_smile: Merry Christmas!

Hi all,

I'm fresh new, just getting the swing of things. I have just got my hub, and working on getting a shelly plus 1 device set up.

I'm currently trying to install in the following way (correct me if I'm wrong).
Devices -> Add Device -> Virtual Device

Device name -> "switch_0" (I just kept it the same as what the shelly was calling itself)
Type -> I picked from the 'User' menu using "Shelly Plus" (Hubitat-Drivers/PLUS at master · ShellyUSA/Hubitat-Drivers · GitHub ) using "ShellyPlus.groovy"

I think it has found the device as it has self populated some information, but it has the following:

"Current States" - "switch: LOCKED"

Can anyone point me in the right direction.

Thanks!

I posted this in the noobie help but I think I should have posted here.

If this is a hockey puck switch, you can use the internal Shelly drivers. Only use the drivers from the github for Plus switches.

input "protect", "enum", title:"Prevent accidental off/on", defaultValue: true, options: [Yes:"Yes",No:"No"], required: true

On your device preferences remove the Yes command to No.

Hope this helps,

2 posts were merged into an existing topic: New Shelly Plus Drivers

2 posts were split to a new topic: New Shelly Plus Drivers

Looked into that but its to much trouble for me to bother with it. Anyone is welcomed to maintain it with PR requests.

1 Like

Hi,
I seem to be having a problem with getting a shelly plus 1 set up. Can anyone advise on what I'm doing wrong?

I have also tried IP 192.168.33.1

Error code:
2022-12-28 04:22:26.572 PMerrorsomething went wrong: java.net.NoRouteToHostException: No route to host (Host unreachable)





Also screenshots of configuration.

I'm still new to Hubitat and read as much as I can to learn. I have a gate with a Shelly 1 and also have a sensor to report open/close. Everything is good within the Shelly app. I've been working with the Shelly Device Handlers all week. For a long time contact was not displaying a line. I finally have all of it showing in the app. But the state of the contact sensor does not change when I open the gate. Does anyone see anything in the screen shot I need to change. I'm feeling like I'm so close.

Looks like a network issue.... is the hub and shelly device on same network subnet ?

does a refresh in the driver page change the state?

I've read everything you have posted on the subject and it was a great help to get me this far. The hub and Shelly are on the same subnet. I have refresh after changing the state of the gate. Everything works as expected within the Shelly app. I'm just not updating the device in hubitat.

Something is blocking it... hub says no route to host.... so you got some weird setting in your router that isnt allowing access to other device on that subnet.

Hi,

Any thoughts on what the issue could be?

Thanks

All sorted. Issue with my network name. Thanks

1 Like

@Evilborg

Can you help me make sense of the energy reporting? From the app, I see 2.7 kWh of usage for a Shelly 1PM for today.

Looking at the JSON from the "/status" page, I see:

"meters":[{"power":389.58,"overpower":0.00,"is_valid":true,"timestamp":1673805603,"counters":[388.931, 388.849, 152.441],"total":237693}]

So, two fold:

  1. Is reporting the total as watts in the driver correct? I think watts would be (power_total / 100) and to get kWh (for use in calculating energy costs would be (power_total/100000).

  2. If I take 2702.23 (app CSV download total from below) and subtract 2376.93 (power "total" reported by the device), I get ~325.3 wh difference. Any ideas on the disparity?


I dont understand it either. This is something you need to ask the Shelly people directly.

Thanks for the quick reply. Not gonna lie, I completely glazed over the first post :laughing:. I shot them a message on the Books of Faces.

1 Like

According to this: API Reference

power is instantaneous active power in watts. If you want it in kW, divide by 1000. Keep in mind that this is not real power if you are driving a reactive load.

total is total energy used since last reboot, in watt-minutes. If you want it in kWh, divide by 60,000.

They must be doing some accumulation per day and calculating the daily energy based on that. You could do that by adding up power usage throughout the day and multiplying times the elapsed time. Or just rebooting the Shelly at precisely midnight. :wink:

EDIT: I would guess they are using the energy timestamp and last 3 minutes values to keep a running total of energy usage. I don't see anything in their API that reports a running total for the day directly.

1 Like

That's it and the link helps a ton. Probably should've thought to check it earlier (there's a daggum link inside the driver page).

This is all for getting it to work with my energy cost app where I'm expecting a kWh value. I'm doing similar to what I presume they are. I'm setting the energy value at the start of the day to a variable and using that as a reference point to get energy use for today. I'm also storing the last value to compare to the current value to get the change amount between readings for calculating cost (to account for differing costs throughout the day). I have some logic in there to account for a reset.

1 Like