Shelly Binding

No, nothing in the logs…

1 Like

hmm. When I add a Shelly Button 1 thing, there is no button trigger channel.
Can you make a screenshot from all channels?

The status#lastUpdate or device#heartBeat is also only receiving an update after some minutes. The General Update Interval is set to 900 (default)

try this rule and make sure that btnname is replaced with the correct value.
After saving, have a look in the log file if the rule is loaded.

rule "Test Alarm Shelly"
when
	Channel "shelly:shellybutton1:btnname:status#button" triggered or
	Channel "shelly:shellybutton1:btnname:device#alarm" triggered 
then
	logInfo("Test Alarm Shelly", "receivedEvent: '{}'",receivedEvent)
end

then restart the device. when it is coming up, do you see an event “restarted”

which version of openhab are you on?

  • rule is loaded
  • btnname is replaced correctly
  • no event in logs when restarting the device through the shelly button webui
  • openHAB 3.1.0

When I hit the save button in the Thing (without changing anything), I do get some updates of my items:

2021-12-06 01:04:12.763 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shellybtnshellybutton198cdac2daddb192168024_Uptime' changed from 262 s to 295 s
2021-12-06 01:04:12.782 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shellybtnshellybutton198cdac2daddb192168024_LastHeartbeat' changed from 2021-12-06T01:03:39.000+0100 to 2021-12-06T01:04:12.000+0100
2021-12-06 01:04:14.811 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shellybtnshellybutton198cdac2daddb192168024_LastHeartbeat' changed from 2021-12-06T01:04:12.000+0100 to 2021-12-06T01:04:14.000+0100
2021-12-06 01:04:14.813 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shellybtnshellybutton198cdac2daddb192168024_Uptime' changed from 295 s to 298 s
2021-12-06 01:04:14.846 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shellybtnshellybutton198cdac2daddb192168024_LastUpdate' changed from 2021-12-06T01:03:39.000+0100 to 2021-12-06T01:04:14.000+0100

Maybe updating your shelly binding to latest dev version?
I know there have been issues with triggers in the past, especially with button1.
Not sure if that helps.

I have orderd my Thermostat from shelly today.
So Markus, I hope that you quick also get a sample, to started development for the binding.
Let’s Cross the fingers that is will ready soon.

Br
Jochen

Ordered one as well :wink:

Dito
Hopefully Shelly Smoke 2 will be announced soon, too.

@markus7017 adding a +1 for the support of the Shelly1 Plus in Openhab. This would be awesome!
Many thanks,
Dan

Are you in a routed network? Try to go into the Shelly Web UI:Settings:COAP and set the IP address to the OH IP. I assume that device triggers the update, because the binding doesn‘t get the network packet. This could also happen when using docker

me too: +1 for Plus/Pro support
I already received the pre-final version of the devices incl TRV and 1/1PM/2/2PM Pro, but this real work, because the device api has changed

Stay tuned

I don’t have any COAP settings in the webui of the shelly button. I am running openhab in Docker, will move back to a Raspberry as soon as I migrated everything from 2.x

try a plain OH setup on the RPi

Can we support you? Is there anything we can do?

just a matter of time

I tried it on my old OH 2.x setup, no luck, but probably because of the old binding.

I noticed another thing, it reports SHBTN-2 instead of SHBTN-1

coapDeviceDescr:
{"blk":[{"I":1,"D":"sensor_0"},{"I":2,"D":"device"}],"sen":[{"I":9103,"T":"EVC","D":"cfgChanged","R":"U16","L":2},{"I":2102,"T":"EV","D":"inputEvent","R":["S/L/SS/SSS",""],"L":1},{"I":2103,"T":"EVC","D":"inputEventCnt","R":"U16","L":1},{"I":3115,"T":"S","D":"sensorError","R":"0/1","L":1},{"I":3112,"T":"S","D":"charger","R":["0/1","-1"],"L":2},{"I":3111,"T":"B","D":"battery","R":["0/100","-1"],"L":2},{"I":9102,"T":"EV","D":"wakeupEvent","R":["battery/button/periodic/poweron/sensor/ext_power","unknown"],"L":2}]}

Is there a channel available for the Button-Type Setting of a Shelly-Relay?

I have a light, that is triggered by a motion-sensor attached to SW1. Between 9 PM and 6 AM the motion-sensor should not trigger the light anymore. I thought the easiest way to do this would be to change button-mode to detached after 9 PM and set it back to ‘Activation Switch’ at 6 AM.

Is that possible?

Kindest regards,
Christian…

Hey Markus,
after adding a new Shelly RGBW2 I get the following error message. However, the thing is being created and is online.

2021-12-11 18:27:58.635 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.StackOverflowError: null
	at java.net.URI$Parser.scan(URI.java:3059) ~[?:?]
	at java.net.URI$Parser.scanIPv4Address(URI.java:3353) ~[?:?]
	at java.net.URI$Parser.parseIPv4Address(URI.java:3393) ~[?:?]
	at java.net.URI$Parser.parseServer(URI.java:3295) ~[?:?]
	at java.net.URI$Parser.parseAuthority(URI.java:3216) ~[?:?]
	at java.net.URI$Parser.parseHierarchical(URI.java:3158) ~[?:?]
	at java.net.URI$Parser.parse(URI.java:3114) ~[?:?]
	at java.net.URI.<init>(URI.java:600) ~[?:?]
	at java.net.URI.create(URI.java:881) ~[?:?]
	at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:453) ~[?:?]
	at org.openhab.binding.shelly.internal.api.ShellyHttpApi.innerRequest(ShellyHttpApi.java:579) ~[?:?]
	at org.openhab.binding.shelly.internal.api.ShellyHttpApi.request(ShellyHttpApi.java:551) ~[?:?]
	at org.openhab.binding.shelly.internal.api.ShellyHttpApi.callApi(ShellyHttpApi.java:541) ~[?:?]
	at org.openhab.binding.shelly.internal.api.ShellyHttpApi.getCoIoTDescription(ShellyHttpApi.java:255) ~[?:?]
	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.discover(ShellyCoapHandler.java:550) ~[?:?]
	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.handleDeviceDescription(ShellyCoapHandler.java:358) ~[?:?]
	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.discover(ShellyCoapHandler.java:553) ~[?:?]
	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.handleDeviceDescription(ShellyCoapHandler.java:358) ~[?:?]
	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.discover(ShellyCoapHandler.java:553) ~[?:?]

the last line is being repeated over hundreds of pages.
In shelly manger not all the details are available.

deleting and readding does not solve the problem.
Furthermore, this device is triggered by a rule. As of today I also note, that my CPU usage is in average at 380%.
Binding version: 3.2M5

EDIT: there is definitely something wrong.
restarting OH: CPU usage goes up to 150% after a few minutes.
Disabling the newly created device: CPU usage stays the same
restarting OH and keeping thing disabled: CPU usage 2%

In theory yes, but why are you not implementing this handling in a rule?