MODBUS master sensor node
I'm trying to figure out if it is possible, using this library https://github.com/4-20ma/ModbusMaster , to make a sensor node able to read write data to modbus network in order to control one HVAC mistubishi thermostat of my heat pump.
Is there anybody with modbus experience that can give some advices?
I hooked up my schneider PM9C power monitoring device through modbus to a mysensors node..
Should be doable once you get the initial bus connection running..
Although the familiar RS485 modules on aliexpress etc seem to function just fine when talking to each other, i noticed that it is a pain in the <censored> to get them to talk to a proper device. Especially the direction control screws everything up most of the time..
things cleared up as soon as i started using a RS232 <-> RS485 converter with auto direction control.. Communicating with a single device is one thing, talking to a bus system connecting multiple devices is a whole different ballgame where propper bus termination etc. becomes important.
Biggest problem is that you have to get the hardware for the connection right AND figure out the use of the lib etc.. The other part is having to figure out how your modbus devices present their data..
Search for a good manual for your devices, specifying the various registers to read and write to, including their format etc. It's not that hard, but most devices wont respond at al unlessyou format things exactly right.
So my advice is to split the steps to make sure each part functions on its own before trying to talk end to end.
Use a program like modbuspoll or something and see if you can get the communication going using simple queries to a single HVAC unit using a simple usb converter (i used a little moxa converter). If that works, expand to talking to multiple on the full bus.
Try reading single registers and setting simple things.
if that all works well with the manual queries from modbuspoll or other software, transition to using your mysensors node and libs..
Can you provide some more information about the device types you are using ?
Disregard my post since after further investigation I found that it is not modbus but it's actually M-Net
This post is deleted!