openLuup: Shelly Bridge plugin
-
Hmm... should be. Both
SetTarget
andToggleState
actions are implemented.I haven't got any Shelly 1s but it works for the 2.5.
@akbooer
Here is the returned error
and when i toggle button on altui device i get this in log but no response on physical device.
2021-04-16 17:35:07.971 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=587647848&Timeout=60&MinimumDelay=1500&_=1618590331394 HTTP/1.1 tcp{client}: 0xf3280b98 2021-04-16 17:35:12.250 openLuup.server:: GET /data_request?id=action&output_format=json&DeviceNum=30005&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 HTTP/1.1 tcp{client}: 0xf32afcf8 2021-04-16 17:35:12.254 luup.call_action:: 30005.urn:upnp-org:serviceId:SwitchPower1.SetTarget 2021-04-16 17:35:12.255 luup.call_action:: action will be handled by parent: 46 2021-04-16 17:35:12.256 openLuup.server:: request completed (44 bytes, 1 chunks, 3 ms) tcp{client}: 0xf32afcf8 2021-04-16 17:35:14.492 openLuup.server:: GET /data_request?id=action&output_format=json&DeviceNum=30005&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0 HTTP/1.1 tcp{client}: 0xf32afcf8 2021-04-16 17:35:14.495 luup.call_action:: 30005.urn:upnp-org:serviceId:SwitchPower1.SetTarget 2021-04-16 17:35:14.497 luup.call_action:: action will be handled by parent: 46 2021-04-16 17:35:14.499 openLuup.server:: request completed (44 bytes, 1 chunks, 5 ms) tcp{client}: 0xf32afcf8 2021-04-16 17:35:15.497 openLuup.server:: request completed (3627 bytes, 1 chunks, 7566 ms) tcp{client}: 0xf345b938 2021-04-16 17:35:15.508 openLuup.server:: request completed (3627 bytes, 1 chunks, 7535 ms) tcp{client}: 0xf3280b98 2021-04-16 17:35:15.511 openLuup.io.server:: HTTP:3480 connection closed openLuup.server.receive closed tcp{client}: 0xf345b938 2021-04-16 17:35:15.519 openLuup.io.server:: HTTP:3480 connection from 192.168.1.10 tcp{client}: 0xf38161e8 2021-04-16 17:35:15.526 openLuup.server:: GET /data_request?id=status&DataVersion=587647852&Timeout=15&MinimumDelay=100&output_format=json&_r=1618590915513 HTTP/1.1 tcp{client}: 0xf38161e8 2021-04-16 17:35:15.651 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=587647852&Timeout=60&MinimumDelay=1500&_=1618590331395 HTTP/1.1 tcp{client}: 0xf3280b98 2021-04-16 17:35:20.890 openLuup.server:: GET /openLuup?page=log HTTP/1.1 tcp{client}: 0xf32afcf8
Does the fact that the devices are set to a broker that is bridged to openLuup have any bearing
P.S. where can we change the polling fequency?
-
Oh, you mean the Shelly devices themselves. This is on each individual Shelly device and related to :
Internet & Security > ADVANCED - DEVELOPER SETTINGS > MQTT > Keep Alive.
...but I'm not sure. I you make this longer, it will take londer for your devices to be discovered initially (but that doesn't really matter.) Updates should be effectively instant.
Edit: that increase in CPU doen't seem right. I can barely detect any difference... unless you are subscribed to everything (with, for example MQTT Explorer.) Even then it should be minimal.
-
HaDevice1 CommFailure 0 HaDevice1 Configured 0 HaDevice1 LastUpdate 2021-04-16 18:30:58 HaDevice1 PollMinDelay 60 HaDevice1 history graph PollingEnabled 0 SwitchPower1 Status 0 SwitchPower1 Target 0 93FC56 announce {"id":"shelly1-93FC56","model":"SHSW-1","mac":"BCDDC293FC56","ip":"192.168.1.100","new_fw":true,"fw... 93FC56 input/0 0 93FC56 input_event/0 {"event":"","event_cnt":0} 93FC56 online true 93FC56 relay/0 off
-
Ah, no, sorry. I meant specifically the announce message (first one after bridge starts up.)
-
OK, that's great, exactly what I needed. The latest development version v21.4.17 should have fixed this.
-
I totally understand the difficulty with out the device.
The variable target now updates to 1 or 0 depending if switch is on or off.
so
device state off and icon off
press on icon, icon flashes to on then back to off, the variable target updates to 1. Device does not respond
press icon again this time icon stay on, variable target stays at 1 . The devices does not respond.
press icon again this time icon stays at off, variable target updates to 0. The device does not respond.Status never changes form 0
when subscribed to shellies/shelly1-93FC56/rely/0
no messages are received when icon is pressed. -
@Elcid
I'm trying a different approach. Please delete any Shelly-1 devices and then update to 21.4.17b. This will force each Shelly-1 to have a parent device (of generic Shelly type) and a child device (binary light). Actions on the binary light should now work as expected, but, once again, I can't easily test it myself.