Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button switch module directly connected to PC with home assistant and Node Red
#1
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
Reply
#2
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...tocol.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.
Reply
#3
(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...tocol.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.

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


Attached Files Image(s)
   
Reply
#4
Baud rate is 115200bps, not 57600bps
Reply
#5
(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
Reply
#6
can you take a photo how you wire?
i think maybe you can exchange Pin2 and Pin3 of DB9.
Reply
#7
(03-14-2022, 08:31 PM)admin Wrote: can you take a photo how you wire?
i think maybe you can exchange Pin2 and Pin3 of DB9.

Hi. This is my DB9F-DB9F cable.


Attached Files Image(s)
   
Reply
#8
our switch terminal board only need use 2,3,5 pins
Reply
#9
(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
Reply
#10
yes, exchange 2 with 3 pin have a test.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)