Shelly Device Handlers for Hubitat

I've just added a Shelly Plus Uni and the the driver picked up the Uni as soon as I added the IP.

I'm using the Uni monitor a 12V supply and I can see the voltage when accessing the Uni via it's web interface. Is there a way to get this driver to display the voltage measurement? I would like to use this info in some rules.

The voltage is showing up as Null

Thanks.

Could you post your logs in debug mode?

And component a list from the root device page data/attributes section at the bottom?

(There's probably some issue. Let's fix it! :grin:)

Screenshots are below. I do not have a component list. I pressed poll and refresh to generate the logs. Thanks for taking a look at this.


What driver have you installed?
Component list is specific to my driver. It appears after pressing 'Configure' button and shows what device functions driver can see. Later based on this list specialized child devices are spawned.

The Shelly Plus driver from the first post of this thread.

Ahh... That's another driver. I don't know if it has ShellyPlusUni support. It should be compatible for 'switch' functionality. But unlikely it has voltage readings support.

(More specifically it reads voltage from 'switch' channels if available, but not from inputs)

The voltage shows up on both switch channels in the Web interface. but I don't know if that means anything. I'm going to reload your driver (I have the code) and post what you asked for. When I last tried your driver it didn't what to talk to the Uni.

Here is what I get when I save the Uni IP address and hit configure. I tried pressing connect and others to but it didn't seem to find the Uni.

I have no component list.

This is what I get when selecting debug logs and press configure

Oh. That one should be fixed in the latest version
There were an issue with type casing when debug logging is enabled. Basically debug log were blocking 'configuration'

The applied change is
logDebug(componentMap) -> logDebug(componentMap.toString())

at line 302

After configuration you should get 3 input child devices with the following attributes
attribute("frequency", "NUMBER")
attribute("frequencyEvaluated", "NUMBER")
attribute("level", "NUMBER")
attribute("levelEvaluated", "NUMBER")
attribute("pulses", "NUMBER")
attribute("pulsesEvaluated", "NUMBER")

I just downloaded the bundle.zip file. Will reimporting the .zip file make the correction?

Yes.
It is the way to update)

I will updated it now since my line 302 is not the same as your reference.

It's fixed on August, 3

I now have the children. Voltage is showing 0.0 in the 2 switch children. I'm working to grab some logs and screenshots. Moving to the laptop I think they will be easier to read

1 Like

Here are the screenshots of the components and logs.

Summary

Components

Logs











1 Like

Ok. It detected most of the features.

You have
input 0 - (configurable) switch
input 1 - (digital) switch
input 2 - (counter) pulse counter

They are intact with documentation. Input 0 can be configured as analog input (voltage meter) in the devices setting. Right now it is set to 'digital' or 'switch' mode

Voltmeter as a separate component is not yet implemented. But I now have logs and will add it.. Well.. Maybe in a few hours.. I guess..

In a mean time you can try to change 'input 0' settings to report voltage trough it.
It should support:
switch
button
analog
count

I will take a look. Thanks!

This doesn't appear to be possible on this device. My options for input (0) are switch or button. I couldn't find anything else in the settings to change this to read voltage unless I have the device set-up incorrectly. This is extremely possible as laymen documentation for the device was sparse when I was setting it up.

Thanks again for looking at this.

Driver is updated with the initial 'voltmeter' support.

After configuration a new child device should be spawned corresponding to "voltmeter:101"

It currently does not take into account the result of expression evaluation (device veature). Only raw reading is reported.

To support evaluated reading a custom child device is needed (with an extra attribute)

This will also affect/extend ShellyPlus addon module support as it is also using voltmeter component instances

[and a typo quick fix]

Unfortunately, the new device wasn't spawned. I even deleted and set-up the device again.

I have to leave but will grab some logs this evening and post them.