Reading another device over modbus
This function is useful if want to get data from another device like a powermeter or an arduino.
Note:
- At the moment only reading of holding registers is supported.
- The device has to use 9600 Baud.
- Open the config.h file and uncomment the line
#define otherNode
- Change the slave ID.
- Set the start-register.
- Set the number how many register should be read.
- Set the interval.
- (Optional) Set the mqtt-topic.
- Upload it on your controller.
HTTP API
Endpoint:
<IP-from-your-ESP>/api/otherNode/holdingRegisters
Example output
0,1,2