Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read feedback values from BusPro-in node #1

Open
barkrakk opened this issue May 10, 2018 · 1 comment
Open

Read feedback values from BusPro-in node #1

barkrakk opened this issue May 10, 2018 · 1 comment

Comments

@barkrakk
Copy link

Hi,

Does the BusPro-in node support reading a dimmer channel's level? Or reading temperature from an PIR device?

Possible to share a flow where this functionality is implemented?

@Destix
Copy link

Destix commented May 11, 2018

Here what i've done:

[{"id":"4850faeb.01fd74","type":"function","z":"a5118954.594eb8","name":"50 from 1.1","func":"if (msg.sender == \"1.1\" && msg.code == 50 && msg.payload.success == true) \n {\n msg.topic = \"hdl/\" + msg.sender + \"/ch\" + msg.payload.channel;\n msg.payload = msg.payload.level;\n\n return msg;\n}\n\n","outputs":1,"noerr":0,"x":250,"y":540,"wires":[["a93b9a05.e61848","356ba433.80f3cc"]]},{"id":"aa53dcd7.a6867","type":"buspro-in","z":"a5118954.594eb8","controller":"965141c7.56bd9","name":"HDL Gate","x":80,"y":560,"wires":[["4850faeb.01fd74","c503b8d1.3391d8","65bfd47f.860adc"]]},{"id":"c503b8d1.3391d8","type":"function","z":"a5118954.594eb8","name":"52 from 1.1 ","func":"var outputMsgs = [];\nif (msg.sender == \"1.1\" && msg.code == 52) {\n for (i = 0; i < msg.payload.channels.length; i++) {\n// msg.topic = \"hdl/\" + msg.sender + \"/ch\" + msg.payload.channels[i].number;\n// msg.payload = msg.payload.channels[i].level;\n outputMsgs.push({\n topic:\"hdl/\" + msg.sender + \"/ch\" + msg.payload.channels[i].number,\n payload:msg.payload.channels[i].level\n });\n// outputMsgs.push({payload:msg.payload.channels[i].level});\n }\n return [ outputMsgs ];\n}","outputs":1,"noerr":0,"x":250,"y":580,"wires":[["a93b9a05.e61848","bd1abac3.10a298"]]},{"id":"a93b9a05.e61848","type":"mqtt out","z":"a5118954.594eb8","name":"hdl/X.X/chY","topic":"","qos":"0","retain":"true","broker":"d110fe62.0ec2","x":470,"y":560,"wires":[]},{"id":"bd1abac3.10a298","type":"debug","z":"a5118954.594eb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":470,"y":620,"wires":[]},{"id":"965141c7.56bd9","type":"buspro-controller","z":0,"host":"192.168.1.20","port":"6000","subnetid":"1","deviceid":"100"},{"id":"d110fe62.0ec2","type":"mqtt-broker","z":"","name":"hassio.local","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

You also need to edit this source https://github.com/caligo-mentis/smart-bus
I just search and replace all "status" to "state" becouse status is a function in node-red.
(also opened an issue caligo-mentis/smart-bus#3)

Still dont know how to send request with Command Code: 0x0033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants