We have an extensive library of various bOS configuration examples. Select your heating pump, AC, TV or almost any other device and import it to your smart building configuration. We also encourage all system integrators and DIYs to add their own examples to ComfortClick library.
This example shows in great detail how to communicate EnOcean with bOS, using Node-RED via RPC.
Step by step instructions are also available in the video below, where each step is shown and explained in great detail
Please Check this Node-RED flow sample.
[
{
"id": "8caef655.4395a8",
"type": "serial in",
"z": "7a502bad.9d7694",
"name": "EnOceanReceiver",
"serial": "9474b3e6.c9589",
"x": 210,
"y": 180,
"wires": [
[
"4a9dd0fa.be43a"
]
]
},
{
"id": "15fa1594.3601ea",
"type": "debug",
"z": "7a502bad.9d7694",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 380,
"wires": []
},
{
"id": "4d01766f.c8b178",
"type": "function",
"z": "7a502bad.9d7694",
"name": "Switch DATA",
"func": "var data = msg.payload.Data1;\nvar value; // Occupied : true / unoccupied : false\n\nif ( data == 84) {\n\n value = true;\n msg.payload = value;\n return msg;\n \n \n} else if ( data == 88 ) {\n\n value = false;\n msg.payload = value;\n return msg;\n \n}\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 430,
"y": 300,
"wires": [
[
"5d875d2d.f16884"
]
]
},
{
"id": "4a9dd0fa.be43a",
"type": "function",
"z": "7a502bad.9d7694",
"name": "EnOcean decoder",
"func": "//EnOcean telegram decoder\n//2017.10.8 created\n//\nvar date = new Date();\n//\nvar ESP3_Packet = msg.payload;\n\n//\nvar Header = ESP3_Packet.slice(1,5);\nvar DataLength = 256*ESP3_Packet[1]+ESP3_Packet[2];\n//\nvar RawData = ESP3_Packet.slice(6,6+DataLength);\nvar ERP2_Header = RawData.slice(0,1).toString(\"hex\");\nvar EEP = \"RPS\";\nvar OriginatorID = \"00000000\";\nvar Data1 = \"00\";\nvar Data4 = \"00000000\";\n//\nvar OptionalData = ESP3_Packet.slice(6+DataLength,8+DataLength);\nvar SubTelNum = OptionalData.slice(0,1);\nvar dBm = OptionalData.slice(1,2);\n//\nswitch(ERP2_Header){\n //normal telegram\n case \"20\"://RPS telegram\n EEP = \"RPS\";\n OriginatorID = RawData.slice(1,5).toString(\"hex\");\n Data1 = RawData.slice(5,6).toString(\"hex\");\n break;\n case \"21\"://1BS normal telegram\n EEP = \"1BS\";\n OriginatorID = RawData.slice(1,5).toString(\"hex\");\n Data1 = RawData.slice(5,6).toString(\"hex\");\n break;\n case \"22\"://4BS normal telegram\n EEP = \"4BS\";\n OriginatorID = RawData.slice(1,5).toString(\"hex\");\n Data4 = RawData.slice(5,9).toString(\"hex\");\n break;\n //teach-in telegram\n case \"61\"://1BS teach-in telegram\n EEP = \"1BS teach-in\";\n OriginatorID = RawData.slice(3,7).toString(\"hex\");\n Data1 = RawData.slice(7,8).toString(\"hex\"); \n break;\n case \"62\"://4BS teach-in telegram\n EEP = \"4BS teach-in\";\n OriginatorID = RawData.slice(3,7).toString(\"hex\");\n Data4 = RawData.slice(7,11).toString(\"hex\");\n break;\n default:\n break;\n}\n\nmsg.payload = {\n Time : date.toString(),\n OriginatorID:OriginatorID,\n EEP : EEP,\n Data1:Data1,\n Data4:Data4,\n SubTelNum:SubTelNum,\n dBm:dBm\n};\n\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 330,
"y": 240,
"wires": [
[
"4d01766f.c8b178"
]
]
},
{
"id": "eae75f16.aad9f",
"type": "http request",
"z": "7a502bad.9d7694",
"name": "",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://RPC:RPC@192.168.1.8/API/RPC/SetValue",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 590,
"y": 420,
"wires": [
[
"15fa1594.3601ea"
]
]
},
{
"id": "5d875d2d.f16884",
"type": "template",
"z": "7a502bad.9d7694",
"name": "SET JSON",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "mustache",
"template": "{\"objectName\":\"Devices\\\\KNX\\\\Lamp\",\"valueName\":\"Value\",\"value\": \"{{payload}}\" }",
"output": "str",
"x": 510,
"y": 360,
"wires": [
[
"eae75f16.aad9f",
"15fa1594.3601ea"
]
]
},
{
"id": "9474b3e6.c9589",
"type": "serial-port",
"serialport": "COM4",
"serialbaud": "57600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "100",
"bin": "bin",
"out": "time",
"addchar": "",
"responsetimeout": "10000"
}
]
Please login to post a comment.
We use cookies to personalize content, use live chat, provide social media features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.