HA Green & GivTCP

11 comments started 2023-12-21 last 2023-12-30
Home Automation
S
#1 Slartibartfast

I've noticed that a few people are having problems with GivTCP etc. I'm one of them. I have had a small breakthrough ...
GivTCP was falling over with various 'no serial number attributes' errors. O.K. it's a dual AC3 inverter installation - I tried configuring GivTCP for just one inverter. When I set the first inverter to the one with the highest IP address it seemed to start. With both inverters configured I get:
2023-12-21 11:10:41,080 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
2023-12-21 11:10:41,669 - Inv2 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
at the end of the GivTCP log. It just sits there however no 'devices' are created.
At the end of the MQTT log is:
2023-12-21 11:11:19: New connection from 172.30.32.1:36659 on port 1883.
2023-12-21 11:11:19: New client connected from 172.30.32.1:36659 as GivEnergy_GivTCP_2 (p2, c1, k60, u'addons').
2023-12-21 11:11:19: Client GivEnergy_GivTCP_2 disconnected.
2023-12-21 11:11:19: Client <unknown> closed its connection.
2023-12-21 11:11:19: New connection from 172.30.32.1:54135 on port 1883.
2023-12-21 11:11:19: New client connected from 172.30.32.1:54135 as GivEnergy_GivTCP_1 (p2, c1, k60, u'addons').
2023-12-21 11:11:20: Client GivEnergy_GivTCP_1 disconnected.

I'll check the GivTCP config file to make sure there are no cock-ups.
Has anyone any idea what is going on?
The wife has suggested hanging the 'Green on the Christmas tree ...

#2 PianSom

Have you added the MQTT integration to HA?

If you have you will see it under Settings - Devices & Services - Integrations.

If it is not there then add it using the blue button bottom right.

S
#3 Slartibartfast

Looks like GivTCP is running - but no devices created. Who creates the devices - GivTCP or HA itself or the Broker?
As for the Broker - when I try to modify the configuration (configure then Re-Configure MQTT from the integration) I get
'failed to connect to the Broker'. I've looked through Mosquitto forums etc - a few people have the same problem - but no answer.
I even tried using EMQX broker instead of Mosquitto. But it looks like GivTCP has core-mosquitto hard coded. Just out of interest - if I delete the add-on how do I delete the associated Integration?

#4 PianSom

Slartibartfast

Slartibartfast Who creates the devices - GivTCP or HA itself or the Broker?

GivTCP posts messages to the broker, which HA sees (subscribes to) and creates the devices. If it knows about MQTT.

PianSom Have you added the MQTT integration to HA?

This ^^^

S
#5 Slartibartfast

PianSom Yes - the MQTT integration is there.

S
#6 Slartibartfast

At the end of the GivTCP log:
2023-12-29 17:05:46,752 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
INFO Accepting connections at http://localhost:3022
2023-12-29 17:05:47,462 - Inv2 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
INFO Accepting connections at http://localhost:3023
2023-12-29 17:05:52,460 - Inv1 - read - [CRITICAL] - First time running so saving AC Charge status
2023-12-29 17:05:52,468 - Inv1 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2023-12-29 17:05:52,588 - Inv2 - read - [CRITICAL] - First time running so saving AC Charge status
2023-12-29 17:05:52,595 - Inv2 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
No messages that I can find and no devices created.

#7 PianSom

Slartibartfast
I'm afraid you are not posting enough information to make diagnosing your issue very easy. GivTCP says it is publishing discovery messages, and yet you imply that no Devices are showing up in the HA MQTT integration. It seems that something has been misconfigured. My best guess is that you are trying to use BOTH the internal GivTCP broker AND the HA broker, when you should be using either one or the other consistently.

I suggest you follow the detailed instructions here

S
#8 Slartibartfast

PianSom 'and yet you imply that no Devices are showing up in the HA MQTT integration'. What do you mean by 'imply'?
I'm looking at Settings/Devices and Services/Devices. Following 'Speak to the Geeks' instructions there should be discovered devices generated by GivTCP. There are none.
I have deleted Mosquitto and GivTCP addons and following the 'Geeks' instructions re-loaded both. I may well have both brokers running. In GivTCP configuration how do I select the Broker? I assume that it's the 'MQTT Broker Hostname or IP Address*' entry. I'm using the default i.e. core-Mosquitto.
If I switch off 'Enable MQTT Output' I get the same result.
Have you any idea where HA_AUTO_D and MQTT_OUTPUT are? Bothe should be set to TRUE. Trouble is I can't find them.

S
#9 Slartibartfast

In the Geeks instructions it's the 'Click on the blue Configure button, click on Submit, then Finish and it’s all ready to go.' bit that doesn't work.
Yes the MQTT integration is there but if you hit CONFIGURE then RE_CONFIGURE MQTT then NEXT after Broker Options you get the error banner 'Failed to connect'.

S
#10 Slartibartfast

Arrgh !!!! Got it working!!
Well - there are lots of GivTCP devices.
What did I do? Found out how to delete an Integration - specifically MQTT. It's the three dots after the CONFIGURATION bit - specifically DELETE. So I basically unistalled Mosquitto and then deleted the Integration. On re-loading and starting the broker HA then discovered Mosquitto correctly and installed it as an Integration. Started GivTCP, found the devices and I hit the Port.
Next - find a 'stop the stupid inverters from cross charging' automation or whatever.
P.S. Happy new year.