Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "5c575b3f.c5b7d4",
- "type": "comment",
- "z": "1984610f.e86c6f",
- "name": "Стиральная машина",
- "info": "",
- "x": 120,
- "y": 3520,
- "wires": []
- },
- {
- "id": "65942b15.3f1494",
- "type": "function",
- "z": "1984610f.e86c6f",
- "name": "Parser",
- "func": "msg.payload = {\n power : parseInt(msg.payload)\n}\nreturn msg;\n",
- "outputs": 1,
- "noerr": 0,
- "x": 95,
- "y": 3580,
- "wires": [
- [
- "2e5574c4.f0f35c"
- ]
- ],
- "l": false
- },
- {
- "id": "2e5574c4.f0f35c",
- "type": "change",
- "z": "1984610f.e86c6f",
- "name": "",
- "rules": [
- {
- "t": "move",
- "p": "payload.power",
- "pt": "msg",
- "to": "payload",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 155,
- "y": 3580,
- "wires": [
- [
- "95a3dcfa.d5d34",
- "475048c4.a65d08"
- ]
- ],
- "l": false
- },
- {
- "id": "95a3dcfa.d5d34",
- "type": "power-monitor",
- "z": "1984610f.e86c6f",
- "name": "Стиральная машина",
- "threshold": "4",
- "startafter": "3",
- "stopafter": "5",
- "x": 300,
- "y": 3580,
- "wires": [
- [
- "912cea25.c01818"
- ],
- [
- "1098ad61.9916a3"
- ]
- ]
- },
- {
- "id": "b1aeebfc.4d5298",
- "type": "mqtt in",
- "z": "1984610f.e86c6f",
- "name": "",
- "topic": "shellies/shelly1pm-2462AB00591A/relay/0/power",
- "qos": "2",
- "datatype": "auto",
- "broker": "34443b7c.063704",
- "x": 35,
- "y": 3580,
- "wires": [
- [
- "65942b15.3f1494"
- ]
- ],
- "l": false
- },
- {
- "id": "a7784cc8.36992",
- "type": "change",
- "z": "1984610f.e86c6f",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload.chatId",
- "pt": "msg",
- "to": "CHATID",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.type",
- "pt": "msg",
- "to": "message",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.content",
- "pt": "msg",
- "to": "'Машина закончила стирку '&$now('[Y0000]-[M00]-[D00] [H01]:[m01]:[s01]','+0300')&'\\n'&'Продолжительность стирки составила '&msg.payload.hours&':'&msg.payload.mins&':'&msg.payload.secs&'\\n'&'На это затрачено '&msg.payload.energy&' кВт. электроэнергии'&'\\n'&'Это стоило вам '&msg.payload.energy*3.69&' руб.'",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 575,
- "y": 3600,
- "wires": [
- [
- "95932f0e.caa27",
- "e655883b.c43c28"
- ]
- ],
- "l": false
- },
- {
- "id": "95932f0e.caa27",
- "type": "link out",
- "z": "1984610f.e86c6f",
- "name": "",
- "links": [
- "da0e06ba.3115b",
- "67e06dc0.832244"
- ],
- "x": 815,
- "y": 3560,
- "wires": []
- },
- {
- "id": "912cea25.c01818",
- "type": "change",
- "z": "1984610f.e86c6f",
- "name": "",
- "rules": [
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- },
- {
- "t": "set",
- "p": "payload.chatId",
- "pt": "msg",
- "to": "CHATID",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.type",
- "pt": "msg",
- "to": "message",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.content",
- "pt": "msg",
- "to": "'Машина начала стирку '&$now('[Y0000]-[M00]-[D00] [H01]:[m01]:[s01]', '+0300')",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 455,
- "y": 3560,
- "wires": [
- [
- "95932f0e.caa27"
- ]
- ],
- "l": false
- },
- {
- "id": "5ce9e319.078a7c",
- "type": "change",
- "z": "1984610f.e86c6f",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "Стирка завершена. Не забудьте развесить белье",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 755,
- "y": 3600,
- "wires": [
- [
- "810c29e4.2f7058"
- ]
- ],
- "l": false
- },
- {
- "id": "810c29e4.2f7058",
- "type": "link out",
- "z": "1984610f.e86c6f",
- "name": "",
- "links": [
- "4cca03ba.ec458c"
- ],
- "x": 815,
- "y": 3600,
- "wires": []
- },
- {
- "id": "e655883b.c43c28",
- "type": "time-range-switch",
- "z": "1984610f.e86c6f",
- "name": "",
- "lat": "",
- "lon": "",
- "startTime": "10:30",
- "endTime": "23:00",
- "startOffset": 0,
- "endOffset": 0,
- "x": 695,
- "y": 3600,
- "wires": [
- [
- "5ce9e319.078a7c"
- ],
- []
- ],
- "l": false
- },
- {
- "id": "d55074fd.5136f8",
- "type": "function",
- "z": "1984610f.e86c6f",
- "name": "",
- "func": "var dt = new Date(msg.payload.time);\nvar msg1 = {\n\t'hours':\tdt.getHours()-3,\n\t'mins':\t\tdt.getMinutes(),\n\t'secs':\t\tdt.getSeconds()\n}\nmsg.payload.hours = msg1.hours\nmsg.payload.mins = msg1.mins\nmsg.payload.secs = msg1.secs\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 515,
- "y": 3600,
- "wires": [
- [
- "a7784cc8.36992"
- ]
- ],
- "l": false
- },
- {
- "id": "1098ad61.9916a3",
- "type": "change",
- "z": "1984610f.e86c6f",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "msg.payload.time",
- "pt": "msg",
- "to": "msg.payload.time*1000",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 455,
- "y": 3600,
- "wires": [
- [
- "d55074fd.5136f8"
- ]
- ],
- "l": false
- },
- {
- "id": "475048c4.a65d08",
- "type": "ui_chart",
- "z": "1984610f.e86c6f",
- "name": "",
- "group": "45fb716a.a73b4",
- "order": 15,
- "width": 0,
- "height": 0,
- "label": "Стиральная машина",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "",
- "ymax": "",
- "removeOlder": "3",
- "removeOlderPoints": "",
- "removeOlderUnit": "3600",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#1f77b4",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "useOldStyle": false,
- "outputs": 1,
- "x": 300,
- "y": 3640,
- "wires": [
- []
- ]
- },
- {
- "id": "34443b7c.063704",
- "type": "mqtt-broker",
- "z": "",
- "name": "",
- "broker": "127.0.0.1",
- "port": "1883",
- "clientid": "",
- "usetls": false,
- "compatmode": true,
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "willTopic": "",
- "willQos": "0",
- "willPayload": ""
- },
- {
- "id": "45fb716a.a73b4",
- "type": "ui_group",
- "z": "",
- "name": "Кухня",
- "tab": "daf8cc25.965c6",
- "order": 3,
- "disp": true,
- "width": "6",
- "collapse": false
- },
- {
- "id": "daf8cc25.965c6",
- "type": "ui_tab",
- "z": "",
- "name": "Home",
- "icon": "home",
- "order": 1,
- "disabled": false,
- "hidden": false
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement