Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rs485 SHT
#1
I apologize for my lack of knowledge here but I am trying to set up an SHT temperature and humidity sensor (purchased through your website) to my F16 board. I found YAML in a different thread and copied it and changed the pin numbers to match my board. I am using ESPhome through Homeassistant. The YAML pertaining to the temperature humidity sensor is as follows:

uart:
  - id: uart_modbus
    baud_rate: 9600
    tx_pin: 16
    rx_pin: 17
# Config Modbus
modbus:
  uart_id: uart_modbus
  id: modbus1
modbus_controller:
  - id: modbus_sensor
    address: 0x01  # device address
    modbus_id: modbus1
sensor:

  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Temperature Sensor"
    id: temperature_sensor
    address: 0x0000
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
   
  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Humidity Sensor"
    id: humidity_sensor
    address: 0x0001
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "%"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1



The sensors read as unavailalbe in homeassistant. I have a feeling that the issue may be in the address of the specific sensors, but I have no idea since I have never used the RS485 pins before.
Reply
#2
take a photo of your sensor.
this is RS485+SHT30 sensor. if you only use SHT30 sensor, you should connect with i2c bus interface.
Reply
#3
It’s the one from your website. It has rs485 A+B pins

https://shop.kincony.com/products/rs485-...e-by-sht30
Reply
#4
you can use PC softare to test sensor first. make sure you have set the correct baud rate and rs485 address.
Reply
#5
Is there recommended software? Also will I need a usb to rs485 adapter?
Reply
#6
yes, use usb-rs485 adapter to debug firstly is better.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)