NEWS
[Frage] Gardena Smart System (Mähroboter, Bewässerung)
-
Hallo,
bei mir liest der Adapter zwar alle States meines Gardena Water Control aus, aber ich kann keine States schalten.
Sollte das schon gehen?
In Github liest es so aus, als wenn das noch nicht gehen könnte, weil dem Entwickler die Geräte zum testen fehlen?!
Kann man hierbei unterstützen?!?
Gruß Dennis
-
Hallo,
auch ich versuche meine Gardena Smart Komponenten (Mähroboter Smart Sileno City und den Smart Power Adapter) einzubinden.
Ich war mit dem Gardena Adapter etwas überfordert und habe mir parallel erst mal einen Node-Red Flow geschrieben.
Der funktioniert soweit für den Mähroboter, leider habe ich die Befehle zum Schalten des Smart Power-Adapters noch nicht rausgefunden.
Falls es jemanden interessiert, hier der Node-red Flow:
[ { "id": "6196e1fa.d45458", "type": "tab", "label": "Gardena Smart Test", "disabled": false, "info": "" }, { "id": "4aceeaa1.67b294", "type": "inject", "z": "6196e1fa.d45458", "name": "Alle 30 Minuten", "topic": "", "payload": "", "payloadType": "date", "repeat": "1800", "crontab": "", "once": true, "onceDelay": "", "x": 170, "y": 160, "wires": [ [ "eafc90a5.120a18" ] ] }, { "id": "eafc90a5.120a18", "type": "function", "z": "6196e1fa.d45458", "name": "Anmeldung", "func": "// email und password eingeben\n\n\nmsg.payload = {\n \"sessions\": {\n \"email\": \"xxxxxx\",\n \"password\": \"yyyyy\",\n \"refresh\":\"30\",\n \"sessionTimeout\":\"60\"\n }\n};\n\nmsg.headers = {\n Accept: \"application/json\"\n};\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 350, "y": 160, "wires": [ [ "30579d39.443c02" ] ] }, { "id": "30579d39.443c02", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "obj", "url": "https://sg-api.dss.husqvarnagroup.net/sg-1/sessions", "tls": "", "x": 650, "y": 160, "wires": [ [ "d50bbd55.7614a8" ] ] }, { "id": "d50bbd55.7614a8", "type": "function", "z": "6196e1fa.d45458", "name": "Session Token und User ID", "func": "global.set(\"token\", msg.payload.sessions.token);\nglobal.set(\"user_id\", msg.payload.sessions.user_id);\n\nvar mytoken = global.get(\"token\"); \nvar myuserid = global.get(\"user_id\"); \n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/locations/?user_id=\" + myuserid;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 400, "y": 260, "wires": [ [ "403f23aa.3f1154" ] ] }, { "id": "403f23aa.3f1154", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "GET", "ret": "obj", "url": "", "tls": "", "x": 650, "y": 260, "wires": [ [ "41ef289b.b46998" ] ] }, { "id": "41ef289b.b46998", "type": "function", "z": "6196e1fa.d45458", "name": "Location ID", "func": "global.set(\"location\", msg.payload[\"locations\"][0][\"id\"]);\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 350, "y": 320, "wires": [ [ "b1b1d745.b17d98" ] ] }, { "id": "af52cada.e8e9", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "GET", "ret": "obj", "url": "", "tls": "", "x": 630, "y": 380, "wires": [ [ "7d4ca598.7c208c", "59ff5d3a.ccb2ac" ] ] }, { "id": "aaa55c5f.51274", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 920, "wires": [ [ "9f0b36b9.b96a7" ] ] }, { "id": "9f0b36b9.b96a7", "type": "function", "z": "6196e1fa.d45458", "name": "Parken bis zum nächsten Zeitplan", "func": "var mower = global.get(\"mower\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\":\"park_until_next_timer\"\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + mower + \"/abilities/mower/command?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 460, "y": 920, "wires": [ [ "8685b6b6.c541e8" ] ] }, { "id": "8685b6b6.c541e8", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 920, "wires": [ [ "e8371e8d.d5ae88" ] ] }, { "id": "8df76892.fdcc7", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 1000, "wires": [ [ "bc8437be.d38e38" ] ] }, { "id": "bc8437be.d38e38", "type": "function", "z": "6196e1fa.d45458", "name": "Parken und Zeitplan pausieren", "func": "var mower = global.get(\"mower\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\": \"park_until_further_notice\"\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + mower + \"/abilities/mower/command?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 450, "y": 1000, "wires": [ [ "210f3d17.50d8d2" ] ] }, { "id": "f84c6e6d.2847f", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 1080, "wires": [ [ "1f59bef7.068c49" ] ] }, { "id": "1f59bef7.068c49", "type": "function", "z": "6196e1fa.d45458", "name": "Starten und Zeitpläne fortsetzen", "func": "var mower = global.get(\"mower\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\": \"start_resume_schedule\"\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + mower + \"/abilities/mower/command?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 450, "y": 1080, "wires": [ [ "edbaf63f.a2336" ] ] }, { "id": "edbaf63f.a2336", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 1080, "wires": [ [ "83679876.36a7a" ] ] }, { "id": "4adb20be.76e49", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 1160, "wires": [ [ "7ef70fc7.b788d" ] ] }, { "id": "7ef70fc7.b788d", "type": "function", "z": "6196e1fa.d45458", "name": "24 Stunden lang mähen", "func": "var mower = global.get(\"mower\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\": \"start_override_timer\",\n \"parameters\": { \"duration\": 1440 }\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + mower + \"/abilities/mower/command?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 430, "y": 1160, "wires": [ [ "d5535604.6429a8" ] ] }, { "id": "d5535604.6429a8", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 1160, "wires": [ [ "5fca5bc4.128f1c" ] ] }, { "id": "e84daab1.ed651", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 1240, "wires": [ [ "127f1615.4fd0aa" ] ] }, { "id": "127f1615.4fd0aa", "type": "function", "z": "6196e1fa.d45458", "name": "3 Tage mähen", "func": "var mower = global.get(\"mower\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\": \"start_override_timer\",\n \"parameters\": { \"duration\": 4320 }\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + mower + \"/abilities/mower/command?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 400, "y": 1240, "wires": [ [ "8386ffd7.ead028" ] ] }, { "id": "8386ffd7.ead028", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 1240, "wires": [ [ "4538bc37.c487e4" ] ] }, { "id": "7d4ca598.7c208c", "type": "function", "z": "6196e1fa.d45458", "name": "Auswertung Mover", "func": "// id des movers ggfs. anpassen\nvar id = 2;\n\n\nglobal.set(\"mower\", msg.payload.devices[id].id);\n\nvar battery_level = { payload:msg.payload.devices[id].abilities[1].properties[0].value };\nvar battery_charging = { payload:msg.payload.devices[id].abilities[1].properties[1].value };\n\nvar mower_manual_op = { payload:msg.payload.devices[id].abilities[3].properties[0].value };\nvar mower_status = { payload:msg.payload.devices[id].abilities[3].properties[1].value };\nvar mower_error = { payload:msg.payload.devices[id].abilities[3].properties[2].value };\nvar mower_source_nxt_start = { payload:msg.payload.devices[id].abilities[4].properties[3].value };\nvar mower_nxt_start = { payload:msg.payload.devices[id].abilities[3].properties[5].value };\n\nvar mower_cut_time = { payload:msg.payload.devices[id].abilities[4].properties[0].value };\nvar mower_charg_cycle = { payload:msg.payload.devices[id].abilities[4].properties[1].value };\nvar mower_collisions = { payload:msg.payload.devices[id].abilities[4].properties[2].value };\nvar mower_run_time = { payload:msg.payload.devices[id].abilities[4].properties[3].value };\n\nnode.status({fill:\"green\",shape:\"ring\",text: msg.payload.devices[id].id});\n\n\n\nreturn [ [battery_level], [battery_charging], \n [mower_status], [mower_error], [mower_source_nxt_start], [mower_nxt_start], \n [mower_cut_time], [mower_charg_cycle], [mower_collisions], [mower_run_time] ];", "outputs": 10, "noerr": 0, "x": 890, "y": 340, "wires": [ [ "4e346187.1535d" ], [ "43c88b4e.b162dc" ], [ "ba52f633.ff6228" ], [ "1439ad2b.47c6a3" ], [ "43b59430.e81bfc" ], [ "c59aa7f.4b828d8" ], [ "e18bc1f4.cc46e" ], [ "158ac7f4.743688" ], [ "4146affb.1c1458" ], [ "811bdb23.53aea" ] ] }, { "id": "37eab16.09610ce", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "outputs": 2, "x": 890, "y": 1000, "wires": [ [ "b2081f3f.4995b" ], [ "3cda60de.d311d" ] ] }, { "id": "b2081f3f.4995b", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 980, "wires": [ [ "db71681e.021d8" ] ] }, { "id": "3cda60de.d311d", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 1020, "wires": [ [ "db71681e.021d8" ] ] }, { "id": "e8371e8d.d5ae88", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 890, "y": 920, "wires": [ [ "9c542ba9.fc3388" ], [ "1b158609.8ed162" ] ] }, { "id": "1b158609.8ed162", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 940, "wires": [ [ "32132a7c.bf462e" ] ] }, { "id": "9c542ba9.fc3388", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 900, "wires": [ [ "32132a7c.bf462e" ] ] }, { "id": "83679876.36a7a", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "outputs": 2, "x": 890, "y": 1080, "wires": [ [ "52c59e6d.a6e17" ], [ "1b11e42f.cc8f64" ] ] }, { "id": "1b11e42f.cc8f64", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 1100, "wires": [ [ "40fd496.bfcfb38" ] ] }, { "id": "52c59e6d.a6e17", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 1060, "wires": [ [ "40fd496.bfcfb38" ] ] }, { "id": "5fca5bc4.128f1c", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 890, "y": 1160, "wires": [ [ "16b44f79.ce0921" ], [ "581dcb17.fea9b4" ] ] }, { "id": "581dcb17.fea9b4", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 1180, "wires": [ [ "253be03d.c381a" ] ] }, { "id": "16b44f79.ce0921", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 1140, "wires": [ [ "253be03d.c381a" ] ] }, { "id": "4538bc37.c487e4", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "outputs": 2, "x": 890, "y": 1240, "wires": [ [ "b8f1d7a8.8782" ], [ "9c912db.b3df45" ] ] }, { "id": "9c912db.b3df45", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 1260, "wires": [ [ "8e8d0550.17bff" ] ] }, { "id": "b8f1d7a8.8782", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 1220, "wires": [ [ "8e8d0550.17bff" ] ] }, { "id": "210f3d17.50d8d2", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 1000, "wires": [ [ "37eab16.09610ce" ] ] }, { "id": "d4f4f55e.1988a8", "type": "debug", "z": "6196e1fa.d45458", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 870, "y": 460, "wires": [] }, { "id": "4e346187.1535d", "type": "function", "z": "6196e1fa.d45458", "name": "Battery Level", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1190, "y": 140, "wires": [ [] ] }, { "id": "43c88b4e.b162dc", "type": "function", "z": "6196e1fa.d45458", "name": "battery charging", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1400, "y": 180, "wires": [ [] ] }, { "id": "ba52f633.ff6228", "type": "function", "z": "6196e1fa.d45458", "name": "mover status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1190, "y": 220, "wires": [ [] ] }, { "id": "e18bc1f4.cc46e", "type": "function", "z": "6196e1fa.d45458", "name": "mower_cut_time", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1200, "y": 400, "wires": [ [] ] }, { "id": "c59aa7f.4b828d8", "type": "function", "z": "6196e1fa.d45458", "name": "mower_nxt_start", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1400, "y": 360, "wires": [ [] ] }, { "id": "1439ad2b.47c6a3", "type": "function", "z": "6196e1fa.d45458", "name": "mover error", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1390, "y": 260, "wires": [ [] ] }, { "id": "43b59430.e81bfc", "type": "function", "z": "6196e1fa.d45458", "name": "mower_source_nxt_start", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1230, "y": 320, "wires": [ [] ] }, { "id": "811bdb23.53aea", "type": "function", "z": "6196e1fa.d45458", "name": "mower_run_time", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1410, "y": 520, "wires": [ [] ] }, { "id": "158ac7f4.743688", "type": "function", "z": "6196e1fa.d45458", "name": "mower_charg_cycle", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1420, "y": 440, "wires": [ [] ] }, { "id": "4146affb.1c1458", "type": "function", "z": "6196e1fa.d45458", "name": "mower_collisions", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1210, "y": 480, "wires": [ [] ] }, { "id": "32132a7c.bf462e", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 900, "wires": [ [] ] }, { "id": "db71681e.021d8", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 980, "wires": [ [] ] }, { "id": "40fd496.bfcfb38", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 1060, "wires": [ [] ] }, { "id": "253be03d.c381a", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 1140, "wires": [ [] ] }, { "id": "59ff5d3a.ccb2ac", "type": "function", "z": "6196e1fa.d45458", "name": "Auswertung Power", "func": "// id des power adapters ggfs. anpassen\nvar id = 1;\n\nglobal.set(\"power\", msg.payload.devices[id].id);\n\nvar name = { payload:msg.payload.devices[id].name};\nvar power_timer = { payload:msg.payload.devices[id].abilities[2].properties[0].value };\n\nnode.status({fill:\"green\",shape:\"ring\",text: msg.payload.devices[id].id})\n\nreturn [ [name], [power_timer] ];", "outputs": 2, "noerr": 0, "x": 890, "y": 580, "wires": [ [ "d96c8567.86223" ], [ "a3d22431.148e2" ] ] }, { "id": "d96c8567.86223", "type": "function", "z": "6196e1fa.d45458", "name": "Name", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1110, "y": 560, "wires": [ [] ] }, { "id": "a3d22431.148e2", "type": "function", "z": "6196e1fa.d45458", "name": "power_timer", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1130, "y": 620, "wires": [ [] ] }, { "id": "8e8d0550.17bff", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 1220, "wires": [ [] ] }, { "id": "b1b1d745.b17d98", "type": "function", "z": "6196e1fa.d45458", "name": "Abfrage", "func": "\nvar mylocation = global.get(\"location\");\nvar mytoken = global.get(\"token\"); \n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n}\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices?locationId=\" + mylocation;\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 340, "y": 380, "wires": [ [ "af52cada.e8e9" ] ] }, { "id": "8b9252be.112bf", "type": "inject", "z": "6196e1fa.d45458", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 150, "y": 720, "wires": [ [ "6b1da41d.868314" ] ] }, { "id": "6b1da41d.868314", "type": "function", "z": "6196e1fa.d45458", "name": "Schalter ein ???? funktioniert nicht", "func": "var power = global.get(\"power\");\nvar mytoken = global.get(\"token\"); \nvar mylocation = global.get(\"location\"); \n\nmsg.payload = {\n \"name\": \"help\" };\n \nmsg.payload = \n{\n \"name\" : \"power_timer\", \n \"parameters\": { \"value\" : \"on\" }\n};\n\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"X-Session\": mytoken\n};\n\n\nvar url= \"https://sg-api.dss.husqvarnagroup.net/sg-1/devices/\" + power + \"/abilities/power/command?locationId=\" + mylocation;\n\n\nmsg.url = url;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 460, "y": 720, "wires": [ [ "7dab55a4.15bd7c" ] ] }, { "id": "7dab55a4.15bd7c", "type": "http request", "z": "6196e1fa.d45458", "name": "", "method": "POST", "ret": "txt", "url": "", "tls": "", "x": 710, "y": 720, "wires": [ [ "23c5af0.e5f5ed2", "3d59e7ef.57c9c" ] ] }, { "id": "23c5af0.e5f5ed2", "type": "switch", "z": "6196e1fa.d45458", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" }, { "t": "neq", "v": "", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 890, "y": 720, "wires": [ [ "dd7b3307.8eaea" ], [ "a77d7757.2eaa6" ] ] }, { "id": "a77d7757.2eaa6", "type": "change", "z": "6196e1fa.d45458", "name": "NOT NULL == false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1090, "y": 740, "wires": [ [ "ce3ab545.b3b968" ] ] }, { "id": "dd7b3307.8eaea", "type": "change", "z": "6196e1fa.d45458", "name": "NULL == true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1080, "y": 700, "wires": [ [ "ce3ab545.b3b968" ] ] }, { "id": "ce3ab545.b3b968", "type": "function", "z": "6196e1fa.d45458", "name": "Status", "func": "node.status({fill:\"green\",shape:\"ring\",text:msg.payload});\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 1270, "y": 700, "wires": [ [] ] }, { "id": "67147da1.ab4e7c", "type": "inject", "z": "6196e1fa.d45458", "name": "Alle 30 Sekunden", "topic": "", "payload": "", "payloadType": "date", "repeat": "30", "crontab": "", "once": true, "onceDelay": "30", "x": 170, "y": 440, "wires": [ [ "b1b1d745.b17d98" ] ] }, { "id": "3d59e7ef.57c9c", "type": "debug", "z": "6196e1fa.d45458", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "x": 900, "y": 780, "wires": [] } ] Dort müssen die Anmeldedaten (Email / Password) und die ID's der Devices angepasst werden. (Bei mir ID1 = Smart Power / ID2 = Mähroboter) Vielleicht hilft das und über ein Feedback würde ich mich freuen. Kennt Jemand die Befehle zum Schalten des Power Adapters? Grüße Thomas
-
Moin,
habe eben mal wieder durch Zufall hier in den Thread und bei Github reingeschaut und festgestellt, dass sich diese Woche was am Adapter getan hat (Update auf 1.0.1). Direkt mal installiert…
Bei mir werden nun in der Objektstruktur im ioBroker das Gardena-Gateway, das Stellventil (Smart Water Control), der Sensor und der Mähroboter (Sileno city 500) erkannt und mit Werten befüllt. Für den Sileno city 500 gibt es nun auch unterhalb des "Device" Knotens in der Objektstruktur eine "commands" Ebene, die ich bis dato immer vermisst habe. Hierüber lässt sich der Mäher direkt ansteuern.
Allerdings scheint man für Start- und Parlbefehl zwei sparate States zu benötigen. Ich habe "start_override_timer" als Startbefehl (in der Gardena App ist das vermutlich der Button für manuelles Mähen) und als Parkbefehl "park_until_further_notice" (in der Gardena App "parken und Zeitpläne aussetzen" oder so ähnlich) verwendet.
Funktioniert einwandfrei über Alexa.
Allerdings mus man anscheinend zwei Geräte anlegen, da es sich bei dem Parkbefehl nicht um die Umkehrung des Startbefehls im Sinne eines klassischen An-Aus-Schalters handelt. Heißt, ich habe im ioBroker Cloudadapter ein "Rasenmäher Start" und ein "Rasenmäher Stop" Gerät angelegt, von dem ich jeweils in Alexa nur den An-Schalter/ -Befehl verwende.
Möglicherweise lässt sich das noch schöner lösen. Ich bin auf jeden Fall mit der Lösung erstmal zu frieden. Danke für das Adapter-Update!
Vielleicht wird ja die "commands" Ebene für das Stellventil/ Smart Water Control auch noch ergänzt?! :roll:
-
Hallo zusammen
Ich nutze diesen Adapter für meinen Sileno und einen Bodenfeuchtesensor. Vorweg, ich finde diesen Adapter super!
Nun habe ich den Abfrageintervall von 600 s auf 60 Sekunden reduziert, da ich relativ online sehen wollte, was den mein Robby macht bzw. wenn die Sprinkler an sind der Robby brav nach Hause fährt.
Hierbei ist mir Aufgefallen, dass jedesmal wenn die Abfrage des Adapters starten keinerlei Skripte mehr funktionieren und mein javascript adapter abschmiert. d.h. es werden keine Skripte Ausgeführt.
Hab dann im TOP geschaut. Bei laufender Abfrage liegt die %CPU Auslastung zum teil bei >100%.
` > PID USER PR NI __VIRT __ RES __ SHR S %CPU %MEM TIME+ COMMAND
6527 root 20 0 1270224 147076 21924 R 103,6 3,6 6:21.32 iobroker.js-con
7144 root 20 0 1138648 148164 21520 R 99,3 3,6 3:27.37 io.javascript.0
7395 root 20 0 1115376 56500 22012 S 75,5 1,4 0:06.63 io.gardena.0
6537 root 20 0 1242932 110648 21640 S 48,3 2,7 2:08.88 io.admin.0 `
Dauert dann ca. 30 Sekunden dann bekomme ich im LOG:
> javascript.0 2018-08-24 00:56:31.449 warn Reconnection to DB.
Dannach gehen die Skripte wiederLiegt wahrscheinlich daran, dass der Adapter relativ lange benötigt um die Datenmenge zu verarbeiten.
Selbst wenn ich alle Skripte deaktiviere ist der Zustand laut TOP der selbe.
Liegt es an den extrem vielen Datenpunkten die abgefragt werden bzw. kann jemand anders dieses Problem nachvollziehen?
Habe jetzt erstmal den Abfrageintervall wieder auf 600s Sekunden gesetzt, damit das Problem minimiert ist.
Gruß Thomas
-
Hallo,
ich habe nun nach der Anleitung im Github mit Packet Capture die Kommunikation protokolliert und herausgefunden wie ich den Smart Power Adapter ansteuern kann. Ich mache das wie immer unter Node-Red.
Während der Sileno Mähroboter mit "Commands" und http POST angesteuert wird, wird der Power Adapeter mit http PUT direkt in die "properties" Struktur beschrieben.
Hier ein Beispiel Node-red flow … Login-Daten sind anzupassen:
! [
! {
! "id": "3dfbb3ad.8a2b5c",
! "type": "tab",
! "label": "Flow 3",
! "disabled": false,
! "info": ""
! },
! {
! "id": "fd548e85.18db5",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Alle 30 Minuten",
! "topic": "",
! "payload": "",
! "payloadType": "date",
! "repeat": "1800",
! "crontab": "",
! "once": true,
! "onceDelay": "",
! "x": 190,
! "y": 100,
! "wires": [
! [
! "e9f7b079.e4de58"
! ]
! ]
! },
! {
! "id": "e9f7b079.e4de58",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Anmeldung",
! "func": "msg.payload = {\n "sessions": {\n "email": " xxxx",\n "password": "yyyy",\n "refresh":"30",\n "sessionTimeout":"60"\n }\n};\n\nmsg.headers = {\n Accept: "application/json"\n};\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 370,
! "y": 100,
! "wires": [
! [
! "272eca22.f1b99e"
! ]
! ]
! },
! {
! "id": "272eca22.f1b99e",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "obj",
! "url": "https://sg-api.dss.husqvarnagroup.net/sg-1/sessions",
! "tls": "",
! "x": 670,
! "y": 100,
! "wires": [
! [
! "51e8fe1a.8f21b"
! ]
! ]
! },
! {
! "id": "51e8fe1a.8f21b",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Session Token und User ID",
! "func": "global.set("token", msg.payload.sessions.token);\nglobal.set("user_id", msg.payload.sessions.user_id);\n\nvar mytoken = global.get("token"); \nvar myuserid = global.get("user_id"); \n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/s … /?user_id=" + myuserid;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 420,
! "y": 200,
! "wires": [
! [
! "3b8f8c0f.875334"
! ]
! ]
! },
! {
! "id": "3b8f8c0f.875334",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "GET",
! "ret": "obj",
! "url": "",
! "tls": "",
! "x": 670,
! "y": 200,
! "wires": [
! [
! "d2930946.a63f98"
! ]
! ]
! },
! {
! "id": "d2930946.a63f98",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Location ID",
! "func": "global.set("location", msg.payload["locations"][0]["id"]);\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 370,
! "y": 260,
! "wires": [
! [
! "38960b30.f61984"
! ]
! ]
! },
! {
! "id": "9ee287a1.b9faa8",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "GET",
! "ret": "obj",
! "url": "",
! "tls": "",
! "x": 650,
! "y": 320,
! "wires": [
! [
! "3fecd2d7.49deb6",
! "d009fbea.46329"
! ]
! ]
! },
! {
! "id": "68f68a2e.a24394",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 860,
! "wires": [
! [
! "fa49997f.8030f8"
! ]
! ]
! },
! {
! "id": "fa49997f.8030f8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Parken bis zum nächsten Zeitplan",
! "func": "var mower = global.get("mower");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location"); \n\nmsg.payload = {\n "name":"park_until_next_timer"\n};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + mower + "/abilities/mower/command?locationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 480,
! "y": 860,
! "wires": [
! [
! "a7e48cea.124c28"
! ]
! ]
! },
! {
! "id": "a7e48cea.124c28",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 860,
! "wires": [
! [
! "575cb268.f72304"
! ]
! ]
! },
! {
! "id": "ed47ff9b.eebc08",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 940,
! "wires": [
! [
! "d1e0c95f.f82e5"
! ]
! ]
! },
! {
! "id": "d1e0c95f.f82e5",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Parken und Zeitplan pausieren",
! "func": "var mower = global.get("mower");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location"); \n\nmsg.payload = {\n "name": "park_until_further_notice"\n};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + mower + "/abilities/mower/command?locationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 470,
! "y": 940,
! "wires": [
! [
! "69440e88.7f405"
! ]
! ]
! },
! {
! "id": "b26c597f.c323",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 1020,
! "wires": [
! [
! "8ec867ec.95c5f8"
! ]
! ]
! },
! {
! "id": "8ec867ec.95c5f8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Starten und Zeitpläne fortsetzen",
! "func": "var mower = global.get("mower");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location"); \n\nmsg.payload = {\n "name": "start_resume_schedule"\n};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + mower + "/abilities/mower/command?locationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 470,
! "y": 1020,
! "wires": [
! [
! "1aa350fc.6f0e57"
! ]
! ]
! },
! {
! "id": "1aa350fc.6f0e57",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 1020,
! "wires": [
! [
! "3891c6d.a73dfba"
! ]
! ]
! },
! {
! "id": "932776e3.b0a68",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 1100,
! "wires": [
! [
! "f4fa1030.002918"
! ]
! ]
! },
! {
! "id": "f4fa1030.002918",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "24 Stunden lang mähen",
! "func": "var mower = global.get("mower");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location"); \n\nmsg.payload = {\n "name": "start_override_timer",\n "parameters": { "duration": 1440 }\n};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + mower + "/abilities/mower/command?locationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 450,
! "y": 1100,
! "wires": [
! [
! "f0678737.b8597"
! ]
! ]
! },
! {
! "id": "f0678737.b8597",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 1100,
! "wires": [
! [
! "cb1221f3.c78ac8"
! ]
! ]
! },
! {
! "id": "4e96bd0.87d83c4",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 1180,
! "wires": [
! [
! "73255154.a558f8"
! ]
! ]
! },
! {
! "id": "73255154.a558f8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "3 Tage mähen",
! "func": "var mower = global.get("mower");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location"); \n\nmsg.payload = {\n "name": "start_override_timer",\n "parameters": { "duration": 4320 }\n};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + mower + "/abilities/mower/command?locationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 420,
! "y": 1180,
! "wires": [
! [
! "664906c3.701b98"
! ]
! ]
! },
! {
! "id": "664906c3.701b98",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 1180,
! "wires": [
! [
! "915e2052.eb84c8"
! ]
! ]
! },
! {
! "id": "3fecd2d7.49deb6",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Auswertung Mover",
! "func": "// id des movers ggfs. anpassen\nvar id = 2;\n\n\nglobal.set("mower", msg.payload.devices[id].id);\n\nvar battery_level = { payload:msg.payload.devices[id].abilities[1].properties[0].value };\nvar battery_charging = { payload:msg.payload.devices[id].abilities[1].properties[1].value };\n\nvar mower_manual_op = { payload:msg.payload.devices[id].abilities[4].properties[0].value };\nvar mower_status = { payload:msg.payload.devices[id].abilities[4].properties[1].value };\nvar mower_error = { payload:msg.payload.devices[id].abilities[4].properties[2].value };\nvar mower_source_nxt_start = { payload:msg.payload.devices[id].abilities[4].properties[3].value };\nvar mower_nxt_start = { payload:msg.payload.devices[id].abilities[4].properties[5].value };\n\nvar mower_cut_time = { payload:msg.payload.devices[id].abilities[5].properties[0].value };\nvar mower_charg_cycle = { payload:msg.payload.devices[id].abilities[5].properties[1].value };\nvar mower_collisions = { payload:msg.payload.devices[id].abilities[5].properties[2].value };\nvar mower_run_time = { payload:msg.payload.devices[id].abilities[5].properties[3].value };\n\nnode.status({fill:"green",shape:"ring",text: msg.payload.devices[id].id});\n\n\n\nreturn [ [battery_level], [battery_charging], \n [mower_status], [mower_error], [mower_source_nxt_start], [mower_nxt_start], \n [mower_cut_time], [mower_charg_cycle], [mower_collisions], [mower_run_time] ];",
! "outputs": 10,
! "noerr": 0,
! "x": 910,
! "y": 280,
! "wires": [
! [
! "42eb54de.cb1444"
! ],
! [
! "174347cb.899a88"
! ],
! [
! "4281373c.bdcd9"
! ],
! [
! "a4cbe048.42ad18"
! ],
! [
! "159ae429.0192e4"
! ],
! [
! "a6536db5.b129c8"
! ],
! [
! "47af0418.ebaa84"
! ],
! [
! "b1841c94.3f04e8"
! ],
! [
! "22b1b342.8bef34"
! ],
! [
! "f2b9cc09.1fcf38"
! ]
! ]
! },
! {
! "id": "f89e2a71.531248",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "outputs": 2,
! "x": 910,
! "y": 940,
! "wires": [
! [
! "5bf3392e.5988f8"
! ],
! [
! "29bdb3e2.494f6c"
! ]
! ]
! },
! {
! "id": "5bf3392e.5988f8",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 920,
! "wires": [
! [
! "6e6f054c.72992c"
! ]
! ]
! },
! {
! "id": "29bdb3e2.494f6c",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 960,
! "wires": [
! [
! "6e6f054c.72992c"
! ]
! ]
! },
! {
! "id": "575cb268.f72304",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "repair": false,
! "outputs": 2,
! "x": 910,
! "y": 860,
! "wires": [
! [
! "2c2246dd.2f5f02"
! ],
! [
! "38fe4721.29dc6"
! ]
! ]
! },
! {
! "id": "38fe4721.29dc6",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 880,
! "wires": [
! [
! "bccafcb0.958b18"
! ]
! ]
! },
! {
! "id": "2c2246dd.2f5f02",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 840,
! "wires": [
! [
! "bccafcb0.958b18"
! ]
! ]
! },
! {
! "id": "3891c6d.a73dfba",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "outputs": 2,
! "x": 910,
! "y": 1020,
! "wires": [
! [
! "3cb942f5.6fc35e"
! ],
! [
! "68b7d5f1.dd6214"
! ]
! ]
! },
! {
! "id": "68b7d5f1.dd6214",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 1040,
! "wires": [
! [
! "4cf24f19.8f1cf8"
! ]
! ]
! },
! {
! "id": "3cb942f5.6fc35e",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 1000,
! "wires": [
! [
! "4cf24f19.8f1cf8"
! ]
! ]
! },
! {
! "id": "cb1221f3.c78ac8",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "repair": false,
! "outputs": 2,
! "x": 910,
! "y": 1100,
! "wires": [
! [
! "70dd7d7f.a1ec7c"
! ],
! [
! "24bc2291.e881d6"
! ]
! ]
! },
! {
! "id": "24bc2291.e881d6",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 1120,
! "wires": [
! [
! "975b5d59.65612"
! ]
! ]
! },
! {
! "id": "70dd7d7f.a1ec7c",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 1080,
! "wires": [
! [
! "975b5d59.65612"
! ]
! ]
! },
! {
! "id": "915e2052.eb84c8",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "outputs": 2,
! "x": 910,
! "y": 1180,
! "wires": [
! [
! "a53d6ce2.be8fa"
! ],
! [
! "5fa89227.28c99c"
! ]
! ]
! },
! {
! "id": "5fa89227.28c99c",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 1200,
! "wires": [
! [
! "e479cdfd.ade4d"
! ]
! ]
! },
! {
! "id": "a53d6ce2.be8fa",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 1160,
! "wires": [
! [
! "e479cdfd.ade4d"
! ]
! ]
! },
! {
! "id": "69440e88.7f405",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "POST",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 940,
! "wires": [
! [
! "f89e2a71.531248"
! ]
! ]
! },
! {
! "id": "42eb54de.cb1444",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Battery Level",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1210,
! "y": 80,
! "wires": [
! []
! ]
! },
! {
! "id": "174347cb.899a88",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "battery charging",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1420,
! "y": 120,
! "wires": [
! []
! ]
! },
! {
! "id": "4281373c.bdcd9",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mover status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1210,
! "y": 140,
! "wires": [
! []
! ]
! },
! {
! "id": "47af0418.ebaa84",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_cut_time",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1220,
! "y": 340,
! "wires": [
! []
! ]
! },
! {
! "id": "a6536db5.b129c8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_nxt_start",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1420,
! "y": 300,
! "wires": [
! []
! ]
! },
! {
! "id": "a4cbe048.42ad18",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mover error",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1410,
! "y": 200,
! "wires": [
! []
! ]
! },
! {
! "id": "159ae429.0192e4",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_source_nxt_start",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1250,
! "y": 260,
! "wires": [
! []
! ]
! },
! {
! "id": "f2b9cc09.1fcf38",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_run_time",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1430,
! "y": 480,
! "wires": [
! []
! ]
! },
! {
! "id": "b1841c94.3f04e8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_charg_cycle",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1440,
! "y": 380,
! "wires": [
! []
! ]
! },
! {
! "id": "22b1b342.8bef34",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "mower_collisions",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1230,
! "y": 420,
! "wires": [
! []
! ]
! },
! {
! "id": "bccafcb0.958b18",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 840,
! "wires": [
! []
! ]
! },
! {
! "id": "6e6f054c.72992c",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 920,
! "wires": [
! []
! ]
! },
! {
! "id": "4cf24f19.8f1cf8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 1000,
! "wires": [
! []
! ]
! },
! {
! "id": "975b5d59.65612",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 1080,
! "wires": [
! []
! ]
! },
! {
! "id": "d009fbea.46329",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Auswertung Power",
! "func": "// id des power adapters ggfs. anpassen\nvar id = 1;\n\nglobal.set("power", msg.payload.devices[id].id);\n\nvar name = { payload:msg.payload.devices[id].name};\nvar power_timer = { payload:msg.payload.devices[id].abilities[2].properties[0].value };\n\nnode.status({fill:"green",shape:"ring",text: msg.payload.devices[id].id})\n\nreturn [ [name], [power_timer] ];",
! "outputs": 2,
! "noerr": 0,
! "x": 910,
! "y": 520,
! "wires": [
! [
! "ee736d82.124848"
! ],
! [
! "114c40a9.dc8e07"
! ]
! ]
! },
! {
! "id": "ee736d82.124848",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Name",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1130,
! "y": 500,
! "wires": [
! []
! ]
! },
! {
! "id": "114c40a9.dc8e07",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "power_timer",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1150,
! "y": 560,
! "wires": [
! []
! ]
! },
! {
! "id": "e479cdfd.ade4d",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 1160,
! "wires": [
! []
! ]
! },
! {
! "id": "38960b30.f61984",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Abfrage",
! "func": "\nvar mylocation = global.get("location");\nvar mytoken = global.get("token"); \n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n}\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/s … ocationId=" + mylocation;\n\nmsg.url = url;\n\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 360,
! "y": 320,
! "wires": [
! [
! "9ee287a1.b9faa8"
! ]
! ]
! },
! {
! "id": "521d789a.b51b58",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 600,
! "wires": [
! [
! "b089bb1c.78b018"
! ]
! ]
! },
! {
! "id": "b089bb1c.78b018",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Schalter ein ",
! "func": "var power = global.get("power");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location");\n\nmsg.payload = {"properties" :{ "value": "on"}};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + power + "/abilities/power/properties/power_timer?locationId=" + mylocation;\n\nmsg.url = url;\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 410,
! "y": 600,
! "wires": [
! [
! "2b71b033.00ac5"
! ]
! ]
! },
! {
! "id": "2b71b033.00ac5",
! "type": "http request",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "method": "PUT",
! "ret": "txt",
! "url": "",
! "tls": "",
! "x": 730,
! "y": 660,
! "wires": [
! [
! "9094716.e32639"
! ]
! ]
! },
! {
! "id": "9094716.e32639",
! "type": "switch",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "property": "payload",
! "propertyType": "msg",
! "rules": [
! {
! "t": "eq",
! "v": "",
! "vt": "str"
! },
! {
! "t": "neq",
! "v": "",
! "vt": "str"
! }
! ],
! "checkall": "true",
! "repair": false,
! "outputs": 2,
! "x": 910,
! "y": 660,
! "wires": [
! [
! "5c916430.aae74c"
! ],
! [
! "f0853990.9151e"
! ]
! ]
! },
! {
! "id": "f0853990.9151e",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NOT NULL == false",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "0",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1110,
! "y": 680,
! "wires": [
! [
! "a4bce287.e4bb4"
! ]
! ]
! },
! {
! "id": "5c916430.aae74c",
! "type": "change",
! "z": "3dfbb3ad.8a2b5c",
! "name": "NULL == true",
! "rules": [
! {
! "t": "set",
! "p": "payload",
! "pt": "msg",
! "to": "1",
! "tot": "num"
! }
! ],
! "action": "",
! "property": "",
! "from": "",
! "to": "",
! "reg": false,
! "x": 1100,
! "y": 640,
! "wires": [
! [
! "a4bce287.e4bb4"
! ]
! ]
! },
! {
! "id": "a4bce287.e4bb4",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Status",
! "func": "node.status({fill:"green",shape:"ring",text:msg.payload});\nreturn msg;\n",
! "outputs": 1,
! "noerr": 0,
! "x": 1290,
! "y": 660,
! "wires": [
! []
! ]
! },
! {
! "id": "623a727e.c3f20c",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Alle 30 Sekunden",
! "topic": "",
! "payload": "",
! "payloadType": "date",
! "repeat": "30",
! "crontab": "",
! "once": true,
! "onceDelay": "30",
! "x": 190,
! "y": 380,
! "wires": [
! [
! "38960b30.f61984"
! ]
! ]
! },
! {
! "id": "f76b8c8a.23a198",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 720,
! "wires": [
! [
! "d6748906.43a9b8"
! ]
! ]
! },
! {
! "id": "d6748906.43a9b8",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Schalter aus",
! "func": "var power = global.get("power");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location");\n\nmsg.payload = {"properties" :{ "value": "off"}};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + power + "/abilities/power/properties/power_timer?locationId=" + mylocation;\n\nmsg.url = url;\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 410,
! "y": 720,
! "wires": [
! [
! "2b71b033.00ac5"
! ]
! ]
! },
! {
! "id": "2c45f830.7d19a",
! "type": "inject",
! "z": "3dfbb3ad.8a2b5c",
! "name": "",
! "topic": "",
! "payload": "",
! "payloadType": "str",
! "repeat": "",
! "crontab": "",
! "once": false,
! "onceDelay": "",
! "x": 170,
! "y": 660,
! "wires": [
! [
! "d2cd7ddf.34ea1"
! ]
! ]
! },
! {
! "id": "d2cd7ddf.34ea1",
! "type": "function",
! "z": "3dfbb3ad.8a2b5c",
! "name": "Schalter eine Stunde ein ",
! "func": "var power = global.get("power");\nvar mytoken = global.get("token"); \nvar mylocation = global.get("location");\n\nmsg.payload = {"properties" :{ "value": "3600"}};\n\nmsg.headers = {\n "Content-Type": "application/json",\n "X-Session": mytoken\n};\n\n\nvar url= "https://sg-api.dss.husqvarnagroup.net/sg-1/devices/" + power + "/abilities/power/properties/power_timer?locationId=" + mylocation;\n\nmsg.url = url;\nreturn msg;",
! "outputs": 1,
! "noerr": 0,
! "x": 450,
! "y": 660,
! "wires": [
! [
! "2b71b033.00ac5"
! ]
! ]
! }
! ] -
Hallo zusammen,
ich habe mir einen Gardena Smart Sileno City 500 zugelegt. Unseren Worx musste ich leider verbannen, da er sich bereits mehrmals im Teich versenkt hat. #ErFährtGernMalRückwärtsÜberDenDraht.
Ich habe im Io.Broker den Gardena Adapter installiert. Großes Lob, wahnsinn was ich alles abfragen kann.
Im Großen und Ganzen funktioniert er gut. Den für mich wichtigsten Punkt habe ich allerdings noch nicht gefunden: Unter welchem Objektpunkt kann ich den Mäher starten, pausieren und nach Hause schicken? Irgendwie sind alle Datenpunkte nur lesbar. Ändern lässt er sich nicht.
So sieht es bei mir aus:
Ich hätte den Befehl hier erwartet.
Hat irgendwer herausbekommen, welcher Objektpunkt den Mäher losschickt und nach Hause fahren lässt?
Ich freue mich auf eure Antworten.
Grüße,
Stefan -
-
@sigi234 sagte in [Frage] Gardena Smart System (Mähroboter, Bewässerung):
Hallo sigi234,
danke für Deine Antwort. Den Thread hab ich gelesen. Auch habe ich mir die Beschreibung des Adapters angeguckt. Meinst Du den Vermerkt zu "POST-Kommandos?
Ich verstehe leider nicht, was damit gemeint ist. Sind Post Kommandos, Sendebefehle? Leider ist mein Englisch nicht so gut, dass ich die Beschreibung des Adapters komplett verstehe.
Kannst Du mir nochmal helfen?
Grüße,
Stefan -
@Stefan1984 sagte in [Frage] Gardena Smart System (Mähroboter, Bewässerung):
Sind Post Kommandos, Sendebefehle?
POST = senden
GET = empfangen -
Ok, verstanden. Danke.
-
@Stefan1984 sagte in [Frage] Gardena Smart System (Mähroboter, Bewässerung):
Ok, verstanden. Danke.