Open roofburner opened 1 month ago
Show me please your device script (Scripts section in the device web panel) and the payloads that the device sends to the MQTT broker.
TCPDump (PCAP - shelly.zip) attached. Hope this helps. Or can you explain me how to get hands on the payload? shelly.zip
This is what the script looks like:
Script name: shellies_discovery_gen2_script_20240216
Script
let topic_prefix = null;
let installed_version = null;
Shelly.call("MQTT.GetConfig", {}, function (config) {
topic_prefix = config.topic_prefix;
});
function SendDeviceStatus() {
let _device_info = Shelly.getDeviceInfo();
installed_version = _device_info.ver;
Shelly.call("Shelly.GetStatus", {}, function (status) {
status.sys.installed_version = installed_version;
MQTT.publish(topic_prefix + "/status/rpc", JSON.stringify(status));
});
};
MQTT.setConnectHandler(SendDeviceStatus);
let UpdateTimer = Timer.set(1800000, true, SendDeviceStatus);
Or can you explain me how to get hands on the payload?
I meant a screenshot from MQTT Explorer (launch MQTT Explorer, wait 10 minutes and take a screenshot).
OK. I will provide you a screenshot asap.
I checked the script code and it does not contain JSON paths like those in your errors:
value_json.result.sys.available_updates.stable
value_json.result.mqtt.connected
The script uses those paths:
value_json.sys.available_updates.stable
value_json.mqtt.connected
So the source of the errors is not Shellies Discovery Gen2.
You can find the cause of errors by searching in MQTT Explorer if MQTT Discovery was used to configure the device
This is the filtered tree view:
192.168.0.102
>homeassistant
>>binary_sensor
>>>shellyplus1-a8032ab7fbb0-firmware
>>>config = {"name": "ShellyGarage Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-a8032ab7fbb0-firmware", "qos": 0, "dev": {"cns": [["mac", "A8:03:2A:B7:FB:B0"]], "name": "ShellyGarage", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Robotics", "…
>>>shellyplus1-a8032abafd1c-firmware
>>>config = {"name": "ShellyTuinhuis Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-a8032abafd1c-firmware", "qos": 0, "dev": {"cns": [["mac", "A8:03:2A:BA:FD:1C"]], "name": "ShellyTuinhuis", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Robotics…
>>>shellyplus1-7c87ce58cb34-firmware
>>>config = {"name": "ShellyBadkamerDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-7c87ce58cb34-firmware", "qos": 0, "dev": {"cns": [["mac", "7C:87:CE:58:CB:34"]], "name": "ShellyBadkamerDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Ro…
>>>shellyplus1-7c87ce558428-firmware
>>>config = {"name": "ShellyDaanDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-7c87ce558428-firmware", "qos": 0, "dev": {"cns": [["mac", "7C:87:CE:55:84:28"]], "name": "ShellyDaanDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Robotics",…
>>>shellyplus1-3c610572c824-firmware
>>>config = {"name": "ShellyRienDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-3c610572c824-firmware", "qos": 0, "dev": {"cns": [["mac", "3C:61:05:72:C8:24"]], "name": "ShellyRienDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Robotics",…
>>>shellyplus1-7c87ce555ac0-firmware
>>>config = {"name": "ShellyZithoekRDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-7c87ce555ac0-firmware", "qos": 0, "dev": {"cns": [["mac", "7C:87:CE:55:5A:C0"]], "name": "ShellyZithoekRDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Ro…
>>>shellyplus1-7c87ce56475c-firmware
>>>config = {"name": "ShellyZithoekLDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-7c87ce56475c-firmware", "qos": 0, "dev": {"cns": [["mac", "7C:87:CE:56:47:5C"]], "name": "ShellyZithoekLDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Ro…
>>>shellyplus1-7c87ce55840c-firmware
>>>config = {"name": "ShellyPoort Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-7c87ce55840c-firmware", "qos": 0, "dev": {"cns": [["mac", "7C:87:CE:55:84:0C"]], "name": "ShellyPoort", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Robotics", "cu…
>>>shellyplus1-08b61fd12ac4-firmware
>>>config = {"name": "ShellyOntbijthoekDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-08b61fd12ac4-firmware", "qos": 0, "dev": {"cns": [["mac", "08:B6:1F:D1:2A:C4"]], "name": "ShellyOntbijthoekDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allte…
>>>shellyplus1-08b61fd0c2d8-firmware
>>>config = {"name": "ShellyLivingDBE Firmware", "val_tpl": "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}", "en": "true", "uniq_id": "shellyplus1-08b61fd0c2d8-firmware", "qos": 0, "dev": {"cns": [["mac", "08:B6:1F:D0:C2:D8"]], "name": "ShellyLivingDBE", "mdl": "Shelly Plus 1", "sw": "20240522-112837/1.3.2-g34c651b", "hw": "gen2 (SNSW-001X16EU)", "mf": "Allterco Roboti…
>>button
>>>shellyplus1-a8032ab7fbb0-update_firmware
>>>config = {"name": "ShellyGarage Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-a8032ab7fbb0\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-a8032ab7fbb0-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_templa…
>>>shellyplus1-a8032abafd1c-update_firmware
>>>config = {"name": "ShellyTuinhuis Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-a8032abafd1c\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-a8032abafd1c-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_temp…
>>>shellyplus1-7c87ce58cb34-update_firmware
>>>config = {"name": "ShellyBadkamerDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-7c87ce58cb34\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-7c87ce58cb34-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_t…
>>>shellyplus1-7c87ce558428-update_firmware
>>>config = {"name": "ShellyDaanDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-7c87ce558428\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-7c87ce558428-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_templ…
>>>shellyplus1-3c610572c824-update_firmware
>>>config = {"name": "ShellyRienDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-3c610572c824\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-3c610572c824-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_templ…
>>>shellyplus1-7c87ce555ac0-update_firmware
>>>config = {"name": "ShellyZithoekRDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-7c87ce555ac0\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-7c87ce555ac0-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_t…
>>>shellyplus1-7c87ce56475c-update_firmware
>>>config = {"name": "ShellyZithoekLDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-7c87ce56475c\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-7c87ce56475c-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_t…
>>>shellyplus1-7c87ce55840c-update_firmware
>>>config = {"name": "ShellyPoort Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-7c87ce55840c\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-7c87ce55840c-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_templat…
>>>shellyplus1-08b61fd12ac4-update_firmware
>>>config = {"name": "ShellyOntbijthoekDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-08b61fd12ac4\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-08b61fd12ac4-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "valu…
>>>shellyplus1-08b61fd0c2d8-update_firmware
>>>config = {"name": "ShellyLivingDBE Update Firmware", "cmd_t": "~rpc", "payload_press": "{\"id\":1,\"src\":\"shellyplus1-08b61fd0c2d8\",\"method\":\"Shelly.Update\",\"params\":{\"stage\":\"stable\"}}", "en": "true", "uniq_id": "shellyplus1-08b61fd0c2d8-update_firmware", "qos": 0, "avty": [{"topic": "~online", "payload_available": "true", "payload_not_available": "false"}, {"topic": "~status/rpc", "value_tem…
I'm getting the below kind of errors in my home-assistant.log
Versions:
Shellies Discovery GEN2 automation:
Shelly device MQTT settings:
Debug log:
debug.log