[
{
"id": "fa70063aa6cc13e5",
"type": "function",
"z": "e01704e88daf9bd8",
"name": "",
"func": "/*\n\tobject\t\t{5}\nbrightness\t:\t1\nlinkquality\t:\t34\nstate\t:\tOFF\n\tupdate\t\t{1}\nstate\t:\tidle\nupdate_available\t:\tfalse\n\n*/\n\n// {\"brightness\":2,\"linkquality\":73,\"state\":\"OFF\",\"update\":{\"state\":\"available\"},\"update_available\":true}\nvar Knoten = \"Osram-Wozi\"\n\nvar brightness = msg.payload.brightness\nvar qual = msg.payload.linkquality\nvar state = msg.payload.state\n\nmsg.payload = [{\n Room: Knoten,\n Bright: brightness,\n Qual: qual,\n State: state\n}]\n\nvar newMsg1 = {payload:brightness};\nvar newMsg2 = {payload:state};\nvar newMsg3 = {payload:qual};\nvar newMsg4 = {payload:msg};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Brightness: \" + brightness + \", Qual: \" + qual + \"%, State: \" + state });\n\nreturn [newMsg1, newMsg2, newMsg3, newMsg4];",
"outputs": 4,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 660,
"y": 340,
"wires": [
[
"7f49a0b6c97c766f"
],
[
"42dbc9c5f44f5393",
"d40e1d835a269727"
],
[
"2b193d7f0bea84d1"
],
[
"c2d2743b6b3afeda"
]
]
},
{
"id": "e601a1b68317dae6",
"type": "json",
"z": "e01704e88daf9bd8",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 450,
"y": 340,
"wires": [
[
"fa70063aa6cc13e5"
]
]
},
{
"id": "d5040952edafdc24",
"type": "mqtt in",
"z": "e01704e88daf9bd8",
"name": "",
"topic": "/home/zigbee/Osram-Flur/#",
"qos": "2",
"datatype": "auto",
"broker": "9d4f73b8.d5ee7",
"nl": false,
"rap": false,
"x": 210,
"y": 340,
"wires": [
[
"e601a1b68317dae6"
]
]
},
{
"id": "c2d2743b6b3afeda",
"type": "debug",
"z": "e01704e88daf9bd8",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 360,
"wires": []
},
{
"id": "2b193d7f0bea84d1",
"type": "ui_gauge",
"z": "e01704e88daf9bd8",
"name": "Link Quality",
"group": "7b5e04a5.3567dc",
"order": 4,
"width": "0",
"height": "0",
"gtype": "gage",
"title": "Link Quality",
"label": "%",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#ff0000",
"#e6e600",
"#00ff01"
],
"seg1": "",
"seg2": "",
"x": 930,
"y": 320,
"wires": []
},
{
"id": "d40e1d835a269727",
"type": "ui_switch",
"z": "e01704e88daf9bd8",
"name": "",
"label": "Ein / Ausschalter",
"tooltip": "",
"group": "7b5e04a5.3567dc",
"order": 2,
"width": "0",
"height": "0",
"passthru": false,
"decouple": "true",
"topic": "/home/zigbee/Osram-Flur/set",
"topicType": "str",
"style": "",
"onvalue": "ON",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "OFF",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"animate": false,
"x": 950,
"y": 260,
"wires": [
[]
]
},
{
"id": "42dbc9c5f44f5393",
"type": "ui_led",
"z": "e01704e88daf9bd8",
"group": "7b5e04a5.3567dc",
"order": 3,
"width": "0",
"height": "0",
"label": "Ein / Aus LED",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "#ff0000",
"value": "OFF",
"valueType": "str"
},
{
"color": "#008000",
"value": "ON",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "",
"x": 910,
"y": 220,
"wires": []
},
{
"id": "7f49a0b6c97c766f",
"type": "range",
"z": "e01704e88daf9bd8",
"minin": "1",
"maxin": "255",
"minout": "1",
"maxout": "100",
"action": "scale",
"round": true,
"property": "payload",
"name": "",
"x": 820,
"y": 180,
"wires": [
[
"62845e72d7d8ed95"
]
]
},
{
"id": "62845e72d7d8ed95",
"type": "ui_slider",
"z": "e01704e88daf9bd8",
"name": "Helligkeit",
"label": "Helligkeit",
"tooltip": "",
"group": "7b5e04a5.3567dc",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"outs": "end",
"topic": "/home/zigbee/Osram-Flur/set",
"topicType": "str",
"min": "1",
"max": "100",
"step": "2",
"x": 900,
"y": 100,
"wires": [
[
"3fa4afb2d2449d62"
]
]
},
{
"id": "3fa4afb2d2449d62",
"type": "range",
"z": "e01704e88daf9bd8",
"minin": "1",
"maxin": "100",
"minout": "1",
"maxout": "255",
"action": "scale",
"round": true,
"property": "payload",
"name": "",
"x": 1000,
"y": 180,
"wires": [
[]
]
},
{
"id": "9d4f73b8.d5ee7",
"type": "mqtt-broker",
"name": "miti32",
"broker": "192.168.126.40",
"port": "1883",
"clientid": "",
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "7b5e04a5.3567dc",
"type": "ui_group",
"name": "Osram-Flur",
"tab": "67152ec1.2f63e",
"order": 2,
"disp": true,
"width": "5",
"collapse": false
},
{
"id": "67152ec1.2f63e",
"type": "ui_tab",
"name": "Licht",
"icon": "dashboard",
"order": 4,
"disabled": false,
"hidden": false
}
]
Comments