Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tuya adapter V2 arduino source code - RS485 relay controller KC868-H32BS
#7
Hi, I have read the ModbusRTUslave libary manual, and I have modify existing code, with my basic knowledge - 
Adapter is working as a MODBUS RTU Slave with such parameters 
addresss - 2
baund 9600

None



It is working correctly with PLC as Master with coil READ, Adapter is working as Slave


I will attache the file for other users 

I have also made an WRITE option for coils, but that need to be tested - it is usefull if the state of coil change in the PLC then the change is visible on the adapter app (for example You swith on the light and the status in Tuya app will be changed) , as the coil status is overwritten in the adapter in the loop - that cause some issues with stable switching on or off - as there are some transmision going so you could switch on and the incoming transmision will switch off - so if enybody has an idea how to solve it that will be nice


Attached Files
.zip   Tuya_adapter_v2_ModbusRTUSLAVE_addres2.zip (Size: 2.42 KB / Downloads: 311)
Reply


Messages In This Thread
RE: Tuya adapter V2 arduino source code - RS485 relay controller KC868-H32BS - by Bart - 09-05-2024, 07:46 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)