Attached modbus register map.
Bought this sensor from ( 토양 전기 전도도 센서 0 2V 4 20mA RS485 토양 수분 토양 온도 습도 토양 EC 센서 two three in one|Sensors| - AliExpress )
My current esphome.yaml:
uart:
id: mod_bus
tx_pin: 3
rx_pin: 1
baud_rate: 9600
stop_bits: 1
debug:
direction: BOTH
modbus_controller:
- id: temp
address: 0
command_throttle: 5s
setup_priority: -10
update_interval: 10s
sensor:
- platform: modbus_controller
modbus_controller_id: temp
name: "Temp"
address: 0
register_type: "read"
value_type: S_WORD
unit_of_measurement: C
I have no idea what’s wrong with my setup and yaml.
Sensor is okay with provided programme with rs485 to usb converter in PC.
However, with esphome I cant get any data abobe configuration…
nickrout
(Nick Rout)
2
Do you need this too? Modbus Component — ESPHome
The example has uart
, modbus
and modbus_controller
I do already set modbus config in my esphome.yaml as you can see above.
However, I dont know how to set modbus parameter in esphome.yaml such as register,address etc…
nikito7
(nikito7)
5
command_throttle: 5s
setup_priority: -10
update_interval: 10s
To
command_throttle: 250ms
setup_priority: -10
update_interval: 10s
Just an example
# ....
id: modbus_serial
rx_pin: 3
tx_pin: 1
baud_rate: 9600
stop_bits: 1
modbus:
#flow_control_pin: 5
id: modbus1
uart_id: modbus_serial
modbus_controller:
- id: edpbox
update_interval: 31s
address: 0x1
command_throttle: 150ms
setup_priority: -10
sensor:
#...
Thanks.
Would you share your device’s modubus register map to compare with mine?
nickrout
(Nick Rout)
7
No I cannot. I see uart:
and modbus_controller:
but not modbus:
Ohhhh.
I am reallly sorry for that. Forget to add modbus: configuration…
Will check again and let you know soon!
Thank you
Still getting error in the logs with no data connection…
What’s wrong with my setup?
PastorP
(Gene)
11
Did you ever figure this out? I have a few of these just sitting around and would love to actually get them working