Smart Home Automation Forum
Read Serial (RS485) Data - 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-Server Raspberry Pi4 local server (https://www.kincony.com/forum/forumdisplay.php?fid=17)
+--- Thread: Read Serial (RS485) Data (/showthread.php?tid=1977)

Pages: 1 2 3


RE: Read Serial (RS485) Data - admin - 06-10-2022

yes, install serial node


RE: Read Serial (RS485) Data - v1rtus - 06-10-2022

NODE-RED sees the /dev/ttyS0 and even connects to it, but every command send fail.

I changed Ubuntu Core to Raspberry Pi OS Lite and still same issue.

I have another KC868-Server, so I will try if there is the same problem.


RE: Read Serial (RS485) Data - admin - 06-11-2022

ok, you can try to use another.


RE: Read Serial (RS485) Data - v1rtus - 06-11-2022

I tried with another KC868-Server and unfortunately the behavior is the same Sad

Steps that I did:

  1. Installed Raspbian Lite
  2. Installed Docker
  3. Installed Portainer
  4. Permissions for /dev/ttyS0 - sudo chmod 666 /dev/ttyS0
  5. Deployed Node-RED container
  6. Installed modbus module
  7. Did configure modbus Read node and deployed it

The node is connected to the serial but when I try to read data from it it returns error - Modbus Failure On State sending Get More About It By Logging

   

I connect CM4 RS485 port to relay port as it is shown in video and try to read relay statuses.

Update:

After I switch to USB-RS485 adapter everything works fine.


RE: Read Serial (RS485) Data - admin - 06-12-2022

i think you can install Installed Raspbian full version.
if have installed Installed Raspbian OS and home assistant all are no problem, just need to enable serial port on CM4. I think it's OS system file setting problem.
i have tested "Raspberry Pi OS with desktop" OS, download link: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-04-07/2022-04-04-raspios-bullseye-arm64.img.xz


RE: Read Serial (RS485) Data - v1rtus - 06-12-2022

I installed the full Raspbian OS x64 (with desktop) and still cannot read data using integrated RS485 port (the error is same) Sad

I installed NODE-RED locally (without docker) and the results are same.
  • /dev/ttyUSB0 - modbus is working fine
  • /dev/ttyS0 - error: Modbus Failure On State sending Get More About It By Logging



RE: Read Serial (RS485) Data - admin - 06-12-2022

there is information about this in node-red forum: https://discourse.nodered.org/t/modbus-failure-on-state-sending/53942/8
i suggest you use "serial" node to test firstly, not need "modbus" node test firstly. so that can confirm whether hardware serial is enabled.


RE: Read Serial (RS485) Data - v1rtus - 06-12-2022

   

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.


RE: Read Serial (RS485) Data - admin - 06-13-2022

if you have USB-RS485 adapter. you can let KC868-Server's RS485 connect to your USB-RS485, let your USB-RS485 connect with a PC, use "serial debug tool" to see whether have received message from KC868-Server.


RE: Read Serial (RS485) Data - v1rtus - 06-13-2022

Never done that before, could u please provide some tutorial?

Could u please provide me some guidelines how to check RS485 port, otherwise looks like the both modules that I have are with defect Sad

If the issue is somewhere with NODE-RED I need to make sure that serialport is working and then I can start looking for some solution.