I have a wattnode energy meter attached to my main panel and connected to my linux computer with a usb to rs485 device. I used python to retrieve two sets of information and print it out with tkinter, successfully. I plugged the usb in to my home assistant computer (running hassio) and am trying to do the same thing, but I can’t get the modbus to communicate.
This was how I connected successfuly with python:
try:
client= ModbusSerialClient(port=“/dev/ttyUSB0”, timeout=20, baudrate=9600, bytesize=8, parity=“N”, stopbits=1)
client.connect()
and retrieved the information with this code
Power=client.convert_from_registers(client.read_holding_registers(address=1168, count=2, slave=1).registers, client.DATATYPE.FLOAT32, ‘little’)
Power=round(Power/1000,3)
Instant=client.convert_from_registers(client.read_holding_registers(address=1008, count=2, slave=1).registers, client.DATATYPE.FLOAT32,‘little’)
Instant=round(Instant/1000,3)
So now I am trying to get modbus to work on home assistant and started with one sensor to test it, but everytime I restart HA I get these two notices:
Modbus Wattnode contain no entities, causing instability, entry not loaded
Setup failed for ‘modbus’; integration failed to initialize
This is the code i put in the yaml configuration file
modbus:
- name: Wattnode
type: serial
method: rtu
port: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B001K6T8-if00-port0
baudrate: 9600
stopbits: 1
bytesize: 8
parity: N
Sensors:- name: Instantaneous_Power
slave: 1
#value_type: fp32_r
address: 1008
input_type: input
unit_of_measurement: W
data_type: float32
count: 2
scan_interval: 10
- name: Instantaneous_Power