Hello fellow home automation fanatics,
At home we have a charging station from New Motion (home advanced) for our Nissan Leaf.
I want to integrate the power meter of it with Home Assistant by means of a EPS and ESP Home.
The charging station is provided with a power meter from Inepro:
This power meter has a modbus connection witch I want to use to connect to a EPS with a RS485 board connected to it.
@thomas-be already has a solution provided on github for this meter:(https://github.com/tnagels/newmotion_energy_sniffer)
But I want to make usage of EPS home for all my ESP boards.
The following hardware I already have:
-Adafruit ESP32 Feather
-SparkFun Transceiver Breakout - RS-485
Not sure where to start from here with the ESP-home setup. Can someone help me to setup the basics for a modbus connection in ESP home and read a register value?
Update with some additional information:
The boards are connected like this, green and yellow are connected to the 22 and 23 of the powermeter. The RX connection of the RS-485 board is not connected because I only want to read data from the power meter. I did not connected the RTS connection because I’m not sure wat the function is and what to do with it?
Here some information about the modbus connection of the power meter:
The power meter uses the following register:
I also was fooling around with the information provided at the this link: Modbus Controller — ESPHome.
But for me it is a little unclear what all the setting are used for, so far I came up with the configuration below. I only try to read one register value for testing purposes, but I don’t get anything back from the power meter.
esphome: name: newmotion esp32: board: esp32dev framework: type: arduino wifi: ssid: "xx" password: "xx" ap: ssid: "Newmotion Fallback Hotspot" password: "xx #IP adres manual_ip: static_ip: 192.168.2.159 gateway: 192.168.2.254 subnet: 255.255.255.0 captive_portal: api: reboot_timeout: 0s logger: # level: INFO level: verbose baud_rate: 0 ota: web_server: port: 80 time: - platform: homeassistant id: homeassistant_time #Modbus uart: - id: mod_bus tx_pin: 17 rx_pin: 16 baud_rate: 9600 stop_bits: 1 modbus: ##flow_control_pin: 5 id: modbus1 modbus_controller: - id: epever ## the Modbus device addr address: 0x1 modbus_id: modbus1 ##setup_priority: -10 sensor: - platform: modbus_controller modbus_controller_id: epever name: "L1 Current" id: l1_current_input register_type: read address: 0x20492 unit_of_measurement: "A" value_type: FP32 filters: - multiply: 0.001