muppet3000 / homeassistant-grott

Home Assistant Integration for Grott - MQTT
MIT License
73 stars 17 forks source link

Step- Confuring MQTT in Home Assistant #52

Open sanjeewasam opened 11 months ago

sanjeewasam commented 11 months ago

Need help I am stuck in Setup - HomeAssistant MQTT Broker

I have an existing mosquito add-on working so when I try to add again per instructions I get the following error "MQTT Already configured. Only a single configuration possible."

So I think the instructions are not clear. Most of us already have enabled this add-on and using it. So is the step 4 below to HA MQTT to listen to the MQTT that was setup separately as per 3 below?

Prerequisites 1.Grott 2.Inverter/DataLogger Config 3.MQTT 4.Home Assistant MQTT Broker

muppet3000 commented 11 months ago

Ah, yes, so I think I need to clarify those steps, if people already have MQTT configured and connected they don't need to follow those steps. At the time I wrote those instructions I didn't have any MQTT setup on my personal system so I was following it for a 'clean' system. If you already have it set up, you can skip those steps.

sanjeewasam commented 11 months ago

Thanks for the response and I much appreciate your work and contribution to HA. I need bit more help a) I know pre-requisite steps 1-3 are working correctly. i, Why- if I stop the docker container - Grott then the Growatt website shows that the connection is lost. Docker logs show that it is working ii. MQTT installed in docker -step 3 of pre-req. I used MQTT Explorer and it get data from Grott. MQTT Docker logs show no errors. I am not sure if these will be conclusive evidence to show that step3 OK b) As advised I did not have to do anything on pre-requisite step 4 as I already have MQTT working since 2018 and ls the latest version and my HA is 2023.08. However, MQTT Explorer to HA MQTT does not get anything new. All the topics it gets are from my previous work (sonoff/ Blueiris and cameras etc) c) Grott install in HA via HACS does not show any sensors- nothing. There is not much info as to how to configure this so in Configuring Grott. I did not fill in anything and pressed submit. Reloaded the add on several times nothing

Could you please advise where I can look?.

Also would like to know with this method will I be still able to change Growatt settings via the app/web? Or is it one-way communication so no settling can be done via the app/web anymore?. I do setting changes in winter to charge my 13KW batteries off peak as there is not enough solar to charge the batteries to use during peak. I have SPH5000 invertor

Kind regards Sanjeewa

sanjeewasam commented 11 months ago

One other thing my HA Mosquitto broker has authentication enabled. and the customize section read as active: true folder: mosquito

Does that mean I need to include HA Mosquitto broker authentication info (UN and PW) in pre-req step3 MQTT install in some way? If yes could you please advise what I need to do

william-sy commented 11 months ago

One other thing my HA Mosquitto broker has authentication enabled. and the customize section read as active: true folder: mosquito

Does that mean I need to include HA Mosquitto broker authentication info (UN and PW) in pre-req step3 MQTT install in some way? If yes could you please advise what I need to do

I have been trough the setup today for the entire thing and yes if you have auth enabled you need something like this:

[MQTT]
# Mqtt parameters definitions
# Be aware nomqtt = True means no MQTT processing will be done!!!!!!

nomqtt = False
ip = 192.168.X.X # Your MQTT broker IP here
port = 1883
topic= energy/growatt
auth = True
user = grott
password = SuperSecureGrott!

You will need to create a new user on your mqtt so that you can see what app is logging what in it (recommended) You can also just use the Ha user

sanjeewasam commented 11 months ago

Thank you so much. This worked for me. All good

It is understandable that the documents are confusing and processes are not laid down correctly to reflect what needs to be. This is because lot of changes happening and so many people are trying to find fixe for all are panicking as the official integration is likely to be dead.

It seems like the problem is with the pre-requisites a) There seems to be HA add-on now so may not need to setup in another machine docker instance for grott. I myself using docker instance as per pre-requisite and not the add-on on as it works good b) DataLogger config- this is required c) If you have MQTT already in HA then a) should direct to HA MQTT so installing a separate MQTT for this to work is not required d) No HA MQTT changes are required if you have a working MQTT in HA

In short c) and d) are redundant if you have a working MQTT in HA already but then instructions for grott.ini need to be modified so that it use HA MQTT including auth if that is enabled

Prerequisites a) Grott- grott.ini [MQTT] section should be to direct to HA MQTT b) Inverter/DataLogger Config c) MQTT- not required if you have a MQTT working in HA d) Home Assistant MQTT Broker- This is not required if you have a working MQTT in HA

william-sy commented 11 months ago

Thank you so much. This worked for me. All good

It is understandable that the documents are confusing and processes are not laid down correctly to reflect what needs to be. This is because lot of changes happening and so many people are trying to find fixe for all are panicking as the official integration is likely to be dead.

It seems like the problem is with the pre-requisites a) There seems to be HA add-on now so may not need to setup in another machine docker instance for grott. I myself using docker instance as per pre-requisite and not the add-on on as it works good b) DataLogger config- this is required c) If you have MQTT already in HA then a) should direct to HA MQTT so installing a separate MQTT for this to work is not required d) No HA MQTT changes are required if you have a working MQTT in HA

In short c) and d) are redundant if you have a working MQTT in HA already but then instructions for grott.ini need to be modified so that it use HA MQTT including auth if that is enabled

Prerequisites a) Grott- grott.ini [MQTT] section should be to direct to HA MQTT b) Inverter/DataLogger Config c) MQTT- not required if you have a MQTT working in HA d) Home Assistant MQTT Broker- This is not required if you have a working MQTT in HA

Yeah the ammount of integrations / forks / grotts is getting quite confusing.. but ok its working so JEEJ

william-sy commented 11 months ago

Also note grot image 2.8.2 is active so you might aswell update it while you are at it :) (it is in beta it seems, but it works for me)

muppet3000 commented 11 months ago

Thank you both for your feedback and I'm so happy that you've been able to collaborate to get it working - that's why I love the open source community!

I acknowledge that the documentation across all of the integrations and applications really needs to be improved. I've spent so much time over the last 2 weeks helping people get setup I haven't had the chance to look at the documentation improvements.

Please can you leave this ticket open so I remember to come back to it for your feedback on the documentation.

Once again, I'm very happy you've been able to get it working, please let me know if you have any issues with the integration itself, I'll be happy to help.

Separately I think I saw a comment earlier about being able to change config etc still - the answer is "yes" it still works both ways. The downside of that though is that if the Growatt servers go offline you end up missing data as well. However, there is another Grott application called "grottserver" which allows you to take the Chinese servers completely out of the loop. It has a really basic ability to do config setting as well, I use that myself to set a dynamic nightly charge based on the predicted solar generation for the next day. I plan to add that functionality to this integration one day however I need to focus on improving the documentation first!

sanjeewasam commented 11 months ago

No thank you all- the beautiful people in this community. Yes not having clear documentation is taking a bit more time to figure things out but then again help comes from this great community itself. Documentation can never be precise when there is a lot of collaboration and each person trying to improve what is there.

I am not active and spending a lot of time with HA compared to when I started the journey back in 2017-18). As Growatt official integration seems to be coming to an end I did not expect a quick resolution like this. So I purchased Solar Assistant software and a R pi to configure it (awaiting the pi). In the meantime, I found this development and decided to give it a go as I have two proxmox servers to create docker containers etc. Also with Solar Assistant, I do lose the ability to use Growatt web and because the system is still under warranty I do not want to remove the connection to gorwatt servers to avoid blame games

In short, the speed at which developments happen in HA and the commitment of the community to fix and help out reminds me that I should have more faith and give more time rather than looking elsewhere

Thanks you

prom00 commented 11 months ago

I had issues configuring ha-grott. Seemed the issue was in my custom topic name not being 'energy/growatt'.

I just added a PR to add this not the the readme.

https://github.com/muppet3000/homeassistant-grott/pull/54

muppet3000 commented 11 months ago

I had issues configuring ha-grott. Seemed the issue was in my custom topic name not being 'energy/growatt'.

I just added a PR to add this not the the readme.

https://github.com/muppet3000/homeassistant-grott/pull/54

Thanks for the contribution, I've just responded over on that PR.

typxxi commented 2 months ago

Might be time to close the issue as it is no longer an issue. a long list of old open issues is not helping anyone and for new users it looks also better to have a rather short list of issues and no old ones.