Because of the radical cost increase of energy, I am now 1 week into my HomeAssistant project.
So I am quite new to HomeAssistant
I basically want to break down my power consumption, as my household is fully powered by electrical power, i.e. Solar PV array, heat pump and electric car.
I live in Denmark and already had a few smart meters installed to monitor my solar production and total power consumption trough a commercial product (SolarLog).
I now want to integrate the existing meters into HomeAssistant via RS485, but have had NO succes communicating with them. Please help me out resolving it
I have done the following:
Installed HomeAssistant via Raspberry Pi Imager giving me version: Home Assistant 2022.8.4
Bought a USB->RS485 USB-stick with an CH340G chip
Ensured my modbus cable is terminated with an 120Ohm resistance.
Defined a modbus hub as follows:
modbus:
- name: hub1
type: serial
baudrate: 9600
bytesize: 8
method: rtu
parity: E
port: /dev/ttyUSB0
stopbits: 1
sensors:
- name: Pro380_1a
slave: 2
address: 2
input_type: input
#count: 2
precision: 2
data_type: float16
unit_of_measurement: kW
device_class: power
state_class: total_increasing
Upon restart the sensor is created, but appears as âunavailableâ.
When I study my log I can see a few error mesages, such as:
2022-08-14 15:15:48.154 DEBUG (SyncWorker_0) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2022-08-14 15:15:48.155 DEBUG (SyncWorker_0) [pymodbus.transaction] Running transaction 14
2022-08-14 15:15:48.156 DEBUG (SyncWorker_0) [pymodbus.transaction] SEND: 0x2 0x4 0x0 0x2 0x0 0x1 0x90 0x39
2022-08-14 15:15:48.156 DEBUG (SyncWorker_0) [pymodbus.framer.rtu_framer] Changing state to IDLE - Last Frame End - None, Current Time stamp - 1660482948.156671
2022-08-14 15:15:48.162 DEBUG (SyncWorker_0) [pymodbus.client.sync] New Transaction state 'SENDING'
2022-08-14 15:15:48.165 DEBUG (SyncWorker_0) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2022-08-14 15:15:48.325 DEBUG (SyncWorker_0) [pymodbus.transaction] Transaction failed. (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
2022-08-14 15:15:48.326 DEBUG (SyncWorker_0) [pymodbus.framer.rtu_framer] Frame - [b''] not ready
2022-08-14 15:15:48.326 DEBUG (SyncWorker_0) [pymodbus.transaction] Getting transaction 2
2022-08-14 15:15:48.327 DEBUG (SyncWorker_0) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
Regarding the modbus settings I have double checked the meter settings. It has address 002, Even parity, 9600 baud, 1 stopbit and a bytesize of 8. It is branded as a SolarLog pro380-mod, but I am quite sure it is identical to an inepro(R) pro380-mod.
I have succesfully integrated a Shelly 3EM, Netatmo and a Tesla wall connector and am confident I can build a âpowerfullâ monitoring tool once I get the âRS485-sensorsâ connected and would hate to have to buy new sensors to get it to work
Please help me out!
Best regards
Kasper