mprowe
(Martin)
May 13, 2022, 2:29pm
1
Hi,
New around here, so I hope I’m doing this right?
I have bought a XY-MD02 MODBUS unit for the test bench and a 3v TTL to RS485 to interface to a Wemos D1 Mini Pro.
Could someone offer me an example yaml file to get me going.
Thanks in advance, M.
polclota
(Pol Clota)
September 24, 2023, 1:48pm
2
sensor:
- platform: modbus
registers:
- name: "XY-MD01-1 temp"
unit_of_measurement: "°C"
slave: 5
register: 1
register_type: input
scale: 0.0913
# scale: 0.1
precision: 1
offset: 0
hub: USBhub
# 185 real 16.9
- name: "XY-MD01-1 humy"
slave: 5
register: 2
register_type: input
# scale: 0.1
scale: 0.119
precision: 1
unit_of_measurement: "%"
offset: 0
hub: USBhub
# 512 real 61%
polclota
(Pol Clota)
September 24, 2023, 1:48pm
3
modbus:
- name: USBhub
type: serial
method: rtu
# port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
port: /dev/ttyUSB0
baudrate: 9600
parity: N
bytesize: 8
stopbits: 1
timeout: 10