solectrus / hosting

Step-by-stypes guides for installing and hosting Solectrus
9 stars 4 forks source link

Keine Daten / FAIL #31

Closed spyro2000 closed 1 year ago

spyro2000 commented 1 year ago

Hallo zusammen,

habe heute Solectrus auf meinem Pi (3B) aufgesetzt und soweit hat auch alles gut funktoniert.

Über das SENEC Webinterface selbst kann ich Daten abrufen und es laufen für den Collector offenbar auch munter Daten ein die erfolgreich abgespeichert werden:

Got record solectrus/solectrus#230 from SENEC at 192.168.178.158: AKKU VOLL, Inverter 1922 W, House 378 W, 2023-07-01 15:02:12 +0000
Successfully pushed record solectrus/solectrus#230 to InfluxDB

Got record solectrus/solectrus#231 from SENEC at 192.168.178.158: AKKU VOLL, Inverter 1935 W, House 357 W, 2023-07-01 15:02:17 +0000
Successfully pushed record solectrus/solectrus#231 to InfluxDB

Got record solectrus/solectrus#232 from SENEC at 192.168.178.158: AKKU VOLL, Inverter 1951 W, House 350 W, 2023-07-01 15:02:22 +0000
Successfully pushed record solectrus/solectrus#232 to InfluxDB

Allerdings heißt es im Webinterface trotzdem immer KEINE DATEN und der Status ist 'FAIL'.

Mein .env file:

##################################################################
# Dashboard application (the main part)
#
# Domain name or IP address of your host
APP_HOST=192.168.178.87
#
# SSL redirect: Use "true" (which is the default) if you want to auto-redirect to https
FORCE_SSL=false
#
# Secret token to secure cookies, 128 chars long hexadecimal encoded string (don't use this example, make some random changes!)
# Currently there are no cookies in Soletrus, but this may change in the future
SECRET_KEY_BASE=<removed>
#
# Date of commissioning of your photovoltaic system
INSTALLATION_DATE=2023-06-28
#
# Price you pay for 1kWH (in EUR)
# Can be changed later in the UI when logged in as administrator
ELECTRICITY_PRICE=0.32
#
# Price you get for 1kWH (in EUR)
# Can be changed later in the UI when logged in as administrator
FEED_IN_TARIFF=0.0848
#
# Password for the PostgreSQL database, used by the app to comunicate internally with the database
POSTGRES_PASSWORD=<removed>
#
# Password to login as administrator, required to manage settings like historical prices
ADMIN_PASSWORD=<removed>

##################################################################
# Influx database settings
#
# Influx host (to access from SOLECTRUS dashboard and collectors)
INFLUX_HOST=influxdb
INFLUX_SCHEMA=http
INFLUX_PORT=8086
#
# Credentials for the Influx database, don't change after the first run!
INFLUX_ORG=solectrus
INFLUX_USERNAME=admin
INFLUX_PASSWORD=<removed>
INFLUX_ADMIN_TOKEN=<removed>
#
# Set these names before first run, they can't be changed later!
INFLUX_BUCKET=my-solectrus-bucket
INFLUX_MEASUREMENT_PV=my-pv-measurement
INFLUX_MEASUREMENT_FORECAST=my-forecast-measurement
#
# To keep things simple, we use ONE token (INFLUX_ADMIN_TOKEN) for both writing and reading.
# For better security, you can use two separate tokens, created via the InfluxDB frontend.
INFLUX_TOKEN_WRITE=my-super-secret-admin-token
INFLUX_TOKEN_READ=my-super-secret-admin-token
#
# Volume path for storing the Influx data
INFLUX_VOLUME_PATH=/home/spyro/solectrus/influxdb

##################################################################
# REDIS settings
#
REDIS_VOLUME_PATH=/home/spyro/solectrus/redis

##################################################################
# PostgreSQL database settings
#
DB_VOLUME_PATH=/home/spyro/solectrus/postgresql

##################################################################
# SENEC Collector
#
# Change this to your own SENEC IP address!
SENEC_HOST=192.168.178.158
SENEC_INTERVAL=5

##################################################################
# Solar forecasting with https://forecast.solar
# API docs: https://doc.forecast.solar/doku.php?id=api:estimate
#
# Latitude of the plant location
FORECAST_LATITUDE=<removed>
#
# Longitude of the plant location
FORECAST_LONGITUDE=<removed>
#
# Plane declination: 0 (horizontal) - 90 (vertical)
FORECAST_DECLINATION=20
#
# Plane azimuth: -180 ... 180 (-180 = north, -90 = east, 0 = south, 90 = west, 180 = north)
FORECAST_AZIMUTH=0
#
# Installed modules power in kilowatt peak (kWp)
FORECAST_KWP=7.9
#
# Update interval in seconds, 900s = 15 minutes, the public (and free) API allows a minimum of 900 seconds
FORECAST_INTERVAL=900

Die container sind eigentlich auch alle am Start:

CONTAINER ID   IMAGE                                         COMMAND                  CREATED          STATUS                   PORTS                                       NAMES
76ba12a952a3   ghcr.io/solectrus/solectrus:latest            "docker/startup.sh"      28 minutes ago   Up 7 minutes (healthy)   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp   solectrus-app-1
152893f6e07d   ghcr.io/solectrus/forecast-collector:latest   "/bin/sh -c 'bundle …"   28 minutes ago   Up 7 minutes                                                         solectrus-forecast-collector-1
ff346a40dfbe   ghcr.io/solectrus/senec-collector:latest      "/bin/sh -c 'bundle …"   28 minutes ago   Up 7 minutes                                                         solectrus-senec-collector-1
bf00b38049f7   redis:7-alpine                                "docker-entrypoint.s…"   28 minutes ago   Up 7 minutes (healthy)   6379/tcp                                    solectrus-redis-1
e633a1f27a6e   postgres:15-alpine                            "docker-entrypoint.s…"   28 minutes ago   Up 7 minutes (healthy)   5432/tcp                                    solectrus-db-1
d6ee1957c7d8   influxdb:2.7-alpine                           "/entrypoint.sh infl…"   28 minutes ago   Up 7 minutes (healthy)   8086/tcp 

Der app container loggt folgendes wenn ich das Interface aufrufe:

I, [2023-07-01T14:58:32.213954 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/stats/inverter_power/now format=html controller=StatsController action=index status=200 duration=171.03 view=168.73 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T14:58:37.118746 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/stats/inverter_power/now format=html controller=StatsController action=index status=200 duration=95.49 view=91.46 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T14:58:42.122773 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/stats/inverter_power/now format=html controller=StatsController action=index status=200 duration=92.24 view=90.79 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.156018 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/bat_fuel_charge/now format=html controller=HomeController action=index status=200 duration=57.42 view=54.96 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.274913 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/stats/inverter_power/now format=html controller=StatsController action=index status=200 duration=107.88 view=106.24 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.480216 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/bat_fuel_charge/now format=html controller=HomeController action=index status=200 duration=125.82 view=123.07 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.495944 solectrus/solectrus#49]  INFO -- : method= path= format= params={} controller=ApplicationCable::Connection action=disconnect status=200 duration=0.44
I, [2023-07-01T15:00:06.514120 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/charts/bat_fuel_charge/now format=html controller=ChartsController action=index status=200 duration=333.29 view=331.79 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.661413 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/stats/bat_fuel_charge/now format=html controller=StatsController action=index status=200 duration=101.53 view=100.02 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
I, [2023-07-01T15:00:06.769447 solectrus/solectrus#49]  INFO -- : [192.168.178.94] method=GET path=/charts/bat_fuel_charge/now format=html controller=ChartsController action=index status=200 duration=198.25 view=196.70 db=0.00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Liegt es daran, dass mein user nicht 'pi' heißt sondern 'spyro'? Ist das irgendwo noch hardcoded...?

Wenn ich oben rechts auf "Anmelden" klicke, dann soll ich Passwort angeben. Wo bekomme ich das her? Habe mal ein paar aus dem .env file probiert, wird aber immer abgelehnt.

ledermann commented 1 year ago

Danke für die Beschreibung, hier offenbart sich ein Fehler meinerseits. Das Customizing des InfluxDB-Measurement wurde erst kürzlich eingeführt, der SENEC-Collector berücksichtigt das aber noch gar nicht. Das muss ich noch ändern.

Kurzfristige Abhilfe: Ändere in der .env die Variable INFLUX_MEASUREMENT_PV von my-pv-measurement auf SENEC. Dann sollte es klappen.

Ansonsten noch:

spyro2000 commented 1 year ago

Danke dir! Ein Neustart später (5 Min) hat's dann funktioniert. Ich liebe es! :)