muppet3000 / homeassistant-grott

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

Still depending on Growatt servers? #14

Closed Snux closed 1 year ago

Snux commented 1 year ago

So, the Growatt servers went offline for a while today. During that time Grott can't forward information, and if it can't forward to Growatt it won't push to MQTT either. Anyone worked out how to get around that? Someone asked the same question on the original grott (https://github.com/johanmeijer/grott/issues/347) but no answers there either.

muppet3000 commented 1 year ago

Yeah I can't work out why that happens either.

I think there's a way of making grott 'fake' responses from growatt but I haven't seen it in action yet. I've been focussing on other things but this is on my list of things to investigate.

If you find out how to solve it, please let me know.

C

gajotnt commented 1 year ago

Also getting that error.

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [17:30:07] INFO: Preparing to start...


  • Grott - libscrc not installed, no CRC checking only record validation on length!

    Grott Growatt logging monitor : 2.7.8 Grott process configuration file Grott process environmental variables Pulled 'ginvtype=sph' from the environment Pulled 'ginvtypemap={"NLCUCD700T":"sph"}' from the environment Pulled 'gnomqtt=true' from the environment Pulled 'gextension=True' from the environment Pulled 'gextname=grott_ha' from the environment Pulled 'gextvar={"ha_mqtt_host": "core-mosquitto", "ha_mqtt_port": "1883", "ha_mqtt_user": "addons", "ha_mqtt_password": "Zeireivoopee3sie1ahruphaesooChah7iyahDooxei9eekeNg4Iizegi9saexoh", "ha_mqtt_retain": False}' from the environment Grott override settings if set in commandline Grott process json layout files Grott proxy mode started


  • Grott - libscrc not installed, no CRC checking only record validation on length!

    Hostname : 8ce4abae-grott-current IP : 172.30.33.4 , port : 5279

  • Growatt packet received: <socket.socket fd=4, family=2, type=1, proto=0, laddr=('172.30.33.4', 33670), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=4, family=2, type=1, proto=0, laddr=('172.30.33.4', 33670), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=4, family=2, type=1, proto=0, laddr=('172.30.33.4', 33670), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=4, family=2, type=1, proto=0, laddr=('172.30.33.4', 40232), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=4, family=2, type=1, proto=0, laddr=('172.30.33.4', 40232), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=6, family=2, type=1, proto=0, laddr=('172.30.33.4', 54032), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=6, family=2, type=1, proto=0, laddr=('172.30.33.4', 54032), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=6, family=2, type=1, proto=0, laddr=('172.30.33.4', 54032), raddr=('47.91.67.66', 5279)>
  • Growatt packet received: <socket.socket fd=5, family=2, type=1, proto=0, laddr=('172.30.33.4', 5279), raddr=('192.168.1.241', 31683)>
  • Grott - grottproxy - Invalid data record received, processing stopped for this record
  • Growatt packet received: <socket.socket fd=6, family=2, type=1, proto=0, laddr=('172.30.33.4', 48262), raddr=('47.91.67.66', 5279)>
  • Grott - grottproxy - Invalid data record received, processing stopped for this record
  • Growatt packet received: <socket.socket fd=6, family=2, type=1, proto=0, laddr=('172.30.33.4', 48262), raddr=('47.91.67.66', 5279)>
  • Grott - grottproxy forward error : [Errno 110] Operation timed out
  • Grott - grottproxy forward error : [Errno 110] Operation timed out

Inversor show as "LOST" on the server.growatt.com page. Even if i change the datalogger to the default it's the same, maybe servers arent working yet...

Snux commented 1 year ago

Yup, I'm LOST too at the moment!

daath commented 1 year ago

Same here. I haven't looked at the code, but maybe because it times out (and hence an exception is thrown), no data is put in MQTT? Sending to Growatt servers should be the very last step and just fail gracefully, right?

gajotnt commented 1 year ago

It would be the logical thing. Get the data and push it to mqtt and then Growatt. But maybe something in the way grott works need reply from servers?

muppet3000 commented 1 year ago

Just to be clear, I'm more than happy to have this conversation here, but the fix for it will have to come from the grott repo itself so we should probably log a bug there and see what the response is.

The intention of switching to Grott was to get away from issues with the server, it seems like we're still going to have problems at present though!

There must be some way that grott can 'spoof' a response from the Growatt servers if this ever happens so that data can continue to flow.

gajotnt commented 1 year ago

https://github.com/johanmeijer/grott/issues/347

It's being talked there also :p

Snux commented 1 year ago

Just to be clear, I'm more than happy to have this conversation here, but the fix for it will have to come from the grott repo itself so we should probably log a bug there and see what the response is.

The intention of switching to Grott was to get away from issues with the server, it seems like we're still going to have problems at present though!

There must be some way that grott can 'spoof' a response from the Growatt servers if this ever happens so that data can continue to flow.

Agreed the issue doesn't like here, but this group seems more chatty :)

That said, it seems to have picked up some traction now in the right place (either grott or the grott/ha addon) so we can probably just close this one.

muppet3000 commented 1 year ago

Just to be clear, I'm more than happy to have this conversation here, but the fix for it will have to come from the grott repo itself so we should probably log a bug there and see what the response is. The intention of switching to Grott was to get away from issues with the server, it seems like we're still going to have problems at present though! There must be some way that grott can 'spoof' a response from the Growatt servers if this ever happens so that data can continue to flow.

Agreed the issue doesn't like here, but this group seems more chatty :)

That said, it seems to have picked up some traction now in the right place (either grott or the grott/ha addon) so we can probably just close this one.

Do you have a link to the HA addon chat around this as well so I can keep an eye on it?

I'm hoping to spend a bit of time next week looking at a way of running the grott server and the method that uploads to growatt server in parallel and only using the grott server when the growatt servers are unavailable. I don't want to duplicate other people's efforts though.

Snux commented 1 year ago

Actually there's not one on there at the moment. Given he keeps pretty up to date with the base grott, I think letting that get fixed first (if that's where the fix needs to be) is probably best, then with luck it'll make it to the add on too).

https://github.com/egguy/grott-home-assistant-add-on/issues

muppet3000 commented 1 year ago

Ok cool. In my opinion (and what I'm hoping to try and implement and then make a PR to the Grott repo) is that there should be a feature flag/toggle in Grott to allow people to choose to have a "fallback" mode where if Growatt servers are unavailable it uses the Grott Server instead.

Snux commented 1 year ago

With that approach, I guess there will be a gap in the data that eventually makes it back to the Growatt servers although I'm not sure if that's an issue or not. Grott doesn't buffer data, only the inverter if my understanding is correct. So the inverter buffers the data until it gets a response (either from Growatt or GrottServer). If Growatt is down, then when it comes back up it won't recover anything it missed

Perhaps a better fallback would be to have Grott still publish to MQTT, although if the inverter isn't getting a response then I'm not sure if the format of the supplied data looks different. It's a shame Growatt don't publish better information on their protocol, but I suppose that's proprietary and they don't want to be responsible for people blowing up their equipment :)

muppet3000 commented 1 year ago

From the chat with Johan yesterday on the grott side, the wifi dongle/shinelan box has to have some from of response in order to publish data, therefore grott server would have to be in the loop to respond for the data to keep flowing. It's either that, or no data anywhere. From my experience the 'buffered data' never actually gets displayed in the growatt site/app anyway, so I've never really missed it. I just like the convenience of the app on my phone to be able to look at (when it's working).

Ultimately I need to have a play and work out what's actually possible. The Grott codebase is not the most friendly thing to navigate through.

Snux commented 1 year ago

Given this is being discussed on the grott pages (which is where the conversation belongs) I'll close this one :)