![]() |
|
Button switch module directly connected to PC with home assistant and Node Red - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: KC868-HxB series Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=2) +--- Thread: Button switch module directly connected to PC with home assistant and Node Red (/showthread.php?tid=1713) |
Button switch module directly connected to PC with home assistant and Node Red - Jirka - 02-22-2022 Hi. I need to connect and read data from button switch module in home assistant, resp. in Node red. I have connected RS232 (button switch module) to USB (PC with home assistant and Node red). Can someone please help me what should I set in home assistant up. Resp. what node in Node red should I use? Settings of this node? Thank you. Jirka RE: Button switch module directly connected to PC with home assistant and Node Red - admin - 02-23-2022 if you connect switch terminal board to PC by USB-RS232, every time when you pressed the button will auto feedback message to RS232, the information will have which key is pressed and the newest output state. you can decode these string message in home assistant or Node-Red. the protocol content as same as network's . here is link of protocol: https://www.kincony.com/smart-controller-development-protocol.html mainly see this: 8.Change the converse state of the relay Send:RELAY-KEY-255,x,1 (x is the channel of Relay) Feedback:RELAY-KEY-255,x,1,OK (x is the channel of Relay) change the status of one relay, such as your relay is ON, when send this command , relay will be OFF. if your relay is OFF, when send this command , relay will be ON. RE: Button switch module directly connected to PC with home assistant and Node Red - Jirka - 03-13-2022 (02-23-2022, 07:58 AM)admin Wrote: if you connect switch terminal board to PC by USB-RS232, every time when you pressed the button will auto feedback message to RS232, the information will have which key is pressed and the newest output state. you can decode these string message in home assistant or Node-Red. the protocol content as same as network's . here is link of protocol: https://www.kincony.com/smart-controller-development-protocol.html Hi. Thank you for your answer. I have connected switch terminal board to PC by USB-RS232. I´m running Home asssistant in virtualbox and using node red in home asssistant. With node "serial in" after configuration serial port (USB1), I´m getting weird string in debug - as you can see on printscreen. I was changing "Baud rate, but no one except 57600 wasn´t working. Can you help me to solve this problem? Thx. Jirka RE: Button switch module directly connected to PC with home assistant and Node Red - admin - 03-14-2022 Baud rate is 115200bps, not 57600bps RE: Button switch module directly connected to PC with home assistant and Node Red - Jirka - 03-14-2022 (03-14-2022, 01:27 AM)admin Wrote: Baud rate is 115200bps, not 57600bps Hi. There is nothing in debug with baud rate 115200bps. I'm using serial cross cable female to female. DB9F-DB9F. And this cable is connected through "Blue cable DB9M to USB" to computer with home assistant. Do you think there can be problem with DB9F-DB9F cable? Should it be crossed? Thx for your answer. Jirka RE: Button switch module directly connected to PC with home assistant and Node Red - admin - 03-14-2022 can you take a photo how you wire? i think maybe you can exchange Pin2 and Pin3 of DB9. RE: Button switch module directly connected to PC with home assistant and Node Red - Jirka - 03-15-2022 (03-14-2022, 08:31 PM)admin Wrote: can you take a photo how you wire? Hi. This is my DB9F-DB9F cable. RE: Button switch module directly connected to PC with home assistant and Node Red - admin - 03-15-2022 our switch terminal board only need use 2,3,5 pins RE: Button switch module directly connected to PC with home assistant and Node Red - Jirka - 03-15-2022 (03-15-2022, 07:48 AM)admin Wrote: our switch terminal board only need use 2,3,5 pins So, I should change pin 2 and 3. OK. Will try ? Thx for your answer. Jirka RE: Button switch module directly connected to PC with home assistant and Node Red - admin - 03-15-2022 yes, exchange 2 with 3 pin have a test. |