I’m trying to tie a modbus PLC into HA for monitoring inside a brewery. We’re using a Solo SL-4848. I need to be able to reset the SV (set point) if needed. According the the docs, the SV register decimal address is 44098.
I can confirm that dropping the leading 4 was all that was needed to write to this register. I’m also seeing that I must send a decimal value (21.0 vs 21) to get the right setting. Specifying 21 gets me 2.1 in the register.
Thanks again @nikito7
I have a follow-on question. How do I use the modbus configuration to receive alarms from the controller? The docs say
"ALA1 and ALA2 are both SPST normally open relay
outputs."
That leads me to believe I’ll need to connect something to these terminals that can generate something HA can read in the event of an alarm. Any idea what to use? Maybe an ESPhome device that will detect contact closure?
Hi, friends - this project is coming along. Or more to the point, my understanding of modbus and how to interface with HA is coming along!
My current issue is that the value in the registers I’m reading are temps in ℃ with .1 precision. However, if I have to them with a data_type of int16. If I read with a type of float, they report back as 32.0F (the system is converting the C to F. ) Update: Reading as a float16 with no unit_of_meas give a value of 0.0
When I read as int16, 22.5 is returned as 225.
I guess I can approach this with a template.
Any thoughts on what might be happening?
Here is my current config
- name: hub4
type: serial
baudrate: 9600
bytesize: 7
method: ascii
parity: E
port: /dev/ttyUSB0
stopbits: 1
sensors:
# Ideas: Monitor PV for history & alerts
- name: "PresentValue"
unit_of_measurement: °C
slave: 1
address: 4097
scan_interval: 10
data_type: int16
precision: 1
device_class: temperature
input_type: holding
FWIW, here is the description information on this register:
The display of the devices shows valid values for the PresentValue with the probe I have attached so there shouldn’t be an error code in the register.
As always - thanks for reading.
And one more thing I verified - as @nikito7 say proposed - besides dropping the leading “4” I do indeed need to subtract one from the remaining “4097” to get the correct register.
I did, in fact, try this in my marathon session yesterday. I’m not getting good results from the bit register. Well, they aren’t telling me what I expect them to tell me.
Still workng it