Beiträge von cheese-2402

    Hallo,

    folgender Aufbau: Ich habe einen Schalter und einen Bewegungsmelder, welche jeweils eine Lampe schalten.

    Ist es möglich, mit dem Shelly Plus 2PM jetzt über Script so zu schalten, wenn ich den Schalter auf EIN stelle, beide Ausgänge geschalten sind, wenn der Bewegungsmelder schaltet wird nur eine Lampe geschalten.

    Und kann ich in den Scripts abfragen, wenn der Schalter aktiviert ist, der Bewegungsmelder dann nicht übersteuert?

    Danke!

    So, hier mal mein aktueller Stand:

    ich habe mir als MQTT-Broker Mosquitto installiert auf dem Raspberry, danach den MQTT-Broker/Client in ioBroker und ihn auf Client gestellt. Danach habe ich NodeRed installiert. Der Umweg entstand, weil ich Fehler in Log hatte, der 1PM Plus scheint nicht so gut mit dem MQTT zu wollen. NodeRed hat sich mit Mosquitto nicht so verstanden, warum auch immer, ich konnte mich nicht verbinden. Darum wird der Status vom Shelly in einen Datenpunkt geschrieben, dann verarbeitet und in Datenpunkte gefüllt.

    Vielen Dank an 66er, der mir hier viel geholfen hat mit seinem HowTo

    Hier meine Lösung:

    pasted-from-clipboard.png

    smarthome-forum.eu/attachment/23992/

    Spoiler anzeigen

    [

    {

    "id": "d59e8c82.232ba",

    "type": "tab",

    "label": "1PMWaschmaschine",

    "disabled": false,

    "info": ""

    },

    {

    "id": "fc1dd408.680fd8",

    "type": "ioBroker in",

    "z": "d59e8c82.232ba",

    "name": "shellyplus1pm-a8032abe5cd0/events/rpc",

    "topic": "mqtt.0.shellyplus1pm-a8032abe5cd0.events.rpc",

    "payloadType": "value",

    "onlyack": "",

    "func": "all",

    "gap": "",

    "fireOnStart": "false",

    "x": 220,

    "y": 160,

    "wires": [

    [

    "db897396.bc968"

    ]

    ]

    },

    {

    "id": "db897396.bc968",

    "type": "json",

    "z": "d59e8c82.232ba",

    "name": "",

    "property": "payload",

    "action": "",

    "pretty": false,

    "x": 610,

    "y": 160,

    "wires": [

    [

    "17423992.bc75b6",

    "b82174fe.410788",

    "40159d9c.a019d4",

    "ffe2c755.671c98"

    ]

    ]

    },

    {

    "id": "17423992.bc75b6",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Switch",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.params[\"switch:0\"].output",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 810,

    "y": 160,

    "wires": [

    [

    "a9f7bae4.943768",

    "68ff5c7b.6bde44"

    ]

    ]

    },

    {

    "id": "b82174fe.410788",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Leistung",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.params[\"switch:0\"].apower",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 820,

    "y": 240,

    "wires": [

    [

    "89eeda60.f3e5c8",

    "b5905bba.378988"

    ]

    ]

    },

    {

    "id": "a9f7bae4.943768",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Switch",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1150,

    "y": 160,

    "wires": []

    },

    {

    "id": "89eeda60.f3e5c8",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Power",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1150,

    "y": 240,

    "wires": []

    },

    {

    "id": "66547287.c2de4c",

    "type": "ioBroker in",

    "z": "d59e8c82.232ba",

    "name": "shellyplus1pm-a8032abe5cd0/status/switch:0",

    "topic": "mqtt.0.shellyplus1pm-a8032abe5cd0.status.switch:0",

    "payloadType": "value",

    "onlyack": "",

    "func": "all",

    "gap": "",

    "fireOnStart": "false",

    "x": 230,

    "y": 420,

    "wires": [

    [

    "fd634e0d.9bac3"

    ]

    ]

    },

    {

    "id": "fd634e0d.9bac3",

    "type": "json",

    "z": "d59e8c82.232ba",

    "name": "",

    "property": "payload",

    "action": "",

    "pretty": false,

    "x": 610,

    "y": 420,

    "wires": [

    [

    "1924b781.0d7df8",

    "d0f96cd7.31576",

    "af28c50f.be5f68",

    "d2c6254e.94a508",

    "d39f4654.e69e18",

    "9b5dcab.82c3f38"

    ]

    ]

    },

    {

    "id": "1924b781.0d7df8",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Switch",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.output",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 810,

    "y": 420,

    "wires": [

    [

    "cee7d5f3.7d8518",

    "5c3eee9e.d84ba"

    ]

    ]

    },

    {

    "id": "d0f96cd7.31576",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 610,

    "y": 560,

    "wires": []

    },

    {

    "id": "cee7d5f3.7d8518",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Switch",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1150,

    "y": 420,

    "wires": []

    },

    {

    "id": "af28c50f.be5f68",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Voltage",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.voltage",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 820,

    "y": 520,

    "wires": [

    [

    "1ad15373.69678d",

    "865ed5d9.e158f8"

    ]

    ]

    },

    {

    "id": "1ad15373.69678d",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Voltage",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1160,

    "y": 520,

    "wires": []

    },

    {

    "id": "d2c6254e.94a508",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Leistung",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.apower",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 820,

    "y": 600,

    "wires": [

    [

    "d6be8e53.ca33a",

    "211c47f7.d706f8"

    ]

    ]

    },

    {

    "id": "d6be8e53.ca33a",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Power",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1150,

    "y": 600,

    "wires": []

    },

    {

    "id": "d39f4654.e69e18",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Temperatur",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.temperature.tC",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 830,

    "y": 680,

    "wires": [

    [

    "9abb8d7c.e55a3",

    "e864629e.64e1d"

    ]

    ]

    },

    {

    "id": "9abb8d7c.e55a3",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Temperatur",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1140,

    "y": 680,

    "wires": []

    },

    {

    "id": "5c3eee9e.d84ba",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 380,

    "wires": []

    },

    {

    "id": "865ed5d9.e158f8",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 480,

    "wires": []

    },

    {

    "id": "211c47f7.d706f8",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": true,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 560,

    "wires": []

    },

    {

    "id": "e864629e.64e1d",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 640,

    "wires": []

    },

    {

    "id": "9b5dcab.82c3f38",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Energy",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.aenergy.total",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 820,

    "y": 760,

    "wires": [

    [

    "18d0d518.26fbeb",

    "8811cf7e.3f836"

    ]

    ]

    },

    {

    "id": "18d0d518.26fbeb",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 720,

    "wires": []

    },

    {

    "id": "b5905bba.378988",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 200,

    "wires": []

    },

    {

    "id": "8811cf7e.3f836",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Energy",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1150,

    "y": 760,

    "wires": []

    },

    {

    "id": "68ff5c7b.6bde44",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 120,

    "wires": []

    },

    {

    "id": "40159d9c.a019d4",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "false",

    "statusVal": "",

    "statusType": "auto",

    "x": 830,

    "y": 60,

    "wires": []

    },

    {

    "id": "ffe2c755.671c98",

    "type": "change",

    "z": "d59e8c82.232ba",

    "name": "Ampere",

    "rules": [

    {

    "t": "set",

    "p": "payload",

    "pt": "msg",

    "to": "payload.params[\"switch:0\"].current",

    "tot": "msg"

    }

    ],

    "action": "",

    "property": "",

    "from": "",

    "to": "",

    "reg": false,

    "x": 820,

    "y": 320,

    "wires": [

    [

    "bf61fc09.a5739",

    "eee1924e.9301c"

    ]

    ]

    },

    {

    "id": "bf61fc09.a5739",

    "type": "ioBroker out",

    "z": "d59e8c82.232ba",

    "name": "",

    "topic": "0_userdata.0.ShellyWaschmaschine.Relay0.Ampere",

    "ack": "false",

    "autoCreate": "false",

    "stateName": "",

    "role": "",

    "payloadType": "",

    "readonly": "",

    "stateUnit": "",

    "stateMin": "",

    "stateMax": "",

    "x": 1160,

    "y": 320,

    "wires": []

    },

    {

    "id": "eee1924e.9301c",

    "type": "debug",

    "z": "d59e8c82.232ba",

    "name": "",

    "active": false,

    "tosidebar": true,

    "console": false,

    "tostatus": false,

    "complete": "payload",

    "targetType": "msg",

    "statusVal": "",

    "statusType": "auto",

    "x": 1030,

    "y": 280,

    "wires": []

    }

    ]

    Hallo,

    hab bisher alle 1PM per Coap in ioBroker eingebunden. Wollte gestern den 1PM Plus reinhängen, geht nur noch mit MQTT. Habs aber bisher nicht geschafft.

    Hat da wer vielleicht ne Step by Step Anleitung wie das geht? Hab bisher nix gefunden....

    Was ich bisher eingestellt habe bzw meine Umgebung:

    Raspberry 4b mit ioBroker, darauf den Shelly-Adapter der auf Coap und http hört und einen weiten Adapter shelly.1 der auf MQTT und http hört, Port 1883 ohne User oder Passwort

    Weiter hab ich noch den 1PM Plus am laufen, der MQTT aktiviert hat, ebenfalls auf 1883 spricht, Prefix ist "Waschen" und ebenfalls keinen Benutzer/Passwort, generic status Update ist eingeschaltet.

    Im ioBroker bekomm ich folgenden Fehler: Shelly Device unknown, configuration for Shelly device 192.168.178.72 (shellyplus1pm / shellyplus1pm-a8032abe5cd0 / undefined#a8032abe5cd0#1) for MQTT does not exist!

    Danke

    Cheese