openLuup: Shelly Bridge plugin
-
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?
-
Tried that last night both cleansession false and ture, no effect
I have posted the issue in the Eclypse forum.
-
Here's what I found with my Shellies (more to come, I have a couple more on the test bench, not already connected).
- Shelly 1PM seems OK. Ext temperatures are not mapped, but the variable is crated:
This should be easily mapped. I don't have humidity attached, but it's similar, looking at the docs.
- Shelly plug is not correctly mapped. Here's the announce payload:
{"id":"shelly-veraplug","model":"SHPLG-S","mac":"XXX","ip":"192.168.1.46","new_fw":true,"fw_ver":"20210323-105718/v1.10.1-gf276b51"}
It's mapped as a scene control, instead of a plug. Power variables are correctly saved.
As I've said, I have buttons, uni and EM on my test bench and I'll add them very soon, so I could help with code if necessary @akbooer .
- Shelly 1PM seems OK. Ext temperatures are not mapped, but the variable is crated:
-
Try v21.4.18 to see if the plug now works (it will create a separate child device.)
36/144