Shelly Binding

Hi Markus,

great work - i like the binding. using 2.5 M3

downloaded the other day snapshot.jar 75e52bf

using Shelly 2.5 for Roller Jalousie there are periodically messages


    2019-10-10 22:23:21.446 [INFO ] [helly.internal.handler.ShellyHandler] - Initializing device shellyswitch25-740144 (shellyswitch25-740144), type SHSW-25, Hardware: Rev: prod-2019-03, batch 1; Firmware: v1.5.3 / 20190822-102551 (1c2d4dd5)
    2019-10-10 22:23:21.555 [INFO ] [ng.shelly.internal.api.ShellyHttpApi] - Current settings for relay[0]: btn_on_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/0?type=btn_on/btn_off_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/0?type=btn_off, out_on_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/0?type=out_on, out_off_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/0?type=out_off, roller_open_url=, roller_stop_url=, roller_close_url=
    2019-10-10 22:23:22.740 [INFO ] [ng.shelly.internal.api.ShellyHttpApi] - Current settings for relay[1]: btn_on_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/1?type=btn_on/btn_off_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/1?type=btn_off, out_on_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/1?type=out_on, out_off_url=http://192.168.42.3:8080/shelly/event/shellyswitch25-740144/relay/1?type=out_off, roller_open_url=, roller_stop_url=, roller_close_url=
    2019-10-10 22:23:25.286 [INFO ] [helly.internal.handler.ShellyHandler] - Thing shellyswitch25-740144 successfully initialized.
    2019-10-10 22:25:55.530 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:26:06.120 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:26:56.034 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:27:06.744 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:27:56.602 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:28:07.295 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:28:57.188 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:29:07.877 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:29:57.764 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:30:08.456 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
    2019-10-10 22:30:58.273 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)

in addition there are some other flooding about handler:

2019-10-10 22:54:02.844 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel roller#control although the handler was already disposed.
2019-10-10 22:54:02.845 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel roller#rollerpos although the handler was already disposed.
2019-10-10 22:54:02.847 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel roller#lastDirection although the handler was already disposed.
2019-10-10 22:54:02.848 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel roller#stopReason although the handler was already disposed.
2019-10-10 22:54:02.849 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel roller#overtemp although the handler was already disposed.
2019-10-10 22:54:02.851 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#lastPower1 although the handler was already disposed.
2019-10-10 22:54:02.853 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#lastPower2 although the handler was already disposed.
2019-10-10 22:54:02.854 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#lastPower3 although the handler was already disposed.
2019-10-10 22:54:02.855 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#currentWatts although the handler was already disposed.
2019-10-10 22:54:02.857 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#totalKWH although the handler was already disposed.
2019-10-10 22:54:02.858 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly2-roller:55b74b tried updating channel meter#timestamp although the handler was already disposed.

same for shelly 1:

2019-10-10 22:54:59.535 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#lastPower1 although the handler was already disposed.

please check


danke, Peter

Wow!
now shelly discovered my printer:

2019-10-10 23:27:31.884 [INFO ] [discovery.ShellyDiscoveryParticipant] - ServiceInfo [ServiceInfoImpl@13224529 name: 'Photosmart 6520 series [5BFA4B]._printer._s

any idea?

Thats normal, as the binding starts a mDNS scan for services at port 80.
Nothing to worry about. This message will move to DEBUG or TRACE level whith the Binding release.

I have a question regarding sending multiple commands to Shelly 2.5 used for rollershutters:

I have a physical switch that is controlling multiple rollershutters. If I press the switch, all roller shutters are supposed to open, if I press it again, all shutters are supposed to close.

Now, I would like to be able to “change the direction” while the shutters are moving, meaning if the shutters are in the process of closing, and I press the button again, the shutters are then supposed to stop moving and then open again.

That works fine for my Fibaro Rollershutter devices. But with the Shellys, I get the message in the openhab log: “Roller is already moving, ignore command”.

Is that something that the binding forbids or is it the Shelly device itself? Can I change that somehow?

which debug level have you used? (DEBUG + TRACE)

which channel did you changed?
control (Shutter Control) or rollerpos (Position in %)

This message should only be shown if a channel operation is executed, but OH internal framework has disposed/unloaded a binding. Was this after a OH/bundle restart or something like that?

that’s normal, the results gets filtered if the Device name doesn’t start with “shelly”
I changed the level to DEBUG

No, this was implemented to avoid a double action when using the shutter control in PaperUI, which caused the roller to stop moving. Sometimes (depending how you click) it issued 2 commands in a row. I think this is an edge case and I could give yours a higher priority. The check will be removed with the next build so the command goes through.

1 Like

debug level: dont know. Using “./start.sh”

channel=“shelly:shelly2-roller:55b74b:roller#control”

Was this after a OH/bundle restart or something like that?

no, it’s periodically each minute all the day

2019-10-11 21:57:26.455 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2c71f8 tried updating channel meter#currentWatts although the handler was already disposed.
2019-10-11 21:57:26.457 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2c71f8 tried updating channel meter#lastPower1 although the handler was already disposed.
2019-10-11 21:57:26.458 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2c71f8 tried updating channel meter#lastPower2 although the handler was already disposed.
2019-10-11 21:57:26.460 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2c71f8 tried updating channel meter#lastPower3 although the handler was already disposed.
2019-10-11 21:57:26.461 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2c71f8 tried updating channel meter#timestamp although the handler was already disposed.
2019-10-11 21:57:26.463 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler tried updating its thing's properties although the handler was already disposed.
2019-10-11 21:57:30.813 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel relay#output although the handler was already disposed.
2019-10-11 21:57:30.814 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel relay#overpower although the handler was already disposed.
2019-10-11 21:57:30.815 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel relay#timerActive although the handler was already disposed.
2019-10-11 21:57:30.816 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel relay#autoOn although the handler was already disposed.
2019-10-11 21:57:30.818 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel relay#autoOff although the handler was already disposed.
2019-10-11 21:57:30.819 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel meter#currentWatts although the handler was already disposed.
2019-10-11 21:57:30.820 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel meter#lastPower1 although the handler was already disposed.
2019-10-11 21:57:30.821 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel meter#lastPower2 although the handler was already disposed.
2019-10-11 21:57:30.822 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel meter#lastPower3 although the handler was already disposed.
2019-10-11 21:57:30.823 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bdc7e tried updating channel meter#timestamp although the handler was already disposed.
2019-10-11 21:57:30.824 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler tried updating its thing's properties although the handler was already disposed.
2019-10-11 21:57:30.957 [WARN ] [helly.internal.handler.ShellyHandler] - shellyswitch25-740144: Unable to update status: Value must be between 0 and 100 (class java.lang.IllegalArgumentException)
2019-10-11 21:57:42.422 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel relay#output although the handler was already disposed.
2019-10-11 21:57:42.423 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel relay#overpower although the handler was already disposed.
2019-10-11 21:57:42.425 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel relay#timerActive although the handler was already disposed.
2019-10-11 21:57:42.426 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel relay#autoOn although the handler was already disposed.
2019-10-11 21:57:42.427 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel relay#autoOff although the handler was already disposed.
2019-10-11 21:57:42.429 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#currentWatts although the handler was already disposed.
2019-10-11 21:57:42.430 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#lastPower1 although the handler was already disposed.
2019-10-11 21:57:42.431 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#lastPower2 although the handler was already disposed.
2019-10-11 21:57:42.432 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#lastPower3 although the handler was already disposed.
2019-10-11 21:57:42.434 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler of thing shelly:shelly1:2bd856 tried updating channel meter#timestamp although the handler was already disposed.
2019-10-11 21:57:42.435 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyHandler tried updating its thing's properties although the handler was already disposed.

could you please try to delete the thing and re-discover

thanks for the reply. Did this : message flood of " although the handler was already disposed." is gone

My question is probably not completely related to the Shelly binding (which is awesome, that you for your work!) itself, but I’ll try anway: For Google Home to recognize rollershutters, I added the [“Blinds”] tag to my Fibaro Roller Shutter items like this:

Rollershutter Rollladen_EG_Esszimmer_Tuer "Rollladen Esszimmer [%d %%]" <rollershutter> (gRolllaedenEsszimmer) ["Blinds"] { channel="zwave:device:84f8a005:node4:blinds_control" }

Now I have added a few Shelly 2.5 which control my roller shutters. I added things and items via PaperUI. Now I am not sure how to add the tag to the item. It says “Blinds” in the category field in the items editor in PaperUI, but the shutters aren’t recognized by Google Home.

Does anyone know how to correctly add the Blinds tag? Or do I have to add the item via text files (and if so, how is that done with the Shelly binding?)?

Thanks in advance!

The only way by now to add tags to items created via PaperUI is through the REST Api.

I think HABmin could do that

Oddly, this is equivalent to <icon> in text config

Ah, ok.

Is there an example of how to configure Things and Items via text config files? I do prefer those over configuration via PaperUI. It’s just so much faster to change stuff etc. (yea, auto discovery is nice, but still I’d prefer text files). Thanks in advance.

How to configure Things and channels is binding dependent, so you’d need to more explicit.
How to configure Items you already know.

zwave binding is very reliant on device discovery for correct configuring, not best suited for text files.

As we are in the Shelly Binding thread I was actually talking about the Shelly Binding :slight_smile:

ok, @igi reminded me why we implemented that check: If you click the button the roller starts moving, if you click it again it stops for 1-2sec and then continuous moving in the same direction. That’s not good for the motor so I put in the check.

I changed the logic the following
when roller is moving (not stopped) and the requested direction is the same the command gets ignore
if the roller is moving and opposite direction is requested then the command goes through

1 Like

Thank you!

Do you have an example of how to set up things and items via text files? I would like to add the “Blinds” tag to my rollershutter items (so that they show up in Google Home), but it seems there is not way to add those if the items is created via PaperUI but via REST. Installing REST yesterday crashed my whole openHAB installation (I am now setting up fresh!), so I would actually like to set up the Shelly things and items via text files, if possible.

Not yet, I’m using the PaperUI approach and banned Alexa :slight_smile:
Maybe someone else could help?

did you checked HABmin?