britkat/giv_tcp-ma: Really basic help needed

8 comments started 2024-06-07 last 2024-06-12
Home AutomationGivEnergy ProductsAC CoupledBattery
S
#1 SnowDeer

Hi - I posted a few months ago but have not been able to revisit - so am starting from scratch again.

  • GivEnergy AOI (13KW) + Gateway
  • Both GivEnergy Devices connected to same wifi network - 192.168.x.0-255
  • Windows 10 Laptop - connected to same wifi network
  • Docker Desktop - Latest
  • britkat/giv_tcp-ma - Latest

Docker configured in host mode - (as of Docker 4.3.0) - as have read that "should" help.

docker run --env-file env-basic.txt britkat/giv_tcp-ma

where the config file has

INVERTOR_IP_1=192.168.x.y

The port 8899 is open on the inverters IP - confirmed via nmap and telnet

When I start Docker I get

'docker run --env-file env-basic.txt britkat/giv_tcp-ma
2024-06-07 09:47:18,310 - startup - [CRITICAL] - SUPERVISOR TOKEN does not exist
2024-06-07 09:47:20,314 - startup - [CRITICAL] - Scanning network for GivEnergy Devices...
2024-06-07 09:47:25,638 - startup - [CRITICAL] - No inverters found...
2024-06-07 09:47:25,638 - startup - [INFO] - Searching for Inverters again
2024-06-07 09:47:25,639 - startup - [CRITICAL] - Scanning network for GivEnergy Devices...
2024-06-07 09:47:30,906 - startup - [CRITICAL] - No inverters found...
2024-06-07 09:47:30,907 - startup - [INFO] - Searching for Inverters again
2024-06-07 09:47:30,907 - startup - [CRITICAL] - Scanning network for GivEnergy Devices...
2024-06-07 09:47:36,170 - startup - [CRITICAL] - No inverters found...
2024-06-07 09:47:36,173 - startup - [CRITICAL] - Running Redis
2024-06-07 09:47:36,174 - startup - [CRITICAL] - Setting up invertor: 1 of 1
2024/06/07 09:47:36 [notice] 249#249: using the "epoll" event method
2024/06/07 09:47:36 [notice] 249#249: nginx/1.20.2
2024/06/07 09:47:36 [notice] 249#249: OS: Linux 5.15.133.1-microsoft-standard-WSL2
2024/06/07 09:47:36 [notice] 249#249: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/06/07 09:47:36 [notice] 249#249: start worker processes
2024/06/07 09:47:36 [notice] 249#249: start worker process 253
2024/06/07 09:47:36 [notice] 249#249: start worker process 254
2024/06/07 09:47:36 [notice] 249#249: start worker process 255
2024/06/07 09:47:36 [notice] 249#249: start worker process 256
2024-06-07 09:47:36,304 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls
2024-06-07 09:47:36,304 - startup - [CRITICAL] - Running Invertor (192.168.x.y) read loop every 5s
2024-06-07 09:47:36,305 - startup - [CRITICAL] - Subscribing MQTT Broker for control
2024-06-07 09:47:36,310 - startup - [CRITICAL] - Starting Gunicorn on port 6345
[2024-06-07 09:47:37 +0100] [260] [INFO] Starting gunicorn 21.2.0
[2024-06-07 09:47:37 +0100] [260] [INFO] Listening at: http://0.0.0.0:6345 (260)
[2024-06-07 09:47:37 +0100] [260] [INFO] Using worker: sync
[2024-06-07 09:47:37 +0100] [261] [INFO] Booting worker with pid: 261
[2024-06-07 09:47:37 +0100] [263] [INFO] Booting worker with pid: 263
[2024-06-07 09:47:37 +0100] [262] [INFO] Booting worker with pid: 262
2024-06-07 09:47:39,180 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control-
2024-06-07 09:47:41,609 - Inv1 - sync - [ERROR ] - Connection to (192.168.x.y, 8899) failed: timed out
2024-06-07 09:47:42,762 - Inv1 - sync - [ERROR ] - Connection to (192.168.x.y, 8899) failed: [Errno 113] Host is unreachable
'

with '2024-06-07 09:47:41,609 - Inv1 - sync - [ERROR ] - Connection to (192.168.x.y, 8899) failed: timed out
2024-06-07 09:47:42,762 - Inv1 - sync - [ERROR ] - Connection to (192.168.x.y, 8899) failed: [Errno 113] Host is unreachable'
then repeating.

I know I am missing some basic - loads of people have this working - what am I doing wrong?

Thanks in advance.

D
#3 DD

SnowDeer I don't use giv_tcp, but the last bit - connecting to 192.168.x.y port 8899 - is almost certainly the connection to the inverter over modbus - I'd double-check that you've configured the IP address correctly

S
#4 SnowDeer

There was only 4 devices on the network - the router; the laptop and two other devices; both GivEnergy - one the gateway and one the AOI. I tried both in the spirit of ruling idiot error out....

#5 PianSom

SnowDeer
It's hard to suggest what to look for without seeing your full config. Why not share that?

Some obvious things to check - you have NUMBATTERIES_1 set to 0; you have the IP of the AIO unit (not the Gateway) as the INVERTOR_IP (and you have spelt INVERTOR that way!)

S
#6 SnowDeer

Hi - Thanks for the replies etc.

For anyone else struggling and for my own piece of mind - this is how it was resolved....

  1. I had over the attempts to get stuff working played with different docker networks and so on; you do not need to have a host network - it works fine with a bridge.
  2. Whilst I could connect to the AOI ports from the base Windows Host - I never tried from within the actual running Docker container; my assumption was that it would connect - in reality it could not connect. Reason: Point 1.
  3. I uninstalled Docker Desktop and re-installed to have a blank canvas
  4. And after a few plays came up with (based on previous advice received - thank you -

docker run -p 6345:6345 -e INVERTOR_IP_1=192.168.x.y -e NUMBATTERIES_1=0 -e INVERTOR_AIO_1=True -e MQTT_OUTPUT=False -e INVERTOR_AC_1=False -e WEB_DASH=True britkat/giv_tcp-ma

and it runs the web dash board fine - the Port 6345 returns data as per the documentation and whilst I have not yet played with the REST interface for control a GET request to http://localhost:6345/setDischargeSlot1 returns Method Not Supported (which seems perfect as I imagine it only wants a POST)

so I hope this helps someone.

Cheers

D
#7 danielnepomuceno

Is there a specific reason why you're not using a docker-compose file for this? In my view it's a lot more friendly to manage. Just curious.

S
#8 SnowDeer

danielnepomuceno

Hi - in answer to your question about a compose file - mostly ignorance ;-)

Just followed this guide https://spacelift.io/blog/docker-compose and can see the benefits - especially when multiple interconnected containers - but I was (at least initially) just trying to get the singular giv_TCP-ma docker container to connect and work - which thankful it does now.

But could I ask - could you share some of how you are using Docker Compose / other bits and pieces with Giv_Energy kit? Maybe I'm missing a use case / way I can use it all - and happy to learn!

Thanks

#9 PianSom

SnowDeer could you share some of how you are using Docker Compose / other bits and pieces

There's a whole world out there!

Here are some containers that I use in my main docker-compose (along with givtcp):

  • dozzle (for examining docker logs)
  • portainer (for managing containers)
  • growatt (for my Growatt inverter)
  • givtcp-beta (for testing)
  • home assistant (most people don't run this is Docker)
  • mosquitto broker (as above)
  • appdaemon (as above)
  • influxdb (a time series database)
  • grafana (graph display from database)
  • uptime-kuma (inform if something goes down)
  • owncloud (local Dropbox-type storage)

Plus a large number of containers for media retrieval, management and viewing - which is a whole other story. Plus a reverse proxy (traefik) for external access, with security (authelia)