Closed Kentrp closed 1 year ago
Hi! Esphome is natlivly supporting RS485 master side. That stuff is very easy to do. I have done it before
sensor:
To use esphome as a modbus slave is more tricky. You might need modbus server. I know it sound wrong but RS485 master is a client and the RS485 slave is a server.
modbus_server:
It will require few tries and errors. Debuging will be very helpulf (ESP_LOGI). Additional RS485 to USB cable might be also requaried. Sorry if I cannot be more helful but my board is not accesable at this time so I cannot make any mockups to test it.
Hello! I need one more help, how to write binary sensors and sensors in modbusserver i can't get it work correct, thank you
Hi,
What would be your address and register number?
It's doesn't matter i just need example (slave address 2 register numbers 210-220)
#######Master board modbus_server:
Its work ok with switch, but i need to get binary sensors and temperature sensors, ill be appreciate for help
Did you sove this problem?
No, i don't know if it possible to do, i want to use pin for Dallas 18b20 sensor
Are you good in soldering?
Are you good in soldering?
Yes I am
Are we still talking about modbus problem or just temp sensor? Are you using ethernet port as well or just wifi?
Yes want to connect sensor to relay and if it possible to send data from one to another relay using rs485 ( modbus) I use ethernet in one relay and wifi in another one
You might need to use spear pins. I did that before for i2c display
i2c: sda: 4 scl: 5 scan: true id: bus_a frequency: 400kHz
so for dallas chip
sensor:
dallas:
Don't forget 4.7k pull up resistor to 3.3V
Or you can use RX pin you just need to disable uart logs
It’s mean to connect dallas sensor to i2c pin 4 data wires?
Or you can use RX pin you just need to disable uart logs
I used this pins in other projects like binary sensor and relay after power off dead i need to reflash it
Im interesting to use input to connect sensors, its easy to connect using available contacts
try to use pin 4 platform: dallas address: 0x5f000000560bdf28 # id can be obtained from logs on first boot name: ${friendly_name} Temperature dallas:
pin: GPIO4 update_interval: 10s
We’re is pin 4 in relay
bottom right corner pin 26
I will try dallas pin tomorrow. My unit is not easly accessible.
I made some progress last evening. I was able to send some intigiger value of the internal temp sensor via modbus.
modbus_server:
sensor:
dallas: pin: GPIO4 update_interval: 10s
Hi can it send more then 1 data sensors through modbus
Did it work?
Hi! I use your esphome .yaml code to flash my 8 relays boards, its work fine, but now i want to connect them between themselves with RS485 2 wires (i want to connect one master board to Ethernet and other boards to connect to the master use RS485 port) , and don't know how to do it, ill be appreciate you to help me, thank you