reinhard-brandstaedter / solarflow-statuspage

A simple statuspage with live-data from Zendure's Solarflow Hub for those who do not want to use the App
24 stars 6 forks source link

Crash after changing region #30

Open ricariel opened 10 months ago

ricariel commented 10 months ago

Got connection errors when running in online mode: log

After a while the container is unhealthy.

The Solarflow is visible in the zendure app and is working correct. Region is EU. Environment Variables:

TRAEFIK_RULE=Host(`domain`)
ZEN_USER=user@email
ZEN_PASSWD=password
MQTT_HOST=ipofmqtt
ZEN_MQTT=mqtteu.zen-iot.com
COMMAND= --online
SF_DEVICE_ID=deviceid
SMARTMETER_TOPIC=/tele/

Snippet of compose file:

version: '3.8'
services:
solarflow-dashboard:
image: rbrandstaedter/solarflow-statuspage:latest
command: ${COMMAND:-" --offline"}
restart: unless-stopped
environment:
- ZEN_USER=${ZEN_USER}
- ZEN_PASSWD=${ZEN_PASSWD}
- ZEN_MQTT=${ZEN_MQTT:-'mq.zen-iot.com'}
- MQTT_HOST=${MQTT_HOST}
- MQTT_USER=${MQTT_USER:-"none"}
- MQTT_PWD=${MQTT_PWD:-"none"}
- MQTT_PORT=${MQTT_PORT:-1883}
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
networks:
- default
- docker_gwbridge
labels:
- traefik.enable=true
- traefik.http.routers.solarflow.entrypoints=websecure
- traefik.http.routers.solarflow.rule=${TRAEFIK_RULE}
- traefik.http.routers.solarflow.middlewares=localnet@file
- traefik.http.routers.solarflow.tls=true
- traefik.http.routers.solarflow.tls.certresolver=myresolver
- traefik.http.services.solarflow.loadbalancer.server.port=5000
- traefik.docker.network=docker_gwbridge

networks:
- default:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1400
docker_gwbridge:
external: true
reinhard-brandstaedter commented 10 months ago

Try specifying the correct ZenAPI URL for EU. Zendure decided to also separate the logins completely from the global endpoint: See example config: https://github.com/reinhard-brandstaedter/solarflow-statuspage/blob/master/src/config.ini

ricariel commented 10 months ago

Sorry. In test environment this was set. Here is the log with ZEN_API set

log

TheRedChris commented 10 months ago

Hey, is there already a solution for this? My log file looks like @ricariel last one, but i got no device list so the brackets are empty.< Thx for your help!

tuxianerDE commented 7 months ago

Problem appears to be that the URL handling of Zendure is inconsistent. the base URL of Zendures MQTT ends with /v2 however the EU servers ends with /eu There is a discussion in another issue that appears to be related. When the connection was swichted back to the defualt server that values started to appear again.

tuxianerDE commented 5 months ago

Hey is still issue still existing?