Skip to content

Instantly share code, notes, and snippets.

@Donni1966
Last active February 10, 2021 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Donni1966/6ce2cc96adce0eaa36e01ae23ac5c11f to your computer and use it in GitHub Desktop.
Save Donni1966/6ce2cc96adce0eaa36e01ae23ac5c11f to your computer and use it in GitHub Desktop.
Xiaomi / Roborock Status in Dashboard
[
{
"id": "9789f465.79236",
"type": "ui_switch",
"z": "523d8088.4c6f6",
"name": "Saugen OG",
"label": "Saugen OG (komplett) an/aus",
"tooltip": "Startet oder stopt den Staubsauger auf der Galerie",
"group": "6f2650d1.1682c8",
"order": 1,
"width": 4,
"height": 1,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "cached",
"oncolor": "red",
"offvalue": "false",
"offvalueType": "bool",
"officon": "cached",
"offcolor": "gray",
"x": 2210,
"y": 140,
"wires": [
[
"a2a0fb24.94d67"
]
]
},
{
"id": "b24568a1.40f0d8",
"type": "debug",
"z": "523d8088.4c6f6",
"name": "Debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2490,
"y": 20,
"wires": []
},
{
"id": "edc6978c.73dc28",
"type": "ui_level",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 5,
"width": 1,
"height": 4,
"name": "Filter Robi",
"label": "Filter",
"colorHi": "#ff2600",
"colorWarn": "#ffaa00",
"colorNormal": "#00f900",
"colorOff": "#595959",
"min": "0",
"max": "150",
"segWarn": "100",
"segHigh": "120",
"unit": "h",
"layout": "sv",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "1",
"colorschema": "fixed",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.3",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": true,
"tickmode": "auto",
"peakmode": true,
"property": "payload",
"peaktime": "10000",
"x": 2750,
"y": 340,
"wires": []
},
{
"id": "99302a84.c5ae08",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 10,
"width": 3,
"height": 1,
"label": "Filter Status ",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "1",
"valueType": "num"
},
{
"color": "yellow",
"value": "2",
"valueType": "num"
},
{
"color": "green",
"value": "3",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Filter Robi",
"x": 2750,
"y": 380,
"wires": []
},
{
"id": "c28fd439.0bfc78",
"type": "ui_slider",
"z": "523d8088.4c6f6",
"name": "Saugi Leistung",
"label": "Leistung",
"tooltip": "",
"group": "6f2650d1.1682c8",
"order": 13,
"width": 0,
"height": 0,
"passthru": false,
"outs": "end",
"topic": "",
"min": "101",
"max": "104",
"step": "1",
"x": 2800,
"y": 100,
"wires": [
[
"907cd143.650948"
]
]
},
{
"id": "f313e391.c1ed3",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 4,
"width": 2,
"height": 1,
"label": "Im Dock",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "green",
"value": "8",
"valueType": "num"
},
{
"color": "yellow",
"value": "5",
"valueType": "num"
},
{
"color": "blue",
"value": "6",
"valueType": "num"
},
{
"color": "fuchsia",
"value": "10",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Docking Robi",
"x": 2800,
"y": 60,
"wires": []
},
{
"id": "fbc6d22e.58019",
"type": "change",
"z": "523d8088.4c6f6",
"name": "",
"rules": [
{
"t": "move",
"p": "payload.state",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "move",
"p": "status.state",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2635,
"y": 60,
"wires": [
[
"f313e391.c1ed3"
]
],
"l": false
},
{
"id": "d9d0b9ad.055a48",
"type": "miio-roborock-event",
"z": "523d8088.4c6f6",
"name": "Robi",
"server": "33ded10a.293bae",
"outputAtStartup": true,
"x": 2510,
"y": 60,
"wires": [
[
"b24568a1.40f0d8",
"fbc6d22e.58019",
"25f3dc02.c611a4",
"67c6e92c.77725",
"dec0bf8d.f1289",
"97d5bfc8.d33ee",
"4456c6ba.b958d",
"904eff79.4f0048",
"fb5a9059.82aea",
"26477654.b220c2"
]
]
},
{
"id": "a60466dc.caa2d8",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Robi Start",
"server": "33ded10a.293bae",
"command_name": "► Start",
"command": "app_start",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": "5000",
"homekit_stop_to_dock": false,
"x": 2400,
"y": 180,
"wires": [
[]
]
},
{
"id": "43712cdc.e0b68c",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Status Robi holen",
"server": "33ded10a.293bae",
"command_name": "ⓘ Get consumables statusⓘ Get consumables status",
"command": "get_consumable",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": null,
"homekit_stop_to_dock": false,
"x": 2430,
"y": 260,
"wires": [
[
"733505e6.8e410c",
"d1ae5095.cea328",
"32295542.659e62",
"b4f740de.b5f768",
"c47017ec.349828",
"8efb8a6c.4dbbe8",
"c435b8e7.0c5148",
"7433b555.1d9f94",
"8aef6dee.73fad8"
]
]
},
{
"id": "733505e6.8e410c",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "msg.payload=msg.payload[0].filter_work_time/3600;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 340,
"wires": [
[
"edc6978c.73dc28"
]
],
"l": false
},
{
"id": "d1ae5095.cea328",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "//Filter 150h max = 570.000 Sekunden\nvar Filter = msg.payload[0].filter_work_time/3600\n\n\nif (Filter < 100){\n msg.payload=3\n}\n\nif (Filter > 100){\n msg.payload=2\n}\n\nif (Filter > 120){\n msg.payload=1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 380,
"wires": [
[
"99302a84.c5ae08"
]
],
"l": false
},
{
"id": "10a4aaf0.1f3f0d",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Robi stop und Dock",
"server": "33ded10a.293bae",
"command_name": "◼ Stop & dock",
"command": "app_stop_dock",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": null,
"homekit_stop_to_dock": false,
"x": 2440,
"y": 220,
"wires": [
[]
]
},
{
"id": "43a84556.76d9ac",
"type": "ui_level",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 6,
"width": 1,
"height": 4,
"name": "Hauptbürste Robi",
"label": "Hauptbürste",
"colorHi": "#ff2600",
"colorWarn": "#ffaa00",
"colorNormal": "#00f900",
"colorOff": "#595959",
"min": 0,
"max": "300",
"segWarn": "200",
"segHigh": "280",
"unit": "h",
"layout": "sv",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "1",
"colorschema": "fixed",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": true,
"tickmode": "auto",
"peakmode": true,
"property": "payload",
"peaktime": "10000",
"x": 2770,
"y": 420,
"wires": []
},
{
"id": "2ed6ee60.86f40a",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 9,
"width": 3,
"height": 1,
"label": "Hauptbürste",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "1",
"valueType": "num"
},
{
"color": "yellow",
"value": "2",
"valueType": "num"
},
{
"color": "green",
"value": "3",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Hauptbürste Robi",
"x": 2770,
"y": 460,
"wires": []
},
{
"id": "32295542.659e62",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "msg.payload=msg.payload[0].main_brush_work_time/3600;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 420,
"wires": [
[
"43a84556.76d9ac"
]
],
"l": false
},
{
"id": "b4f740de.b5f768",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "//Filter 150h max = 570.000 Sekunden\nvar Filter = msg.payload[0].main_brush_work_time/3600\n\nif (Filter > 280){\n msg.payload=1\n}\nif (Filter > 200){\n msg.payload=2\n}\nif (Filter < 200){\n msg.payload=3\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 460,
"wires": [
[
"2ed6ee60.86f40a"
]
],
"l": false
},
{
"id": "a321d4cf.556518",
"type": "ui_level",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 7,
"width": 1,
"height": 4,
"name": "Seitenbürste Robi",
"label": "Seitenbürste",
"colorHi": "#ff2600",
"colorWarn": "#ffaa00",
"colorNormal": "#00f900",
"colorOff": "#595959",
"min": 0,
"max": "200",
"segWarn": "150",
"segHigh": "180",
"unit": "h",
"layout": "sv",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "1",
"colorschema": "fixed",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": true,
"tickmode": "auto",
"peakmode": true,
"property": "payload",
"peaktime": "10000",
"x": 2770,
"y": 500,
"wires": []
},
{
"id": "580ab6bc.628d8",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 11,
"width": 3,
"height": 1,
"label": "Seitenbürste",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "1",
"valueType": "num"
},
{
"color": "yellow",
"value": "2",
"valueType": "num"
},
{
"color": "green",
"value": "3",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Seitenbürste Robi",
"x": 2770,
"y": 540,
"wires": []
},
{
"id": "c47017ec.349828",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "msg.payload=msg.payload[0].side_brush_work_time/3600;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 500,
"wires": [
[
"a321d4cf.556518"
]
],
"l": false
},
{
"id": "8efb8a6c.4dbbe8",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "//Filter 150h max = 570.000 Sekunden\nvar Filter = msg.payload[0].side_brush_work_time/3600\n\nif (Filter > 180){\n msg.payload=1\n}\nif (Filter > 150){\n msg.payload=2\n}\nif (Filter < 150){\n msg.payload=3\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 540,
"wires": [
[
"580ab6bc.628d8"
]
],
"l": false
},
{
"id": "5607ddd3.9ca31c",
"type": "ui_level",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 8,
"width": 1,
"height": 4,
"name": "Sensoren Robi",
"label": "Sensoren",
"colorHi": "#ff2600",
"colorWarn": "#ffaa00",
"colorNormal": "#00f900",
"colorOff": "#595959",
"min": 0,
"max": "30",
"segWarn": "20",
"segHigh": "25",
"unit": "h",
"layout": "sv",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "1",
"colorschema": "fixed",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": true,
"tickmode": "auto",
"peakmode": true,
"property": "payload",
"peaktime": "10000",
"x": 2760,
"y": 580,
"wires": []
},
{
"id": "11ae319b.e927ee",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 12,
"width": 3,
"height": 1,
"label": "Sensoren Status ",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "3",
"valueType": "num"
},
{
"color": "yellow",
"value": "2",
"valueType": "num"
},
{
"color": "green",
"value": "1",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Sensoren Robi",
"x": 2760,
"y": 620,
"wires": []
},
{
"id": "c435b8e7.0c5148",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "msg.payload=msg.payload[0].sensor_dirty_time/3600;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 580,
"wires": [
[
"5607ddd3.9ca31c"
]
],
"l": false
},
{
"id": "7433b555.1d9f94",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "//Filter 150h max = 570.000 Sekunden\nvar Filter = msg.payload[0].sensor_dirty_time/3600;\n\nif (Filter > 25){\n msg.payload=3;\n return msg;\n}\nif (Filter > 20){\n msg.payload=2;\n return msg;\n}\nif (Filter < 20){\n msg.payload=1;\n return msg;\n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 620,
"wires": [
[
"11ae319b.e927ee"
]
],
"l": false
},
{
"id": "25f3dc02.c611a4",
"type": "change",
"z": "523d8088.4c6f6",
"name": "",
"rules": [
{
"t": "move",
"p": "status.in_cleaning",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2635,
"y": 20,
"wires": [
[
"4b5ecf84.34459"
]
],
"l": false
},
{
"id": "4b5ecf84.34459",
"type": "ui_led",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 3,
"width": 2,
"height": 1,
"label": "Saugt",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "gray",
"value": "0",
"valueType": "num"
},
{
"color": "yellow",
"value": "1",
"valueType": "num"
},
{
"color": "orange",
"value": "3",
"valueType": "num"
}
],
"allowColorForValueInMessage": false,
"name": "Robi Robi",
"x": 2780,
"y": 20,
"wires": []
},
{
"id": "2ae477c8.2c1228",
"type": "ui_text_input",
"z": "523d8088.4c6f6",
"name": "",
"label": "Status",
"tooltip": "Letzter Status",
"group": "6f2650d1.1682c8",
"order": 2,
"width": 3,
"height": 2,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "",
"x": 2810,
"y": 140,
"wires": [
[]
]
},
{
"id": "67c6e92c.77725",
"type": "change",
"z": "523d8088.4c6f6",
"name": "",
"rules": [
{
"t": "move",
"p": "payload.state_text",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2635,
"y": 140,
"wires": [
[
"2ae477c8.2c1228"
]
],
"l": false
},
{
"id": "a2a0fb24.94d67",
"type": "switch",
"z": "523d8088.4c6f6",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 2275,
"y": 200,
"wires": [
[
"a60466dc.caa2d8"
],
[
"10a4aaf0.1f3f0d"
]
],
"l": false
},
{
"id": "907cd143.650948",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Robi",
"server": "33ded10a.293bae",
"command_name": "⚙ Fan Power",
"command": "set_custom_mode",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": "5000",
"homekit_stop_to_dock": false,
"x": 2970,
"y": 100,
"wires": [
[]
]
},
{
"id": "7f4a7e98.b42ed",
"type": "ui_text_input",
"z": "523d8088.4c6f6",
"name": "Dauer",
"label": "Reiningsdauer",
"tooltip": "",
"group": "6f2650d1.1682c8",
"order": 15,
"width": 2,
"height": 1,
"passthru": false,
"mode": "number",
"delay": 300,
"topic": "",
"x": 2810,
"y": 180,
"wires": [
[]
]
},
{
"id": "dec0bf8d.f1289",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "if(msg.status.clean_time > 1){\n var gerundet = Math.round((msg.status.clean_time/60)*100)/100;\n msg.payload= gerundet;\n}else{\n var Gerundet = Math.round((msg.payload.clean_time/60)*100)/100;\n msg.payload= Gerundet;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 180,
"wires": [
[
"7f4a7e98.b42ed"
]
],
"l": false
},
{
"id": "ce2da1ca.c06e28",
"type": "ui_artlessgauge",
"z": "523d8088.4c6f6",
"group": "6f2650d1.1682c8",
"order": 16,
"width": 3,
"height": 3,
"name": "",
"icon": "fa-battery-full",
"label": "Akkustand",
"unit": "%",
"layout": "radial",
"decimals": 0,
"differential": false,
"minmax": true,
"colorTrack": "#555555",
"style": "",
"colorFromTheme": true,
"property": "payload",
"secondary": "secondary",
"inline": false,
"animate": true,
"sectors": [
{
"val": 0,
"col": "#ff2600",
"t": "min",
"dot": 0
},
{
"val": 50,
"col": "#fffb00",
"t": "sec",
"dot": 0
},
{
"val": 75,
"col": "#00f900",
"t": "sec",
"dot": 0
},
{
"val": 100,
"col": "#00f900",
"t": "max",
"dot": 0
}
],
"lineWidth": 3,
"bgcolorFromTheme": true,
"diffCenter": "",
"x": 2840,
"y": 220,
"wires": []
},
{
"id": "3d37b310.ac75ac",
"type": "ui_text_input",
"z": "523d8088.4c6f6",
"name": "Fläche",
"label": "Gereiningt bisher ",
"tooltip": "",
"group": "6f2650d1.1682c8",
"order": 17,
"width": 2,
"height": 1,
"passthru": false,
"mode": "number",
"delay": 300,
"topic": "",
"x": 2810,
"y": 260,
"wires": [
[]
]
},
{
"id": "97d5bfc8.d33ee",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "if(msg.payload.clean_area>1){\n var gerundet = Math.round((msg.payload.clean_area/1000000)*100)/100;\n msg.payload= gerundet;\n}else{\n var Gerundet = Math.round((msg.status.clean_area/1000000)*100)/100;\n msg.payload= Gerundet;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 260,
"wires": [
[
"3d37b310.ac75ac"
]
],
"l": false
},
{
"id": "4456c6ba.b958d",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "if (msg.payload.state == 8){\n msg.payload = false;\n return msg;\n}\nif (msg.status.state == 8){\n msg.payload = false;\n return msg;\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2235,
"y": 100,
"wires": [
[
"9789f465.79236"
]
],
"l": false
},
{
"id": "904eff79.4f0048",
"type": "change",
"z": "523d8088.4c6f6",
"name": "",
"rules": [
{
"t": "move",
"p": "status.state_text",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2675,
"y": 160,
"wires": [
[
"2ae477c8.2c1228"
]
],
"l": false
},
{
"id": "e8558d17.b0f6",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Roomcleaning Robi",
"server": "33ded10a.293bae",
"command_name": "► Start room cleaning",
"command": "app_segment_clean",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": null,
"homekit_stop_to_dock": false,
"x": 2430,
"y": 380,
"wires": [
[]
]
},
{
"id": "2d8ce74d.8a5ac",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "6f2650d1.1682c8",
"order": 18,
"width": 2,
"height": 1,
"passthru": false,
"label": "Essen",
"tooltip": "Reinigt Breih Esstisch",
"color": "yellow",
"bgcolor": "gray",
"icon": "restaurant",
"payload": "16",
"payloadType": "num",
"topic": "",
"x": 2230,
"y": 360,
"wires": [
[
"e8558d17.b0f6"
]
]
},
{
"id": "62c8e5c.084c71c",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "6f2650d1.1682c8",
"order": 21,
"width": 2,
"height": 1,
"passthru": false,
"label": "Küche",
"tooltip": "Reinigt die Küche",
"color": "yellow",
"bgcolor": "gray",
"icon": "kitchen",
"payload": "3",
"payloadType": "num",
"topic": "",
"x": 2230,
"y": 320,
"wires": [
[
"e8558d17.b0f6"
]
]
},
{
"id": "1aa85659.91a32a",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "6f2650d1.1682c8",
"order": 19,
"width": 2,
"height": 1,
"passthru": false,
"label": "Büro",
"tooltip": "Reinigt Gästezimmer und Sportecke",
"color": "yellow",
"bgcolor": "gray",
"icon": "portrait",
"payload": "17",
"payloadType": "num",
"topic": "",
"x": 2230,
"y": 400,
"wires": [
[
"e8558d17.b0f6"
]
]
},
{
"id": "1798e9b.b524e16",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "6f2650d1.1682c8",
"order": 20,
"width": 2,
"height": 1,
"passthru": false,
"label": "Wohnen",
"tooltip": "Reinigt den Breich um die Lola",
"color": "yellow",
"bgcolor": "gray",
"icon": "airline_seat_recline_extra",
"payload": "19",
"payloadType": "num",
"topic": "",
"x": 2220,
"y": 440,
"wires": [
[
"e8558d17.b0f6"
]
]
},
{
"id": "564179ae.6f953",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "6f2650d1.1682c8",
"order": 14,
"width": 0,
"height": 0,
"passthru": false,
"label": "Dockingstation",
"tooltip": "Schickt Staubsauger in die Docking Station",
"color": "yellow",
"bgcolor": "gray",
"icon": "inbox",
"payload": "true",
"payloadType": "bool",
"topic": "",
"x": 2200,
"y": 480,
"wires": [
[
"d99e4acf.a5e068"
]
]
},
{
"id": "d99e4acf.a5e068",
"type": "miio-roborock-command",
"z": "523d8088.4c6f6",
"name": "Dock Robi",
"server": "33ded10a.293bae",
"command_name": "Dock",
"command": "app_charge",
"commandType": "vacuum_cmd",
"payload": "payload",
"payloadType": "msg",
"coordinates": "",
"fan_speed": 100,
"voice_pack": "5000",
"homekit_stop_to_dock": false,
"x": 2410,
"y": 440,
"wires": [
[]
]
},
{
"id": "68d957b7.42fd8",
"type": "link in",
"z": "523d8088.4c6f6",
"name": "",
"links": [
"940e4c90.5f43d8",
"61d8a102.9dfe38",
"3e0cf7c4.7d4648"
],
"x": 2135,
"y": 40,
"wires": [
[
"d9d0b9ad.055a48",
"43712cdc.e0b68c"
]
]
},
{
"id": "fb5a9059.82aea",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "if (msg.payload.battery > 1 ){\n msg.payload = msg.payload.battery\n}else{\n msg.payload = msg.status.battery\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 220,
"wires": [
[
"ce2da1ca.c06e28"
]
],
"l": false
},
{
"id": "26477654.b220c2",
"type": "function",
"z": "523d8088.4c6f6",
"name": "",
"func": "if (msg.payload.fan_power > 1 ){\n msg.payload = msg.payload.fan_power\n}else{\n msg.payload = msg.status.fan_power\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2635,
"y": 100,
"wires": [
[
"c28fd439.0bfc78"
]
],
"l": false
},
{
"id": "6d2e2c0.134c354",
"type": "ui_button",
"z": "523d8088.4c6f6",
"name": "",
"group": "29e9fefa.6b3982",
"order": 20,
"width": 2,
"height": 1,
"passthru": false,
"label": "Gast",
"tooltip": "Reinigt Gästezimmer und Sportecke",
"color": "yellow",
"bgcolor": "gray",
"icon": "portrait",
"payload": "18",
"payloadType": "num",
"topic": "",
"x": 2230,
"y": 280,
"wires": [
[
"e8558d17.b0f6"
]
]
},
{
"id": "8aef6dee.73fad8",
"type": "debug",
"z": "523d8088.4c6f6",
"name": "Debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2990,
"y": 520,
"wires": []
},
{
"id": "6f2650d1.1682c8",
"type": "ui_group",
"name": "OG",
"tab": "5d27dbbe.e9d0e4",
"order": 2,
"disp": true,
"width": "7",
"collapse": false
},
{
"id": "33ded10a.293bae",
"type": "miio-roborock-server",
"name": "RobiS5",
"ip": "192.168.2.132",
"token": "71596c4235354934634b694358417a5a",
"polling": "20"
},
{
"id": "29e9fefa.6b3982",
"type": "ui_group",
"name": "EG",
"tab": "5d27dbbe.e9d0e4",
"order": 3,
"disp": true,
"width": 7,
"collapse": false
},
{
"id": "5d27dbbe.e9d0e4",
"type": "ui_tab",
"name": "Steuern",
"icon": "accessibility",
"order": 1,
"disabled": false,
"hidden": false
}
]
@Donni1966
Copy link
Author

Donni1966 commented Feb 10, 2021

Roborock oder Xiaomi Staubsauger (s1-s6) im Dashboard.

Da es mit immer zu viel Arbeit ist, das Smartfone zu suchen und die App auf zu machen, nur um eben mal die Küche zu saugen und ich zudem nicht so der Sprachinsel für Alexa bin, hab ich im Esszimmer medienpolitisch gut platziert einen 3er Raspi im Gehäuse mit Display stehen. Dort sind so diverse Statusanzeigen. nUnteranderem nun auch für die drei Saugroboter. (Hab drei Stockwerke und Treppen gehen können die Dinge ja nicht)

Also hab ich einen Flow gebastelt, den hier gerne teilen möchte.

Was brauchst

  • Node-Red (RedMatic)
  • Dashboard also Palette, einrichtet und in meinem Fall eigene Seite
  • Saugroboter der in der Xiaomi App geht. Ich habe einen S1 und zwei S5
  • IP Adresse des Dings
  • Token. (Auslesen - nix für Anfänger)
  • UI LED
  • UI Botton
  • Artless Gauge
  • Text
  • node-red-contrib-miio-roborock

Einrichten

Hat es erst mal den Token, dann ein Config Node machen, deployen und ich habe immer ein Debug, volles Nachrichten Element um zu lesen was kommt. Intervall hab ich von 10s auf 30 erhöht, weil sonst Node so viel zu tun hat.
Es gibt zwei Nodes. Eines zum Status Abfragen der Bürste, Filter und Akku etc und einen zum Steuern. Da nehme ich Start Stop, Docking und RoomCleaning. Dann noch Saugleistung einstellen. Die frage ich zyklisch an ( alle 10 Minuten ) beziehungsweise Daten die sich ab, wenn sich etwas verändert also den obenstehendes Intervall 30 Sekunden. Das reicht in der Regel.

Raumnummern finden

Das ist etwas nervig und aufwendig. Läuft der S5/6 - also die die Räume erkennen - einmal durch nummeriert er die Räume von 1-x Den ersten den er gefunden/erkannt hat und dann den nächsten. Das ist keinesfalls irgendwie logisch. Sobald man aber die Karte editiert ändern sich die Nummern deren, die man getrennt oder zusammengefügt hat in 16,17,18,19. Diese Integer übergebe ich mit einem Botton auf dem die Symbole sind an die Steuerung.
Zum herausfinden einfach Buttons machen und mit Inject an den Node schicken und in der App sehen, welcher Raum farbig wird. Dann hat man schnell raus welche Nummer welcher Raum ist.

Besonderheiten

Steht der Sauger kommt der Status aus dem Payload.xxx und kann ausgewertet werden. Ich habe das mit Funktionen gemacht, weil ich flexibel Abfragen brauche. Denn läuft der Sauger kommt der Status aus msg.status.

  • die Fläche sind qmm
  • Zeit in Sekunden
    Ich runde das und rechne es in verständliche Werte um. Siehe in den Funktionen nach. Kann sein, dass es einfacher geht, mir hat es so gereicht erst mal.

Fazit

Schnell auf "Küche" und losgeht. Zulaut, dann regelt. Filter, Sensoren, wann muss ich was machen. Und schon ist das auch für "Frau" tauglich :-)

updates hier: flow

byby, Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment