astraliens / home-assistant-inverter-xpert-king

Home Assistant Integration for reading data from Axpert King (Voltronic / MPP Solar PIP / Voltacon / QDion) solar inverters via RS232-TCP Gateway
MIT License
4 stars 3 forks source link

Unable to connect to Axpert king over RS232/TCP #1

Closed ttrnkocy closed 4 months ago

ttrnkocy commented 4 months ago

Hi guys, i am very interrested in your project about connecting Axpert king over RS232/TCP converter to Home Assistant. Currently i read data from the inverter through Node-Red which is working, therefore i believe the converter is set up correctly. Unfortunatelly when i try to add your integration, window for entering converter IP opens, I enter correct values and following error pops-up:

_[%key:common::configflow::error::unknown%]

In HA log file it says that error is related with line in the code hub.test connection()

Would you be able to advise? Thank you.

Tomas

astraliens commented 4 months ago

Hello, can u plz check if you set also correct tcp port number to connect to inverter. If yes - try temporary disconnect nodered block from inverter (for ex. if inverter connection module support only 1 connection nodered could use it and others can't connect untill it will be released) if it did not help I'll try to reproduce it in a few hours in dev environment

ttrnkocy commented 4 months ago

Hi, port number is correct. Node-red is disabled, RS232/TCP module is restarted. On web status page of the TCP module I see 0 connections, RX/TX packets 0. Once I enter IP and port in HA and click connect, TCP status page is updated with 1 connection and something like 28/56 packets of RX/TX is send and received at every attempt I try to connect from HA. This gives me feeling that comunication between HA and RS232/TCP converter is somehow estabilished, yet HA Xpert integration gives me the error stated above, in log i see: _Unexpected exception Traceback (most recent call last): File "/config/custom_components/inverter_xpert_king/config_flow.py", line 92, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/inverter_xpert_king/config_flow.py", line 48, in validate_input result = await hub.test_connection() ^^^^^^^^^^^^^^^^^^^ AttributeError: 'Hub' object has no attribute 'testconnection'

astraliens commented 4 months ago

Thanks for this log, it looks like I understand what's happening, in a few hours I'll try to reproduce it and fix.

astraliens commented 4 months ago

@ttrnkocy I've updated hub.py. Can u plz update integration to latest v0.1.3 and try to add inverter once again

ttrnkocy commented 4 months ago

Magic! It works. Well done and thank you! Will buy you some pizza :-)

image