openLuup: Shelly Bridge plugin
-
It's so hard to debug without the actual hardware. So the Shelly device itself does respond to the SetTarget, but the openLuup device doesn't update its status?
-
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. -
Bingo. That did it the devices now have a master and a slave and respond to actions.
Will setting the master invisible have any bad effects? -
No, shouldn't matter at all.
-
...or just put them in a different room.
-
@elcid said in openLuup: Shelly Bridge plugin:
Seems a luup reload breaks the devices
Can you exapnd on that?
You mean that they work in the session that they are created, but do a restart and they don't work (but are still there) ??
-
Yes. Noticed they stopped earlier so deleted and reloaded, nothing happened untill I restarted Mosquitto. So I kept an eye on them to see if they stopped again.
Then about 20 mins ago I was messing with the Tasmota's, so I did a reload and after that the shelly 1 stopped working (devices still in ui). So deleted them again and restart Mosquitto and then they reloaded.
-
I'm not seeing this, but, then again, I've not bridged to Mosquitto. What happens if you just restart Mosquitto? Is there anything shown in the log?
-
Restarting mosquitto this is in log
2021-04-17 20:59:14.986 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=687035184&Timeout=60&MinimumDelay=1500&_=1618687270165 HTTP/1.1 tcp{client}: 0xf5619c8 2021-04-17 20:59:21.613 openLuup.io.server:: MQTT:1884 connection closed tcp{client}: 0xfc60a48 2021-04-17 20:59:21.614 openLuup.mqtt:: RECEIVE ERROR: closed tcp{client}: 0xfc60a48 2021-04-17 20:59:21.616 openLuup.mqtt:: localhost.bridge-01 UNSUBSCRIBE from # tcp{client}: 0xfc60a48 2021-04-17 20:59:27.984 openLuup.io.server:: MQTT:1884 connection from 192.168.1.25 tcp{client}: 0xf096c288 2021-04-17 20:59:28.031 openLuup.mqtt:: localhost.bridge-01 SUBSCRIBE to # tcp{client}: 0xf096c288 2021-04-17 20:59:28.033 luup.variable_set:: 30001.shellyix3-front.online was: EMPTY now: true #hooks:0 2021-04-17 20:59:28.036 luup.variable_set:: 30007.shelly1-93BEFE.online was: EMPTY now: true #hooks:0 2021-04-17 20:59:28.056 luup.variable_set:: 30002.shelly1-93A847.online was: EMPTY now: true #hooks:0 2021-04-17 20:59:28.068 luup.variable_set:: 30005.shelly1-93FC56.online was: EMPTY now: true #hooks:0 2021-04-17 20:59:28.384 openLuup.server:: request completed (4780 bytes, 1 chunks, 13396 ms) tcp{client}: 0xf5619c8 2021-04-17 20:59:28.453 openLuup.server:: GET /data_request?id=user_data&output_format=json&DataVersion=687028312&_=1618687270166 HTTP/1.1 tcp{client}: 0xf5619c8 2021-04-17 20:59:28.931 openLuup.server:: request completed (766007 bytes, 48 chunks, 476 ms) tcp{client}: 0xf5619c8 2021-04-17 20:59:32.943 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 20:59:32.994 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=687035197&Timeout=60&MinimumDelay=1500&_=1618687270167 HTTP/1.1 tcp{client}: 0xf5619c8 2021-04-17 20:59:33.059 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 20:59:33.538 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 20:59:33.630 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 20:59:34.639 luup.variable_set:: 30004.shellyix3-rear.online was: EMPTY now: true #hooks:0 2021-04-17 20:59:34.763 openLuup.server:: request completed (3732 bytes, 1 chunks, 1767 ms) tcp{client}: 0xf5619c8 2021-04-17 20:59:34.813 openLuup.server:: GET /data_request?id=user_data&output_format=json&DataVersion=687028316&_=
Devices still work after mosquitto restart
Will now reload luup and double check If this does infact cause devices to fail.
-
reload luup devices have now failed
log2021-04-17 21:04:07.840 openLuup.scheduler:: [25] BroadLink-Mk2 device startup completed: status=true, msg=All OK, name=BroadLink_Mk2 2021-04-17 21:04:07.841 openLuup.scheduler:: [46] Shelly device startup 2021-04-17 21:04:07.841 luup.set_failure:: status = 0 2021-04-17 21:04:07.842 luup.variable_set:: 46.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: 0 now: 0 #hooks:0 2021-04-17 21:04:07.843 luup.variable_set:: 46.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: 0 now: 0 #hooks:0 2021-04-17 21:04:07.843 openLuup.scheduler:: [46] Shelly device startup completed: status=true, msg=OK, name=ShellyBridge 2021-04-17 21:04:07.844 openLuup.scheduler:: [47] Tasmota device startup 2021-04-17 21:04:07.844 luup.set_failure:: status = 0 2021-04-17 21:04:07.844 luup.variable_set:: 47.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: 0 now: 0 #hooks:0 2021-04-17 21:04:07.845 luup.variable_set:: 47.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: 0 now: 0 #hooks:0 2021-04-17 21:04:07.846 openLuup.scheduler:: [47] Tasmota device startup completed: status=true, msg=OK, name=TasmotaBridge 2021-04-17 21:04:07.847 luup_log:3: ALTUI: UPNPregisterDataProvider(3,Vera@192.168.1.11,http://127.0.0.1:3480/data_request?id=lr_HTTP_VeraBridgeMirror_192.168.1.11,[{
2021-04-17 21:04:21.212 openLuup.server:: request completed (835 bytes, 0 chunks, 0 ms) tcp{client}: 0xfc86dd0 2021-04-17 21:04:21.214 openLuup.server:: GET /luvd/D_GenericShellyDevice.xml HTTP/1.1 tcp{client}: 0xf37a830 2021-04-17 21:04:21.215 openLuup.server:: request completed (293 bytes, 0 chunks, 0 ms) tcp{client}: 0xf37a830 2021-04-17 21:04:21.217 openLuup.server:: GET /luvd/D_Reactor.xml HTTP/1.1 tcp{client}: 0xfe92080 2021-04-17 21:04:21.221 openLuup.server:: request completed (1156 bytes, 0 chunks, 0 ms) tcp{client}: 0xfe92080 2021-04-17 21:04:21.222 openLuup.server:: GET /luvd/D_ReactorSensor.xml HTTP/1.1 tcp{client}: 0xff353d8 2021-04-17 21:04:21.224 openLuup.server:: request completed (1572 bytes, 0 chunks, 0 ms) tcp{client}: 0xff353d8 2021-04-17 21:04:21.226 openLuup.server:: GET /luvd/D_DimmableRGBLight1.xml HTTP/1.1 tcp{client}: 0xfe940f8 2021-04-17 21:04:21.229 openLuup.server:: request completed (1507 bytes, 0 chunks, 0 ms) tcp{client}: 0xfe940f8 2021-04-17 21:04:21.253 openLuup.server:: GET /luvd/D_ShellyBridge.xml HTTP/1.1 tcp{client}: 0xfd25c78
will now restart mosquitto without deleting devices.
-
Restarting mosquitto brings devices back to life.
log
2021-04-17 21:09:39.969 openLuup.io.server:: MQTT:1884 connection closed tcp{client}: 0xff53448 2021-04-17 21:09:39.972 openLuup.mqtt:: RECEIVE ERROR: closed tcp{client}: 0xff53448 2021-04-17 21:09:39.973 openLuup.mqtt:: localhost.bridge-01 UNSUBSCRIBE from # tcp{client}: 0xff53448 2021-04-17 21:09:45.774 openLuup.io.server:: MQTT:1884 connection from 192.168.1.25 tcp{client}: 0xf527b20 2021-04-17 21:09:45.823 openLuup.mqtt:: localhost.bridge-01 SUBSCRIBE to # tcp{client}: 0xf527b20 2021-04-17 21:09:45.826 luup.shelly:46: New Shelly announced: shellyix3-rear 2021-04-17 21:09:45.827 luup.attr_set:: 30004.ip = 192.168.1.105 2021-04-17 21:09:45.828 luup.attr_set:: 30004.mac = E8DB84D6E80A 2021-04-17 21:09:45.829 luup.attr_set:: 30004.model = SHIX3-1 2021-04-17 21:09:45.829 luup.attr_set:: 30004.firmware = 20210413-154502/v1.10.2-gb89901a 2021-04-17 21:09:45.906 luup.shelly:46: New Shelly announced: shelly1-93A847 2021-04-17 21:09:45.907 luup.attr_set:: 30002.ip = 192.168.1.102 2021-04-17 21:09:45.908 luup.attr_set:: 30002.mac = BCDDC293A847 2021-04-17 21:09:45.908 luup.attr_set:: 30002.model = SHSW-1 2021-04-17 21:09:45.909 luup.attr_set:: 30002.firmware = 20210415-125832/v1.10.3-g23074d0 2021-04-17 21:09:46.040 luup.shelly:46: New Shelly announced: shelly1-93FC56 2021-04-17 21:09:46.041 luup.attr_set:: 30005.ip = 192.168.1.100 2021-04-17 21:09:46.042 luup.attr_set:: 30005.mac = BCDDC293FC56 2021-04-17 21:09:46.043 luup.attr_set:: 30005.model = SHSW-1 2021-04-17 21:09:46.043 luup.attr_set:: 30005.firmware = 20210415-125832/v1.10.3-g23074d0 2021-04-17 21:09:46.360 luup.shelly:46: New Shelly announced: shellyix3-front 2021-04-17 21:09:46.361 luup.attr_set:: 30001.ip = 192.168.1.106 2021-04-17 21:09:46.362 luup.attr_set:: 30001.mac = E8DB84D6C6C8 2021-04-17 21:09:46.363 luup.attr_set:: 30001.model = SHIX3-1 2021-04-17 21:09:46.363 luup.attr_set:: 30001.firmware = 20210413-154502/v1.10.2-gb89901a 2021-04-17 21:09:51.275 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 21:09:51.594 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 21:09:51.647 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 21:09:51.936 luup.tasmota:47: JSON error: Expected value but found invalid token at character 1 2021-04-17 21:09:54.170 luup.shelly:46: New Shelly announced: shelly1-93BEFE 2021-04-17 21:09:54.171 luup.attr_set:: 30007.ip = 192.168.1.101 2021-04-17 21:09:54.172 luup.attr_set:: 30007.mac = BCDDC293BEFE 2021-04-17 21:09:54.172 luup.attr_set:: 30007.model = SHSW-1 2021-04-17 21:09:54.173 luup.attr_set:: 30007.firmware = 20210415-125832/v1.10.3-g23074d0 2021-04-17 21:10:00.117 luup_log:0: 13Mb, 0.8%cpu, 0.0days
-
so this does seem to be something to do with bridging with Mosquitto, rather than anything else...
Is it just that you've recently noticed this, or did a recent update break this, I wonder?
-
Did not notice as the variables in the I3's are not as easy to notice as a switch moving position
i can return to previous version and check if you wish, what should i type instead of development is it 21.4.17?
-
No, don't try that yet. I need to think rather than just react. I reboot all the time and the Shellies just keep on working.
-
I was thinking that the bridge may be starting a new clean session when open luup reconnects after a reload, maybe that's an issue.
-
This setting should make no difference to the openLuup MQTT server, since it keeps noothing but the basic session info. However, it may make a difference to Mosquitto.
-
OK Mosquitto reports bridge disconnect and 5 seconds later reconnects, when i reload luup.
I then power off 1 device and back on, Mosquitto reports device already connected,closing connection then new client shelly device and ip.
back in AltUI the device i power cycled is working , all other still not.
-
It seems that this is related to the CLEAN SESSION flag. Can you configure Mosquitto to set that flag?
32/144