NEWS
Anleitung/Use-Case: TFA Sensoren ohne Cloud in ioBroker
-
@bommelpage Hast du den Blockly auch zum importieren für mich? Danke
-
@sadir Statt debug output halt einen NummernDatenpunkt anlegen und den Wert dort reinschreiben
wie muss denn dann das Blockly aussehen, stehe da gerade auf dem Schlauch?
-
Im Grunde ist es mit dem Sonoff ganz einfach:
Adapter installieren, dann in der Config (/opt/maserver/config.json bei mir) den mqtt string auf den Endpunkt vom Sonoff setzen und "publish_type": "sonoff" setzen. den "sonoffPublish_prefix": "TFA_" hab ich bei mir gesetzt. Damit kommt dann vor der Sensor-ID noch TFA_.
Config Beispiel (opt/maserver/config.json):{ "localIPv4Address": null, "mqtt": "mqtt://192.168.1.1:8083", "mqtt_home": "MobileAlerts/", "mqtt_username": "user", "mqtt_password": "password", "publish_type": "sonoff", "sonoffPublish_prefix": "TFA_", "logfile": "./MobileAlerts.log", "logGatewayInfo": true, "proxyServerPort": 8080, "mobileAlertsCloudForward": false, "serverPost": null, "serverPostUser": null, "serverPostPassword": null, "locale": "en-US" }
Für einen meiner Temperatursensoren ergibt sich dann zum Beispiel folgender Pfad:
sonoff.0.TFA_015e320cefc6.STATE.temperature.0
Bei Fragen, gern melden.
-
@sadir bin jetzt soweit das die Werte im Log stehen, welchen Blokly nehme ich um die Werte in mein Nummern Datenpunkt zu schreiben, meiner heißt "Sensor1"? Danke
-
@sadir : Ein Vorteil des Setups mit Sonoff-Adapter ist halt, dass die Struktur immer gleich bleibt und man mit einem Script alle Sensoren abfragen kann bzw. auf deren Werte reagieren kann, auch ohne, dass man irgendetwas manuell machen muss.
Man kann also beliebig Sensoren hinzufügen, ohne die Notwendigkeit einer Anpassung und hat immer eine saubere Struktur mit allen Daten direkt vom mobile alerts gateway gegliedert nach Sensor. -
@great-sun Danke, werde es gleich mal testen.
-
Der Vollständigkeit halber ein vollständiger Beispielauszug aus dem ioBroker Object-Tree:
{ "sonoff.0.TFA_015e320cefc6": { "_id": "sonoff.0.TFA_015e320cefc6", "common": { "name": "TFA_015e320cefc6", "desc": "" }, "native": { "clientId": "TFA_015e320cefc6" }, "type": "channel", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186651, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.battery": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.battery", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 STATE battery" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467744, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.id": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.id", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 STATE id" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467736, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.offline": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.offline", "common": { "role": "value", "read": true, "write": false, "type": "boolean", "name": "TFA_015e320cefc6 STATE offline" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467745, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.t": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.t", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 STATE t" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467738, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.temperature.0": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.temperature.0", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 STATE.temperature 0" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467726, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.temperature.1": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.temperature.1", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 STATE.temperature 1" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467729, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.temperatureExt.0": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.temperatureExt.0", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 STATE.temperatureExt 0" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467732, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.temperatureExt.1": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.temperatureExt.1", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 STATE.temperatureExt 1" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467734, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.ut": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.ut", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 STATE ut" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467740, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.STATE.utms": { "_id": "sonoff.0.TFA_015e320cefc6.STATE.utms", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 STATE utms" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1695478467742, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.alive": { "_id": "sonoff.0.TFA_015e320cefc6.alive", "common": { "type": "boolean", "role": "indicator.reachable", "read": true, "write": false, "name": "TFA_015e320cefc6 alive" }, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186654, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.battery": { "_id": "sonoff.0.TFA_015e320cefc6.battery", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 battery" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186726, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.id": { "_id": "sonoff.0.TFA_015e320cefc6.id", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 id" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186720, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.offline": { "_id": "sonoff.0.TFA_015e320cefc6.offline", "common": { "role": "value", "read": true, "write": false, "type": "boolean", "name": "TFA_015e320cefc6 offline" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186727, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.t": { "_id": "sonoff.0.TFA_015e320cefc6.t", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 t" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186721, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.temperatureExt_0": { "_id": "sonoff.0.TFA_015e320cefc6.temperatureExt_0", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 temperatureExt 0" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186717, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.temperatureExt_1": { "_id": "sonoff.0.TFA_015e320cefc6.temperatureExt_1", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 temperatureExt 1" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186719, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.temperature_0": { "_id": "sonoff.0.TFA_015e320cefc6.temperature_0", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 temperature 0" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186714, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.temperature_1": { "_id": "sonoff.0.TFA_015e320cefc6.temperature_1", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 temperature 1" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186716, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.ut": { "_id": "sonoff.0.TFA_015e320cefc6.ut", "common": { "role": "value", "read": true, "write": false, "type": "number", "name": "TFA_015e320cefc6 ut" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186723, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, "sonoff.0.TFA_015e320cefc6.utms": { "_id": "sonoff.0.TFA_015e320cefc6.utms", "common": { "role": "value", "read": true, "write": false, "type": "string", "name": "TFA_015e320cefc6 utms" }, "native": {}, "type": "state", "from": "system.adapter.sonoff.0", "user": "system.user.admin", "ts": 1694989186725, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } } }
-
@great-sun Danke, heißt das aber wenn ich die Config datei so ändere das der Sonof adapter läuft der Mqtt Adapter dann nicht mehr richtig läuft oder habe ich da einen Denkfehler?
-
@great-sun said in Anleitung/Use-Case: TFA Sensoren ohne Cloud in ioBroker:
den mqtt string
wo finde ich den?
-
@sadir Du gehst auf der Admin-Oberfläche auf Instanzen, dann suchst den Sonoff-Adapter und clickst auf das Einstellungen Symbol. Direkt auf der ersten Seite steht der Port.
-
@great-sun
Ich benutze den Regensensor von mobile Alerts.
Unter dem Sonoff Adapter gibt er mir Werte aus die ich nicht vestehe.
Dort steht eventCounter und eventTimes_0 bis eventTimes_8
Was bedeuten die Werte?