Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read Serial (RS485) Data
#11
yes, install serial node
Reply
#12
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.
Reply
#13
ok, you can try to use another.
Reply
#14
Sad 
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.
Reply
#15
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/raspio...m64.img.xz
Reply
#16
Sad 
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
Reply
#17
there is information about this in node-red forum: https://discourse.nodered.org/t/modbus-f...ng/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.
Reply
#18
   

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.
Reply
#19
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.
Reply
#20
Sad 
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.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)