First venture into MODBUS, how to send a password?

@mr_sjappie Great you got it working (And beat me to it;) )
I'm struggling with Simple Modbus Slave and it's unlicensed mode. It runs for ~30 seconds then continously pops-up with a nagging window, so I'm basically unable to test your settings.

Did you manage to verify the data you're receiving?
 
I have bought a license for Simply Modbus Slave, to much stop and go indeed... And yes, the value's are correct from the 2011 range and up. Still looking on how to send command's. They are in the 1011 register and up. As in the PDF document.

But I have no idea how to do that, maybe our great helper @jschulze has some more idea's. ;)
And if it is handy to upload a IO Ninja datastream let me know.

At the moment it is raining too much to do more testing, wanted to try to read the serial data stream while turning on and off the heat-pump and changing the setpoint. Maybe I can spot something there.

And I plan on trying with a ESP8266 with the modbus slave plugin. The other options are to expensive for just a "fun" project..
 
As far as sending a command, well, in short, slaves simply can't do this. Only masters can initiate requests.

However, from @mrwee's IO Ninja capture, it does appear that the heat pump is attempting to read registers 3001 - 3090 from both addresses 1 and 2. It's possible that the heat pump uses this data that it reads from a slave device (such as the display or WiFi module) as "command" data. Or perhaps there is different request that the heat pump makes to addresses 1 and 2 after it detects the device as existing on the network.

I recommend connecting the display to the heat pump (without Simply Modbus Slave running) and capturing the traffic using IO Ninja. This will give us a better idea of what communication is being exchanged between the two devices.
 
Here is log from IONinja.

Only the display and the RS485 interface connected, and turned the heater off and on with the display. So that data should be in the stream....

Tomorrow I can make some more log's if needed.
 

Attachments

Sorry, but are you able to provide something similar to mrwee's post #31?

This latest attachment is just a large data dump with no indication of packet separation.
 
This file just says "Modbus parse error: Unknown Modbus function" for almost every line.

For what it's worth, I was able to interpret the raw data and the heat pump makes no other requests to the display (which is at address 1) other than Read Holding Registers 3001 - 3090.

So you may need to just look at some of the values in IO Ninja that the display is sending to the heat pump when "sending commands" and see which register(s) change.
 
A different method to determine what the display is sending would be to use Simply Modbus Master (or any other Modbus master software) connected directly to the display (after disconnecting the heat pump, but leaving the display powered so that it doesn't lose the values the heat pump sent to it) to read Holding Registers 3001 - 3090.
 
Again some progress, reading the holding registers worked, take a few times to read, as it fails the crc. I think because of the broadcast messages, but pressing read a few time works.

2021-07-17 14_13_00-QModMaster.jpg

Register 1011 is now 0, if I turn on the heater from the display this turns to 1.
Also the setpoint value changes correctly, register 1013 is now 300, reads 30.0 degrees.

But now the question, how can we change a holding register value?
So for example 1011 to 1 or 0 to turn on or off the heater...

I feel we are almost here. :) :)
 
You were supposed to do this with the heat pump disconnected. That's why you're getting errors because there are two masters on the bus simultaneously trying to send requests.

But now that you know what registers 1011 and 1013 control, you can create definitions for these registers in the Modbus slave simulator software.

Note that, as I mentioned previously, you should not be using Simply Modbus Slave since it does not support broadcasts. You should try this instead
https://www.modbustools.com/modbus_slave.html

You will need to create register definitions for both register ranges: 2001 - 2090 for the monitor data received from the heat pump and 1001 - 1090 for the command data sent to the heat pump.

Since the command data (registers 1001 - 1090) are all sent in one block, you will need to prepopulate the values of all of these registers with the values that the display normally sends. Otherwise you will inadvertantly change several heat pump parameters. Ideally, the 1001 - 1090 registers would be mapped to the same data locations as the 2001 - 2009 registers in the Modbus slave simulator, but this is probably not possible with the software (this can, however, be done with a gateway device such as ICC's Mirius).

You can then change registers 1011 and 1013 in your slave simulator software, and the corresponding values on the heat pump should change.
 
Sorry, I just noticed this mistake. That's what I get for replying early in the morning from my phone...

You should not be using registers 1001 - 1090. Instead, you should be using 3001 - 3090. This is the only register range that the heat pump reads from the display to receive command data.

It's likely that the display (and the heat pump) internally maps all of these registers ranges (1001 - 1090, 2001 - 2090, and 3001 - 3090) to the same memory locations, so you are likely accessing the same data, regardless of which one is used.

Try what I suggested in my last post, but use 3001 - 3090 instead of 1001 - 1090.
 
I have ordered connectors, so I can make a cable where I easily can separate heater & display, while maintaining power to the display. Hope for quick delivery. Impressed about the progress made so far. Hope it will be possible to bridge MQTT and the heater/MODBUS somehow, alternatively direct to Home Assistant.
 
A gateway, such as ICC's Mirius, would allow you to go directly to Home Assistant. However, the gateway would need to be at Modbus address 1 or 2 in order to send commands to the heat pump, and therefore would take the place of either the display or the WiFi module. If you only need to monitor data from the heat pump, the gateway could be at any Modbus address and both the display and WiFi module could still be used.

Details and pricing on the Mirius can be found here:
http://www.iccdesigns.com/protocol-gateways/66-mirius.html

Note that I am the product specialist at ICC for the Mirius, so I can assist configuring it for this application, if needed.
 
A gateway, such as ICC's Mirius, would allow you to go directly to Home Assistant. However, the gateway would need to be at Modbus address 1 or 2 in order to send commands to the heat pump, and therefore would take the place of either the display or the WiFi module. If you only need to monitor data from the heat pump, the gateway could be at any Modbus address and both the display and WiFi module could still be used.

Details and pricing on the Mirius can be found here:
http://www.iccdesigns.com/protocol-gateways/66-mirius.html

Note that I am the product specialist at ICC for the Mirius, so I can assist configuring it for this application, if needed.
Since the App is terrible and slow, I have no problem removing the Wi-Fi module. Would have been nice with a direct MQTT output though :)
 
Since the App is terrible and slow, I have no problem removing the Wi-Fi module. Would have been nice with a direct MQTT output though :)
You could try another gateway, such as this one that supports MQTT
https://www.csimn.com/CSI_pages/MQ-61.html

However, you would need to confirm with the vendor that the gateway supports broadcast messages.

Additionally, if I recall correctly from the packet captures, the display encodes the value 3001 (which is the starting register address) in one of the registers shortly after the serial number. Similarly the heat pump encodes 2001 in its packet, shortly after the serial number. The Mirius does support hard- coding arbitrary values into registers, but I am not sure if this would be possible with the gateway linked above. Although, more testing would be needed to determine if this is even necessary.
 
Top