Shelly devices 'announce' and 'update_fw'

Moderator: leecollings

Post Reply
thomasbaetge
Posts: 153
Joined: Wednesday 02 October 2019 11:47
Target OS: Linux
Domoticz version: 2023.1
Location: DE / BY / LT
Contact:

Shelly devices 'announce' and 'update_fw'

Post by thomasbaetge »

for those of you, who use a lot of shellies and may be not aware:

there's 2 endpoints in shelly devices for MQTT as stated in the title.
'announce' will give you a status update of all your shellies within your network, along with an indicator, if there is a firmware update (may not work for battery driven devices that are asleep).
'update_fw' will do exactly what it says :)

it is the easiest Node-Red flow ever:

Code: Select all

[
    {
        "id": "f97b9afc9b8c3c01",
        "type": "tab",
        "label": "Flow 6",
        "disabled": false,
        "info": ""
    },
    {
        "id": "3c61bc45b929e1dd",
        "type": "inject",
        "z": "f97b9afc9b8c3c01",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "announce",
        "payloadType": "str",
        "x": 150,
        "y": 180,
        "wires": [
            [
                "f4b27693b1e2a13d"
            ]
        ]
    },
    {
        "id": "f4b27693b1e2a13d",
        "type": "mqtt out",
        "z": "f97b9afc9b8c3c01",
        "name": "",
        "topic": "shellies/command",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "efc9f8538719bafa",
        "x": 410,
        "y": 180,
        "wires": []
    },
    {
        "id": "2dc591a421530271",
        "type": "mqtt in",
        "z": "f97b9afc9b8c3c01",
        "name": "",
        "topic": "shellies/announce",
        "qos": "2",
        "datatype": "auto",
        "broker": "efc9f8538719bafa",
        "nl": false,
        "rap": true,
        "rh": 0,
        "x": 160,
        "y": 260,
        "wires": [
            [
                "362d77999649021d"
            ]
        ]
    },
    {
        "id": "0177b987a4e90989",
        "type": "debug",
        "z": "f97b9afc9b8c3c01",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 550,
        "y": 260,
        "wires": []
    },
    {
        "id": "362d77999649021d",
        "type": "json",
        "z": "f97b9afc9b8c3c01",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 350,
        "y": 260,
        "wires": [
            [
                "0177b987a4e90989"
            ]
        ]
    },
    {
        "id": "b022019d43adc03d",
        "type": "inject",
        "z": "f97b9afc9b8c3c01",
        "name": "update_fw",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "update_fw",
        "payloadType": "str",
        "x": 150,
        "y": 120,
        "wires": [
            [
                "f4b27693b1e2a13d"
            ]
        ]
    },
    {
        "id": "efc9f8538719bafa",
        "type": "mqtt-broker",
        "name": "",
        "broker": "192.168.2.40",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    }
]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests