Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read Serial (RS485) Data
#21
(06-12-2022, 09:34 PM)v1rtus Wrote: The serial port is connected, could u please send me a command that I can use for testing. For example read relays statuses or turn on/off single relay.

if your KC868-Server RS485 address is "1" and "9600bps" have set. You can send these commands by serial port to test whether output1 is ON or OFF.

turn relay1 on: 01 05 00 00 FF 00 8C 3A
turn relay1 off: 01 05 00 00 00 00 CD CA
Reply
#22
   

Unfortunately it did not work even with USB -> RS485 adapter.

   

Server RS485 settings.

Any ideas?
Reply
#23
send data by binary format, because it's HEX format data.
Reply
#24
Smile 
Thanks for the hint Smile

I converted hex to binary: 01 05 00 00 FF 00 8C 3A -> 000100000101000000000000000011111111000000001000110000111010 but unfortunately nothing changed, the error is same.

   

could u may be record some video to show how u use the serialport with Kincony Server?
Reply
#25
already have this video tour: how to use turn on/off relay by Node-Red serial. You can do as this video, the protocol of RS232 as same as KC868-Server's . 
Reply
#26
I finally managed to make internal RS485 (orange) working.

OS: Ubuntu Core 20.04.4 LTS

Steps:

  1. Open cmdline.txt
  2. Remove console=serial0,115200
  3. Reboot

I am running node-red in docker so I had to also map /dev/ttyS0 as device and give read/write permissions.

   
Reply
#27
ok, great. Thank you for your efforts.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)