Shelly Binding

Please open a feature request here: Sign in to GitHub · GitHub, use prefix [shelly]

I have an idea how

  • support FQDN (hostname) resultion and
  • handling incoming CoAP messages based on MAC, not on IP

I plan to stick to device type and mac address of the device for discovery and event processing rather than the IP. This also removes the need of a static ip for the device, because the mac address serves as unique ID to identify things.

Shelly Vintage is not yet supported. Please open a feature request here: Sign in to GitHub · GitHub, use prefix [shelly]

Please include the output of /status and /settings.

Should be easy to support, because it’s very similar to Duo. Let’s see :slight_smile:

I’m getting a little confused…
With the new firmware (1.6) in the device there is no coap setting anymore…but there are 3 action urls.
Do those urls should be populated or not to use coap?

I tried to disable them, then make a change to the binding settings as stated above…but the binding keeps enabling them.

Edit: do I need also to disable at thing level “enable roller events” ?

Thanks for your patience.

Yes, the device has CoIoT enabled by default with FW 1.6x
You should also disable the events on thing level.

Ok…I did all the suggested things…but the action urls on my my shellies switch 2.5 keep on getting populated :pensive:

it’s here https://github.com/openhab/openhab-addons/issues/7468 Thanks for your help and this binding

go to binding settgins, turn off autoCoIoT, save
go to thing config, enable CoIoT events, disable all others, save
edit again, autoCoIoT=on, save
wait until thing is re-initialized
check urls

I’ve done everything but action URL on the devices are still there…
So I’ve manually disabled the action urls and try to change just the admin user in the binding configuration to trigger inizialization…all action urls get re-populated.

edit: just to be clear…I’m using the binding in the paper ui, not a downloaded jar. (openhab 2.5.4)

is that a roller? Due to the fact that the roller open/stop/closed events are not populated by Coap I auto-activate those when Auto-CoIoT is enabled.

Anyways, you see no URLs in the device if you turn Auto-CoIoT off in the binding config, enable CoIoT events in the thing config and disable all others.

Hi Markus,
after updating to 2.5.4-1 I don’t get longpush events anymore :frowning:

The use case

The Shelly1’s button input is connected to a classical PIR moting detector and a momentary switch in parallel. The reason for that is, that I can distinguish between shortpush (==momentary switch pushed/light triggered manually/AutoOFF timer of the Shelly is used) and ‘longpush’ (==the PIR has detected motion/light was triggered automatically/AutoOFF timer of the PIR is used).

This works without any processing at openHAB. But I do want to have at least the ‘longpush’ events for other automation stuff of course :wink:

Anyway… As I said, I don’t get the ‘longpush’ events anymore…

What I did so far

  1. Changing thing config to just use CoIoT

Thing shelly:shelly1:pir "Shelly am Bewegungsmelder" @ "Eingang " [ deviceIp="192.168.x.y", eventsCoIoT=true ]

  1. Then I followed your hint regarding CoIoT for existing setups
  1. Then I even restarted openhab…

The issue

When “shortpushing” the button, the relay switches and the relay item gets updated immediately as expected:

2020-04-28 10:29:42.391 [vent.ItemStateChangedEvent] - ShellyPir_relay changed from OFF to ON
2020-04-28 10:29:44.523 [vent.ItemStateChangedEvent] - ShellyPir_relay changed from ON to OFF

Since all action url’s are empty, I assume CoIoT is working in general.

…but:

When I do a longpush at the Shelly, it starts reporting some other values (rssi, uptime) and does not switch the relay as intended/configured. But the ‘longpush’ event is missing:

2020-04-28 09:52:03.281 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 1763 to 1797
2020-04-28 09:52:24.470 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 1797 to 1818
2020-04-28 09:52:27.643 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 1818 to 1821
2020-04-28 09:52:27.653 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 2 to 1
2020-04-28 09:52:30.821 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 1821 to 1824
2020-04-28 09:52:30.828 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 1 to 2

What am I doing wrong? Do you have some advise how to make it working again?

Setup information

Shelly button contig:


That’s the rule to be triggered:

rule "PIR Event bearbeiten"
when
    Channel "shelly:shelly1:pir:relay#button" triggered LONG_PRESSED
then
    logInfo("SHELLY-PIR", "Bewegung im Eingangsbereich erkannt")
    ...
end

The items:

Group  gShellyPir               "Dauerlicht Eingang"
Switch ShellyPir_relay          "Strahler Dauerlicht [%s]"  (gShellyPir)    {channel="shelly:shelly1:pir:relay#output"}
Number ShellyPir_offTimer       "Eingang [%d]"                              {channel="shelly:shelly1:pir:relay#autoOff"}
Number ShellyPir_uptime         "Laufzeit [%d s]"           (gShellyPir)    {channel="shelly:shelly1:pir:device#uptime"}
Number ShellyPir_rssi           "Signalstärke [%d]"         (gShellyPir)    {channel="shelly:shelly1:pir:device#wifiSignal"}

The Shelly is on latest firmware 1.6.2:

The current Firmware version of your Shelly device is 20200320-123430/v1.6.2

EDIT: UPDATE/Workaround

Since I get the relay#button channel updated reliably, I decided to make some workaround and “measure” the duration between relay#button==ON and relay#button==OFF.
If this duration is longer than my desired LONG PUSH TIME, I’m going to trigger my action, see:

Additional items:

Switch ShellyPir_button         "Schalteingang"         {channel="shelly:shelly1:pir:relay#input"}

// A dummy item to indictate if the ON was longer than 4 seconds ago:
Switch ShellyPir_button_timer   "Longpush timer         {expire="4s, state=OFF"}

Changed rule:

rule "Longpress erkennen"
when
        Item ShellyPir_button received update
then
        // "Start" the timer by posting ON to the dummy item:
        if ( newState == ON ) ShellyPir_button_timer.postUpdate( ON)
        else if ( ShellyPir_button_timer.state == OFF ) {
                // Dummy timer item is OFF again yet , so "long_pressed" was detected...
                logInfo("SHELLY-PIR", "Bewegung im Eingangsbereich erkannt")
                ...  <doing some stuff> ...
        }
end

So this will work for me for now. The short_push switches the local relay in the Shelly and the long_push caused by the PIR get detected by openHAB and can trigger some action.

But having the LONG_PRESSED trigger event available again would make it easier…

I have a question related to the Shelly 2.5.
I would like to trigger an action at the moment the Shelly reports overtemperature (or even better, some moments before it is switching off).

Which item I have to monitor Alarm or device#internaltemperature? If Alarm, what are the triggers - ON, OFF or specific values?

I have not seen anything in the manual for this specific behavior.

Thanks in advance.

longpush should be supported by REST and CoAP. The relay has to be in momentary switch mode. Old firmware release have a bug and send longpush even when relay is in edge mode. Therefor the binding checks the button mode and filters longpush ehen not in momentary or detached mode.

Why is the 2nd checkbox enabled? From my understanding this exactly says “DON’T activate the button if LONG PUSHED”. What happens if you removed the check mark?

Anyways: I could check the log, but you need to enable DEBUG/TRACE mode, then we could see in detail what happens.

Check the README, alarms trigger the device#alarm channel, you can catch those with a rule like:

rule "Shelly Alarm"
when
    Channel "shelly:shelly1:XXXXXX:device#alarm" triggered
then
    val alarm = receivedEvent.toString();
    logInfo("Shelly", "n alarm condition was detected:" + alarm)
    switch (alarm) {
        case "RESTARTED"
        case "POWERON"
            ...
            break;
        case "OVER_TEMP":
        case "OVER_LOAD":
        case "OVER_TEMP":
        case "LOAD_ERROR":
            ...
            break;
        case "WEAK_SIGNAL":
            break;
     }
end

replace channel name by the you specific one (check PaperUI, use the copy to clipboard function for the correct alarm channel).

You could also do

when
    Channel "shelly:shelly1:XXXXXX:device#alarm" triggered OVER_TEMP
then

checke here for channel based triggers. README section “Events / Alarms” lists the possible trigger values.

Thanks Markus for looking into it :+1:

Yes, the button is in momentary mode, and “Don’t activate…if long pushed” is checked…

Could it be, that you filter out the events although in momentary mode but because of the second checkbox?

No, that’s not the case :wink:

It’s rather a really nice feature added recently.
It brings the option to distinguish between shortpush for local switching and longpush for some additional function to be triggered at openHAB without switching the local relay(s).

This feature simply prevents the local output (the relay) been switched when a longpush has happend.
To switch the relay, you have to shortpush the button.

So it’s similar to detached mode but for longpush only:

  • shortpush → switch local relay output directly
  • longpush → report to openHAB but don’t touch the relay output

It worked with action urls in 2.5.3 and firmware 1.6.0/1.6.2 before.

Sure. I’m going to get some trace information tomorrow to report back…
And: Thanks again for you work on this!

Hi Markus,
as promised, here are the logs… :wink:

First log was taken with with “Dont activate … longpushed” set to disabled, longpush time was set to 2000ms.:

“button-on” at 11:12:15.013
“button-off” at 11:12:20.998
see:

2020-05-03 11:12:11.295 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:12:11.299 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:12:11.374 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504332,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":14835}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40184,"fs_size":233681,"fs_free":153863,"uptime":87133}

2020-05-03 11:12:11.381 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:12:11.385 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:12:11.461 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-74},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504332,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":14834}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40012,"fs_size":233681,"fs_free":153863,"uptime":87133}

2020-05-03 11:12:11.472 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 87133 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:12:11.480 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 87112 to 87133

2020-05-03 11:12:14.964 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24033): {"G":[[0,112,0],[0,118,1]]}

2020-05-03 11:12:14.968 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,1]]}

2020-05-03 11:12:14.972 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:12:14.976 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:12:14.980 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:12:14.987 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with ON (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-03 11:12:14.995 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#output updated with OFF (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-03 11:12:14.999 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 channels updated from CoIoT status

2020-05-03 11:12:15.013 [vent.ItemStateChangedEvent] - ShellyPir_button changed from OFF to ON

2020-05-03 11:12:15.020 [vent.ItemStateChangedEvent] - ShellyPir_relay changed from ON to OFF

2020-05-03 11:12:16.176 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from OFF to ON

2020-05-03 11:12:16.964 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24034): {"G":[[0,112,0],[0,118,2]]}

2020-05-03 11:12:16.966 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,2]]}

2020-05-03 11:12:16.970 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:12:16.974 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:12:16.976 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:12:17.480 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:12:17.484 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:12:17.557 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504338,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39924,"fs_size":233681,"fs_free":153863,"uptime":87139}

2020-05-03 11:12:17.561 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:12:17.564 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:12:17.633 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504338,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39928,"fs_size":233681,"fs_free":153863,"uptime":87139}

2020-05-03 11:12:17.643 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 87139 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:12:17.648 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 1 more updates requested

2020-05-03 11:12:17.651 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 87133 to 87139

2020-05-03 11:12:20.655 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:12:20.658 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:12:20.729 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504341,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39924,"fs_size":233681,"fs_free":153863,"uptime":87143}

2020-05-03 11:12:20.735 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:12:20.740 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:12:20.813 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504341,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39760,"fs_size":233681,"fs_free":153863,"uptime":87143}

2020-05-03 11:12:20.827 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 87143 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:12:20.833 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-03 11:12:20.836 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 87139 to 87143

2020-05-03 11:12:20.998 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from ON to OFF

2020-05-03 11:12:21.018 [INFO ] [se.smarthome.model.script.SHELLY-PIR] - Bewegung im Eingangsbereich erkannt

2020-05-03 11:12:24.806 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24035): {"G":[[0,112,0],[0,118,0]]}

2020-05-03 11:12:24.809 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,0]]}

2020-05-03 11:12:24.812 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:12:24.815 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:12:24.819 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:12:24.826 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with OFF (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-03 11:12:24.829 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

2020-05-03 11:12:24.835 [vent.ItemStateChangedEvent] - ShellyPir_button changed from ON to OFF

2020-05-03 11:12:26.839 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:12:26.844 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:12:26.916 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-77},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504347,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39920,"fs_size":233681,"fs_free":153863,"uptime":87149}

2020-05-03 11:12:26.921 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:12:26.925 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:12:26.995 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-74},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:12","unixtime":1588504347,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39760,"fs_size":233681,"fs_free":153863,"uptime":87149}

2020-05-03 11:12:27.014 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 87143 to 87149

2020-05-03 11:12:27.009 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 87149 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:12:27.024 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

Now the test with “Don’t activate …” enabled, longpush time still on 2000ms:

“button-on” at 11:27:56.014
“button-off” at 11:28:03.402
see:

2020-05-03 11:27:55.975 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24097): {"G":[[0,112,0],[0,118,1]]}

2020-05-03 11:27:55.983 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,1]]}

2020-05-03 11:27:55.987 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:27:55.991 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:27:55.995 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:27:56.002 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with ON (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-03 11:27:56.006 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

2020-05-03 11:27:56.014 [vent.ItemStateChangedEvent] - ShellyPir_button changed from OFF to ON

2020-05-03 11:27:56.052 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from OFF to ON

2020-05-03 11:27:57.027 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:27:57.031 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:27:57.142 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-86},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:27","unixtime":1588505277,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40224,"fs_size":233681,"fs_free":153863,"uptime":88079}

2020-05-03 11:27:57.147 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:27:57.151 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:27:57.257 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-85},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:27","unixtime":1588505277,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40216,"fs_size":233681,"fs_free":153863,"uptime":88079}

2020-05-03 11:27:57.266 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 88079 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:27:57.271 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#wifiSignal updated with 1 (type class org.eclipse.smarthome.core.library.types.DecimalType).

2020-05-03 11:27:57.275 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 88037 to 88079

2020-05-03 11:27:57.275 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-03 11:27:57.283 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 2 to 1

2020-05-03 11:27:58.002 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24098): {"G":[[0,112,0],[0,118,2]]}

2020-05-03 11:27:58.006 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,2]]}

2020-05-03 11:27:58.012 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:27:58.015 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:27:58.023 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:28:00.277 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:28:00.281 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:28:00.319 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from ON to OFF

2020-05-03 11:28:00.355 [INFO ] [se.smarthome.model.script.SHELLY-PIR] - Bewegung im Eingangsbereich erkannt

2020-05-03 11:28:00.362 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-84},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505280,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40096,"fs_size":233681,"fs_free":153863,"uptime":88082}

2020-05-03 11:28:00.367 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:28:00.371 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:28:00.454 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-84},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505281,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39916,"fs_size":233681,"fs_free":153863,"uptime":88082}

2020-05-03 11:28:00.468 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 88082 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:28:00.473 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-03 11:28:00.483 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 88079 to 88082

2020-05-03 11:28:03.369 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=24099): {"G":[[0,112,0],[0,118,0]]}

2020-05-03 11:28:03.373 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,0]]}

2020-05-03 11:28:03.378 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-03 11:28:03.382 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-03 11:28:03.387 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:28:03.397 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with OFF (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-03 11:28:03.402 [vent.ItemStateChangedEvent] - ShellyPir_button changed from ON to OFF

2020-05-03 11:28:03.404 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

2020-05-03 11:28:03.476 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:28:03.481 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:28:03.553 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-74},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505284,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39888,"fs_size":233681,"fs_free":153863,"uptime":88085}

2020-05-03 11:28:03.564 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:28:03.571 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:28:03.648 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-74},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505284,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39712,"fs_size":233681,"fs_free":153863,"uptime":88085}

2020-05-03 11:28:03.661 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 88085 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:28:03.667 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#wifiSignal updated with 2 (type class org.eclipse.smarthome.core.library.types.DecimalType).

2020-05-03 11:28:03.673 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 88082 to 88085

2020-05-03 11:28:03.673 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-03 11:28:03.683 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 1 to 2

2020-05-03 11:28:15.677 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-03 11:28:15.682 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-03 11:28:15.776 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-74},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505296,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40264,"fs_size":233681,"fs_free":153863,"uptime":88098}

2020-05-03 11:28:15.782 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-03 11:28:15.786 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-03 11:28:15.857 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"11:28","unixtime":1588505296,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40084,"fs_size":233681,"fs_free":153863,"uptime":88098}

2020-05-03 11:28:15.872 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 88098 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-03 11:28:15.882 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 88085 to 88098

BTW: When filtering the log (containing both tests from above) for “longpush”, I find this:

2020-05-03 11:12:14.980 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:12:16.976 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:12:24.819 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:27:55.995 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:27:58.023 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-03 11:28:03.387 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

Does the lines with Value=2.0 (at 11:12:16.976 and at 11:27:58.023) indicate a “longpush” event has been sent by CoIoT from Shelly to us? If so, it would make sense, since this is roughly 2 secs after the according button-on.

Again just for reference: This is the current thing configuration:
Thing shelly:shelly1:pir "Bewegungsmelder" @ "somewhere" [ deviceIp="192.168.9.11", eventsCoIoT=true ]

Does this gives you a hint, why the binding is not generating a “LONG_PRESSED” anymore?

ok, I checked the code. Should work, but…
I uploaded a new build, which decodes all 3 states (off/short/long) and logs the results. Please make sure to delete 2.5.4 before adding 2.5.5 jar.


This build also doesn’t overrule the setting for the roller events when autoCoIoT is enabled. So you could disable them in the Thing config.

1 Like

hi Guys

I tried to create a Shelly HT widget for the HABPanel. Now I wanted to create the battery and the wifi signal with dynamic icons.
grafik
It worked wonderfully with the WiFi signal, but I haven’t found a solution for the battery yet.
The battery level is shown with 100.0%, I suspect that the% sign is added to the binding.
Therefore I can make small <= or> = inquiries. Is that correct?
Has anyone already requested something there?

Thx for your help

Here is my code (Quick and Dirty, I know)

<!--Shelly HT-->
<div class="row">
    <div class="col-lg-6"><span><widget-icon iconset="'smarthome-set'" icon="'temperature'" size="45"/></span></div>
    <div class="col-lg-6"><span><widget-icon iconset="'smarthome-set'" icon="'drop'" size="45"/></span></div>   
 </div>
  </br>
<div class="row">
    <div class="col-lg-6"><span style="color: red; font-size: 12pt">{{itemValue(config.Temperature)}}</span></div>
    <div class="col-lg-6"><span style="color: cyan; font-size: 12pt">{{itemValue(config.Humidity)}}</span></div>
</div> 
</br>
</br>
</br>
<div class="row">
  <div class="col-lg-6"><span style="color: ORANGE; font-size: 6pt"></span></div>
  	<div class="col-lg-3"><span ><widget-icon iconset="'freepik-gadgets'" icon="'battery-charge-poles'" size="25" /></span></div> 
  <td>
    <div ng-if="itemValue(config.RF_Signal_item)==4">
    	<div class="col-lg-3"><span><widget-icon iconset="'eclipse-smarthome-classic'" icon="'qualityofservice-0'" size="25"/></span></div>  
    </div> 
     <div ng-if="itemValue(config.RF_Signal_item)==3">
    	<div class="col-lg-3"><span><widget-icon iconset="'eclipse-smarthome-classic'" icon="'qualityofservice-1'" size="25"/></span></div>  
    </div>
     <div ng-if="itemValue(config.RF_Signal_item)==2">
    	<div class="col-lg-3"><span><widget-icon iconset="'eclipse-smarthome-classic'" icon="'qualityofservice-2'" size="25"/></span></div>  
    </div>
    <div ng-if="itemValue(config.RF_Signal_item)==1">
    	<div class="col-lg-3"><span><widget-icon iconset="'eclipse-smarthome-classic'" icon="'qualityofservice-3'" size="25"/></span></div>  
    </div>
    <div ng-if="itemValue(config.RF_Signal_item)==0">
    	<div class="col-lg-3"><span><widget-icon iconset="'eclipse-smarthome-classic'" icon="'qualityofservice-4'" size="25"/></span></div>  
    </div>
	</td>
   
</div>
<div class="row">
  <div class="col-lg-6"><span style="color: ORANGE; font-size: 7pt"></span></div>
	<div class="col-lg-3"><span style="color: ORANGE; font-size: 6pt">{{itemValue(config.Battery_item)}}</span></div>
  <div class="col-lg-3"><span style="color: ORANGE; font-size: 6pt">{{itemValue(config.RF_Signal_item)}}</span></div>
</div> 


What’s the actual value of battery? Which value is shown by PaperUI?
You need to differ between the value (of type Number) and the unit (%). If you process this as a Number you should get a Number, not the % sign. This happens when you convert it to a string.

A small tip:
you code simplify the code to the select image if you use a pattern icon="‘qualityofservice-<RF_Signal_ite>’


I would be very interested to create a set of HABpanel widgets for Shelly, e.g. a roller control, a power meter, a temp/humidity widget for the 1/1PM addon. My HTML/CSS knowledge is very limited.

Thanks Markus,
I took the new *.jar to my addons and repeated the same long-push tests as before.
These are the results:

First the log with “Don’t active … if longpushed” enabled:

2020-05-04 20:31:56.269 [vent.ItemStateChangedEvent] - ShellyPir_button changed from OFF to ON

2020-05-04 20:31:56.269 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

2020-05-04 20:31:56.297 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from OFF to ON

2020-05-04 20:31:58.212 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32080): {"G":[[0,112,1],[0,118,2]]}

2020-05-04 20:31:58.216 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,1],[0,118,2]]}

2020-05-04 20:31:58.221 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-04 20:31:58.225 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=1.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-04 20:31:58.229 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:31:58.233 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Coap update for button, typemomentary_on_release

2020-05-04 20:31:59.089 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-04 20:31:59.099 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-04 20:31:59.190 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-69},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:31","unixtime":1588624319,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16090}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40184,"fs_size":233681,"fs_free":153863,"uptime":207117}

2020-05-04 20:31:59.198 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-04 20:31:59.204 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-04 20:31:59.287 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-69},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:31","unixtime":1588624319,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16090}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40008,"fs_size":233681,"fs_free":153863,"uptime":207117}

2020-05-04 20:31:59.300 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207117 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-04 20:31:59.310 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207060 to 207117

2020-05-04 20:31:59.313 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#wifiSignal updated with 3 (type class org.eclipse.smarthome.core.library.types.DecimalType).

2020-05-04 20:31:59.319 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 1 more updates requested

2020-05-04 20:31:59.328 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 2 to 3

2020-05-04 20:32:01.027 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from ON to OFF

2020-05-04 20:32:01.049 [INFO ] [se.smarthome.model.script.SHELLY-PIR] - Bewegung im Eingangsbereich erkannt

2020-05-04 20:32:02.323 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-04 20:32:02.327 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-04 20:32:02.411 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-71},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:32","unixtime":1588624322,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16087}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39852,"fs_size":233681,"fs_free":153863,"uptime":207120}

2020-05-04 20:32:02.417 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-04 20:32:02.420 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-04 20:32:02.495 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-71},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:32","unixtime":1588624323,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16087}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39676,"fs_size":233681,"fs_free":153863,"uptime":207121}

2020-05-04 20:32:02.505 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207120 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-04 20:32:02.513 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207117 to 207120

2020-05-04 20:32:02.518 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#wifiSignal updated with 2 (type class org.eclipse.smarthome.core.library.types.DecimalType).

2020-05-04 20:32:02.527 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-04 20:32:02.527 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 3 to 2

2020-05-04 20:32:03.489 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32081): {"G":[[0,112,1],[0,118,0]]}

2020-05-04 20:32:03.493 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,1],[0,118,0]]}

2020-05-04 20:32:03.497 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

2020-05-04 20:32:03.501 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=1.0 (State, Type=S, Range=0/1, Link=0: Relay0)

2020-05-04 20:32:03.504 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:32:03.508 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Coap update for button, typemomentary_on_release

2020-05-04 20:32:03.514 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with OFF (type class org.eclipse.smarthome.core.library.types.OnOffType).

2020-05-04 20:32:03.523 [vent.ItemStateChangedEvent] - ShellyPir_button changed from ON to OFF

2020-05-04 20:32:03.521 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

2020-05-04 20:32:05.530 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

2020-05-04 20:32:05.533 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

2020-05-04 20:32:05.607 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:32","unixtime":1588624326,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16084}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39856,"fs_size":233681,"fs_free":153863,"uptime":207124}

2020-05-04 20:32:05.611 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

2020-05-04 20:32:05.615 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

2020-05-04 20:32:05.691 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-75},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:32","unixtime":1588624326,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":true, "has_timer":true, "timer_remaining":16084}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39676,"fs_size":233681,"fs_free":153863,"uptime":207124}

2020-05-04 20:32:05.703 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207124 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

2020-05-04 20:32:05.708 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207120 to 207124

2020-05-04 20:32:05.707 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

2020-05-04 20:32:18.590 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32082): {"G":[[0,112,1],[0,118,0]]}

2020-05-04 20:32:18.594 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Serial 52736 was already processed, ignore update

2020-05-04 20:32:33.591 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32083): {"G":[[0,112,1],[0,118,0]]}

2020-05-04 20:32:33.595 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Serial 52736 was already processed, ignore update

And the same with “Don’t active … if longpushed” disabled:

    2020-05-04 20:35:16.348 [vent.ItemStateChangedEvent] - ShellyPir_button changed from OFF to ON

    2020-05-04 20:35:16.351 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 channels updated from CoIoT status

    2020-05-04 20:35:16.360 [vent.ItemStateChangedEvent] - ShellyPir_relay changed from ON to OFF

    2020-05-04 20:35:16.386 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from OFF to ON

    2020-05-04 20:35:18.307 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32095): {"G":[[0,112,0],[0,118,2]]}

    2020-05-04 20:35:18.311 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,2]]}

    2020-05-04 20:35:18.316 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

    2020-05-04 20:35:18.320 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

    2020-05-04 20:35:18.324 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

    2020-05-04 20:35:18.327 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Coap update for button, typemomentary_on_release

    2020-05-04 20:35:18.356 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

    2020-05-04 20:35:18.362 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

    2020-05-04 20:35:18.492 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-71},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624519,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40252,"fs_size":233681,"fs_free":153863,"uptime":207317}

    2020-05-04 20:35:18.498 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

    2020-05-04 20:35:18.504 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

    2020-05-04 20:35:18.582 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-71},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624519,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40084,"fs_size":233681,"fs_free":153863,"uptime":207317}

    2020-05-04 20:35:18.594 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207317 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

    2020-05-04 20:35:18.602 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207301 to 207317

    2020-05-04 20:35:18.602 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 1 more updates requested

    2020-05-04 20:35:21.084 [vent.ItemStateChangedEvent] - ShellyPir_button_timer changed from ON to OFF

    2020-05-04 20:35:21.105 [INFO ] [se.smarthome.model.script.SHELLY-PIR] - Bewegung im Eingangsbereich erkannt

    2020-05-04 20:35:21.605 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

    2020-05-04 20:35:21.608 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

    2020-05-04 20:35:21.686 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-71},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624522,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39924,"fs_size":233681,"fs_free":153863,"uptime":207320}

    2020-05-04 20:35:21.692 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

    2020-05-04 20:35:21.694 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

    2020-05-04 20:35:21.770 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-70},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624522,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":1}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39748,"fs_size":233681,"fs_free":153863,"uptime":207320}

    2020-05-04 20:35:21.781 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207320 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

    2020-05-04 20:35:21.788 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

    2020-05-04 20:35:21.790 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207317 to 207320

    2020-05-04 20:35:25.333 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32096): {"G":[[0,112,0],[0,118,0]]}

    2020-05-04 20:35:25.339 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Sensor data {"G":[[0,112,0],[0,118,0]]}

    2020-05-04 20:35:25.344 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 2 CoAP sensor updates received

    2020-05-04 20:35:25.350 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)

    2020-05-04 20:35:25.354 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

    2020-05-04 20:35:25.359 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Coap update for button, typemomentary_on_release

    2020-05-04 20:35:25.371 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel relay#input updated with OFF (type class org.eclipse.smarthome.core.library.types.OnOffType).

    2020-05-04 20:35:25.376 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: 1 channels updated from CoIoT status

    2020-05-04 20:35:25.383 [vent.ItemStateChangedEvent] - ShellyPir_button changed from ON to OFF

    2020-05-04 20:35:27.794 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

    2020-05-04 20:35:27.800 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

    2020-05-04 20:35:27.889 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624528,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39928,"fs_size":233681,"fs_free":153863,"uptime":207326}

    2020-05-04 20:35:27.894 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

    2020-05-04 20:35:27.897 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

    2020-05-04 20:35:27.997 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:35","unixtime":1588624528,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":39752,"fs_size":233681,"fs_free":153863,"uptime":207326}

    2020-05-04 20:35:28.006 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207326 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

    2020-05-04 20:35:28.012 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: 0 more updates requested

    2020-05-04 20:35:28.017 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207320 to 207326

    2020-05-04 20:35:40.337 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32097): {"G":[[0,112,0],[0,118,0]]}

    2020-05-04 20:35:40.341 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Serial 53504 was already processed, ignore update

    2020-05-04 20:35:55.368 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: CoIoT Message from /192.168.9.11:5683 (MID=32098): {"G":[[0,112,0],[0,118,0]]}

    2020-05-04 20:35:55.372 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir: Serial 53504 was already processed, ignore update

    2020-05-04 20:36:04.019 [TRACE] [y.internal.handler.ShellyBaseHandler] - shelly1-pir: Updating status

    2020-05-04 20:36:04.023 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status

    2020-05-04 20:36:04.108 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-80},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:36","unixtime":1588624564,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40264,"fs_size":233681,"fs_free":153863,"uptime":207362}

    2020-05-04 20:36:04.115 [TRACE] [.internal.handler.ShellyRelayHandler] - shelly1-pir: Updating 1 relay(s)

    2020-05-04 20:36:04.133 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP GET for http://192.168.9.11/status/relay/0

    2020-05-04 20:36:04.212 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shelly1-pir: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"LusImollSuTiF","ip":"192.168.9.11","rssi":-80},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"20:36","unixtime":1588624564,"serial":1,"has_update":false,"mac":"BCDDC29425C2","relays" :[{"ison":false, "has_timer":false, "timer_remaining":0}],"meters":[{"power":0.00,"is_valid":"true"}],"inputs":[{"input":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"update":{"status":"idle","has_update":false,"new_version":"20200320-123430/v1.6.2@514044b4","old_version":"20200320-123430/v1.6.2@514044b4"},"ram_total":50568,"ram_free":40088,"fs_size":233681,"fs_free":153863,"uptime":207362}

    2020-05-04 20:36:04.223 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#uptime updated with 207362 s (type class org.eclipse.smarthome.core.library.types.QuantityType).

    2020-05-04 20:36:04.234 [vent.ItemStateChangedEvent] - ShellyPir_uptime changed from 207326 to 207362

    2020-05-04 20:36:04.235 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly1-pir: Channel device#wifiSignal updated with 1 (type class org.eclipse.smarthome.core.library.types.DecimalType).

    2020-05-04 20:36:04.251 [vent.ItemStateChangedEvent] - ShellyPir_rssi changed from 2 to 1

When filtering for “longpush”, I still see just the same log lines:

2020-05-04 20:31:56.239 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:31:58.229 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:32:03.504 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:35:16.325 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:35:18.324 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

2020-05-04 20:35:25.354 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-pir:  Sensor value[1]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)

So for me it looks the same as before. There are lines probably indicating the detected longpush at the Shelly side and reported via Coap but not taken to generate the “LONG_PRESSED” event:

Sensor value[1]: id=118, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush)

Something else to check?

ok, they have a new button type momentary_on_release. I added that to the check. However, I won’t expect that thus button is used in both scenarios. Keep in mind: When you change the settings in the Web UI it could take up to a minute before OH refreshs the settings used for this check
please try the new build