Giter Club home page Giter Club logo

jaspere84 / pyfusionsolardatarelay Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 2.0 674 KB

Interface to relay PV inverter data from FusionSolar public kiosk mode to InfluxDB/VictoriaMetrics, PVOutput.org, MQTT and Home Assistant

License: MIT License

Dockerfile 0.83% Python 99.17%
fusionsolar huawei influxdb inverter pvoutput fusion-solar grafana xibo docker mqtt bridge relay mosquitto mosquitto-mqtt kenter meetdata homeassistant victoriametrics

pyfusionsolardatarelay's Introduction

Huawei FusionSolar Kiosk to InfluxDB, MQTT, PVOutput and Home Assistant relay

This is a python project intended to fetch data from the Huawei FusionSolar public kiosk and relay it to InfluxDB/VictoriaMetrics and/or PVOutput.org and/or MQTT and/or Home Assistant (hass).

Additionally this project can also fetch and relay grid usage data from the Dutch meetdata.nl API provider by Kenter.

Credits go to the Grott project. Many bits of code, structure and ideas are borrowed from there.

GitHub release License

Installation

This project is currently intented to run as a Docker container and fetches its config from environment variables. Yet the project can be run standalone. A local settings file (such as .yml or .ini) has not been implemented yet, but pvconf.py can easily be modified to override standard settings.

Docker

Check out Examples/docker-compose.yml for a docker configuration example.

Breaking changes in the release

The fusionsolarinterval configuration paramters has been replaced by two cron settings defaulting to poll fusionsolar data each half our.

About Huawei FusionSolar Kiosk mode

FusionSolar is Huawei's online monitoring platform for their PV inverters. FusionSolar features a kiosk mode. When enabled, a kiosk url is generated which is publically accessible. The kiosk web app fetches its data from a JSON backend. It is this backend where this project fetches the PV data. Fetching data from the kiosk mode can be beneficial to those without direct access to the official API and/or the inverter Modbus-TCP. For instance when the inverter is logging to fusionsolar over a direct cellular connection configured and fitted by an installer unable to provide API access rights to third parties.

About PVOutput.org

PVOutput.org is a free service for sharing and comparing PV output data. PVOutput dashboard screenshot

About InfluxDB

InfluxDB is an open source time series database on which dashboards can easily be built. For instance using Grafana

About MQTT

MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices. MQTT can be used to relay the PV data to various home automation software such as Home Assistant

About Home Assistant

Home Assistant (hass) is an open source home automation platform. Hass features an energy dashboard in which energy generation, storage and usage data can be combined in a dashboard giving a total overview of energy flow. Using MQTT, the power and energy generation data from Huawei's FusionSolar Kiosk can be fed into Home Assistant. This project can then act as a data source for the solar production section of the HASS energy dashboard.

Hass can easily be connected to an MQTT using the MQTT integration, which can be set up using the hass web interface. Once hass is connected to MQTT, a change in configuration.yaml is required in order to add the energy sensors to hass. A configuration.yaml example file which shows how to do this is provided in the Examples subfolder of this project.

Once everything is configured, solar data will flow as follows:

[FusionSolar Kiosk API] --> [PyFusionSolarDataRelay] --> [MQTT Server] --> [Home Assistant]

For those of you using Docker, a docker-compose.yml file is provided here in order to get these different components up and running quickly.

About Kenter's meetdata.nl

Kenter provides measurement services for commercially rented grid transformers. This project can fetch energy usage data from this API and post it to InfluxDB and PVOutput. MQTT is not supported for posting Kenter data, as Kenter's latest measurement data is usually 3 days old.

About Kenter's API and matching PVOutput intervals

Fusion solar data fetching is planned by cron in order to exactly specify at what times the data should reload. This way, it is possible to synchronise the intervals of fusionsolar and gridkenter datapoints, which end up showing on PVOutput. That's relevant because if the gridkenter data class is fetched, meetdata.nl does not provide live measurements. Instead it provides historic measurements with a certain interval (15 minutes interval with the most recent data point 3 days old in my case). If this interval doesn't match the fusionsolar interval, then PVOutput will show distorted graphs because it won't have a datapoint for both PV production and grid usage for each interval. (Fusionsolar kiosk API only updates each half hour). See this url for help with finding the right cron config.

Configuration parameter documentation

Parameter Environment variable Description Default
debug pvdebug Enables verbose logging True
pvsysname pvsysname Definition of 'measurement' name for InfluxDB inverter01
fusionsolar pvfusionsolar Can be True or False, determines if fusionsolar kiosk API is enabled True
fusionsolarurl pvfusionsolarurl Link to the fusionsolar kiosk data backend Click url
fusionsolarkkid pvfusionsolarkkid Unique kiosk ID, can be found by looking the kiosk URL and then taking the code after kk= GET_THIS_FROM_KIOSK_URL
fusionhourcron pvfusionhourcron Hour component for python cron job to fetch and process data from fusionsolar. *
fusionminutecron pvfusionminutecron Minute component for python cron job to fetch and process data from fusionsolar 0,30
pvoutput pvpvoutput Can be True or False, determines if PVOutput.org API is enabled False
pvoutputapikey pvpvoutputapikey API Key for PVOutput.org yourapikey
pvoutputsystemid pvpvoutputsystemid System ID for PVOutput.org, should be numeric 12345
pvoutputurl pvpvoutputurl API url for PVOutput.org live output posting Click url
pvoutputbatchurl pvpvoutputbatchurl API url for PVOutput.org historic data batch posting (used for grid data from meetdata.nl) Click url
influx pvinflux Can be True or False, determines if InfluxDB processing is enabled False
influx2 pvinflux2 If True the InfluxDBv2 methods are used. If False InfluxDBv1 methods are used True
ifhost pvifhost Hostname of the influxdb server localhost
ifport pvifport Port of influxdb server 8086
if1dbname pvif1dbname Database name for InfluxDBv1, only required if influx2=False fusionsolar
if1user pvif1user Username for InfluxDBv1, only required if influx2=False fusionsolar
if1passwd pvif1passwd Password for InfluxDBv1, only required if influx2=False fusionsolar
if2protocol pvif2protocol Protocol for InfluxDBv2, can be https or http, only required if influx2=True https
if2org pvif2org Organization for InfluxDBv2, only required if influx2=True acme
if2bucket pvif2bucket Bucket for InfluxDBv2, only required if influx2=True fusionsolar
if2token pvif2token Token for InfluxDBv2, only required if influx2=True XXXXXXX
mqtt pvmqtt Can be True or False, determines if MQTT publishing is enabled False
mqtthost pvmqtthost Hostname of MQTT server localhost
mqttport pvmqttport Port of MQTT server 1883
mqttauth pvmqttauth Can be True or False, determines if MQTT authentication is enabled False
mqttuser pvmqttuser MQTT Username fusionsolar
mqttpasswd pvmqttpasswd MQTT Password fusionsolar
mqtttopic pvmqtttopic MQTT Topic for publishing energy/pyfusionsolar
gridrelay pvgridrelay Can be True or False, determines if data is fetched from Kenter's meetdata.nl API False
gridrelayinterval pvgridrelayinterval Interval in seconds to fetch data from meetdata.nl and post to PVOutput and InfluxDB 43200
gridrelaykenterurl pvgridrelaykenterurl Kenter API url for fetching transformer grid measurements Click url
gridrelaykenteruser pvgridrelaykenteruser Username for Kenter's API user
gridrelaykenterpasswd pvgridrelaykenterpasswd Password for Kenter's API passwd
gridrelaydaysback pvgridrelaydaysback Kenter's meetdata.nl does not provide live data. Data is only available up until an X amount of days back. May vary per transformer. 3
gridrelaypvoutputspan pvgridrelaypvoutputspan In my case meetdata.nl has datapoints for each 15mins. Setting this to a value of 2, will calculate averages over 2 datapoints spanning half an hour before posting to PVOutput. This way the datapoint interval between the grid usage data and fusionsolar PV production data matches, resulting in nice diagrams on PVOutput.org 2
gridrelaysysname pvgridrelaysysname Grid transformer name for InfluxDB transformer data transformer01
gridrelaykenterean pvgridrelaykenterean EAN code for transformer on Kenter's www.meetdata.nl XXX
gridrelaykentermeterid pvgridrelaykentermeterid MeterID as shown on Kenter's www.meetdata.nl XXX
gridrelaysys02enabled pvgridrelaysys02enabled Can be True or False, determines if a secondary transformer is configured for InfluxDB output False
gridrelaysysname02 pvgridrelaysysname02 Grid transformer name for InfluxDB transformer data transformer02
gridrelaykenterean02 pvgridrelaykenterean02 EAN code for transformer on Kenter's www.meetdata.nl XXX
gridrelaykentermeterid02 pvgridrelaykentermeterid02 MeterID as shown on Kenter's www.meetdata.nl XXX

Grafana dashboard example

A grafana dashboard export is included in the Examples subfolder in the Git repository.

Grafana dashboard screenshot

Grafana solar PV dashboard elements on Xibo digital signage system

I'm using individual the elements on this dashboard to show the PV solar statistics on a free and open source Xibo Digital Signage narrowcasting system.

Take the following steps to achieve this:

  1. Enable Grafana anonymous mode (see Examples/docker-compose.yml)
  2. Create a new layout in Xibo and add some regions
  3. Back in Grafana, open the dashboard and click 'Share' in the grafana individual graph dropdown dialog (not the entire dashboard, but the individual graph on the dashboard)
  4. Share in "Link" mode (do not use snapshot or embed)
  5. Back in Xibo, drop the "Webpage" widget on your region
  6. Configure the webpage widget to show the link copied in step 4.
  7. Optionally alter the url to format like &from=now-12h instead of the default &from=1655015379544&to=1655058579544
  8. Publish the layout, the graphs will now fit nicely in the width/height of the defined regions.

Result: Xibo layout screenshot

Changelog

Version Description
1.0.6 Fixed a bug parsing the environment cron settings, which are in string format, but were interpreted as int, causing an exception
1.0.6 FusionSolar API will now immediately be queried on startup if debug mode is enabled (so no waiting for cron to trigger is required for testing)
1.0.5 Added InfluxDB support for an optional secondary grid telemetry EAN configuration (pvoutput output is only supported on the primary EAN)
1.0.5 Bugfix for InfluxDB v1 implementation and removed auto-database creation for VictoriaMetrics compatibility
1.0.3 Grid transformer usage measurement polling from Kenter's meetdata.nl API has been implemented
1.0.3 Changed docker-compose.yml template not to use host networking mode
1.0.3 pv.py now uses separate threads for PvRelay and GridRelay classes
1.0.3 Implemented apscheduler's cron implementation to be able to specify exact moments to fetch fusionsolar data
1.0.3 Code and method name refactoring including PvConf type hints in classes where this class was injected as method parameter

Released under MIT by @JasperE84.

This project has been partly developed in time donated by Contour - Sheet metal supplier

Dit project is deels ontwikkeld ontwikkeld in de tijd van Contour - Plaatwerkleverancier

pyfusionsolardatarelay's People

Contributors

jaspere84 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyfusionsolardatarelay's Issues

Connect via MQTT to existing Home Assistant Docker instance

I have problems using this project with an existing Home Assistant instance and the MQTT Broker addon from HA. I just need the connection to FusionSolar-Kiosk and MQTT-Entities in HA.
I don't need another MQTT server and the InfluxDB stuff.
Unfortunately MQTT Explorer doesn't show up topic "energy/pyfusionsolar"
I modified the composer file to my need and created an user for the MQTT broker, but I'm not sure which port (1883/9001) and host (HA host, 0.0.0.0, localhost) to use to connect to the HAs' MQTT broker:

version: '3'

services:
  pyfusionsolar:
    container_name: pyfusionsolardatarelay
    image: jsprnl/pyfusionsolardatarelay:latest
    restart: unless-stopped

    environment:
      - pvdebug=True

      - pvfusionsolar=True
      - pvfusionsolarkkid=<KIOSK_TOKEN>
      - pvfusionminutecron=5

      - pvmqtt=True
      - pvmqtthost=??????????
      - pvmqttport=??????????
      - pvmqttauth=True
      - pvmqttuser=XXXXXXXXXX
      - pvmqttpasswd=XXXXXXXXXX

    volumes:
      - /etc/localtime:/etc/localtime:ro

Portainer-Log:

2022-10-10 14:17:08,135 - root - DEBUG - Conf class instantiated
2022-10-10 14:17:08,135 - root - DEBUG - Setting default conf values
2022-10-10 14:17:08,135 - root - INFO - Processing environment variables to running config
2022-10-10 14:17:08,136 - root - DEBUG - Pulled 'pvdebug=True' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvfusionsolar=True' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvfusionsolarkkid=XXXXXXXXXX' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvfusionminutecron=5' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvmqtt=True' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvmqtthost=XXXXXXXXXX' from the environment
2022-10-10 14:17:08,137 - root - DEBUG - Pulled 'pvmqttport=??????????' from the environment
2022-10-10 14:17:08,138 - root - DEBUG - Pulled 'pvmqttauth=True' from the environment
2022-10-10 14:17:08,139 - root - DEBUG - Enabled verbose logging
2022-10-10 14:17:08,139 - root - INFO - Current settings:
2022-10-10 14:17:08,139 - root - INFO - _Generic:
2022-10-10 14:17:08,139 - root - INFO - debug:   True
2022-10-10 14:17:08,140 - root - INFO - _FusionSolar:
2022-10-10 14:17:08,140 - root - INFO - enabled: True
2022-10-10 14:17:08,140 - root - INFO - fusionsolarurl: https://region01eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=
2022-10-10 14:17:08,140 - root - INFO - fusionsolarkkid: XXXXXXXXXX
2022-10-10 14:17:08,141 - root - INFO - sysname: inverter01
2022-10-10 14:17:08,141 - root - INFO - fusionhourcron: *
2022-10-10 14:17:08,141 - root - INFO - fusionminutecron: 5
2022-10-10 14:17:08,141 - root - INFO - _Influxdb:
2022-10-10 14:17:08,141 - root - INFO - influx: False
2022-10-10 14:17:08,141 - root - INFO - influx2: True
2022-10-10 14:17:08,142 - root - INFO - host: localhost
2022-10-10 14:17:08,142 - root - INFO - port: 8086
2022-10-10 14:17:08,142 - root - INFO - _Influxdb_v1:
2022-10-10 14:17:08,142 - root - INFO - database: fusionsolar
2022-10-10 14:17:08,142 - root - INFO - user: fusionsolar
2022-10-10 14:17:08,142 - root - INFO - password: **secret**
2022-10-10 14:17:08,142 - root - INFO - _Influxdb_v2:
2022-10-10 14:17:08,142 - root - INFO - protocol: https
2022-10-10 14:17:08,143 - root - INFO - organization: acme
2022-10-10 14:17:08,143 - root - INFO - bucket: fusionsolar
2022-10-10 14:17:08,143 - root - INFO - token: XXXXXXX
2022-10-10 14:17:08,143 - root - INFO - _PVOutput.org:
2022-10-10 14:17:08,143 - root - INFO - Enabled: False
2022-10-10 14:17:08,143 - root - INFO - System ID: 12345
2022-10-10 14:17:08,144 - root - INFO - API Key: yourapikey
2022-10-10 14:17:08,144 - root - INFO - API Url: https://pvoutput.org/service/r2/addstatus.jsp
2022-10-10 14:17:08,144 - root - INFO - API BatchUrl: https://pvoutput.org/service/r2/addbatchstatus.jsp
2022-10-10 14:17:08,144 - root - INFO - _MQTT
2022-10-10 14:17:08,144 - root - INFO - Enabled: True
2022-10-10 14:17:08,144 - root - INFO - Host: ??????????
2022-10-10 14:17:08,144 - root - INFO - Port: ??????????
2022-10-10 14:17:08,144 - root - INFO - Auth: True
2022-10-10 14:17:08,145 - root - INFO - User: XXXXXXXXXX
2022-10-10 14:17:08,145 - root - INFO - Passwd: XXXXXXXXXX
2022-10-10 14:17:08,145 - root - INFO - Topic: energy/pyfusionsolar
2022-10-10 14:17:08,145 - root - INFO - _GridRelay
2022-10-10 14:17:08,145 - root - INFO - Enabled: False
2022-10-10 14:17:08,145 - root - INFO - System name: transformer01
2022-10-10 14:17:08,145 - root - INFO - Interval: 43200
2022-10-10 14:17:08,145 - root - INFO - PVOutput span: 2
2022-10-10 14:17:08,146 - root - INFO - Kenter URL: https://webapi.meetdata.nl
2022-10-10 14:17:08,146 - root - INFO - Kenter EAN: XXX
2022-10-10 14:17:08,146 - root - INFO - Kenter MeterId: XXX
2022-10-10 14:17:08,146 - root - INFO - Kenter User: user
2022-10-10 14:17:08,146 - root - INFO - Kenter Passwd: passwd
2022-10-10 14:17:08,146 - root - INFO - Days back: 3
2022-10-10 14:17:08,147 - root - DEBUG - PvRelay class instantiated
2022-10-10 14:17:08,147 - root - DEBUG - PvFusionSolar class instantiated
2022-10-10 14:17:08,147 - root - DEBUG - PvOutputOrg class instantiated
2022-10-10 14:17:08,147 - root - DEBUG - PvMqtt class instantiated
2022-10-10 14:17:08,147 - root - DEBUG - PvInflux class instantiated
2022-10-10 14:17:08,147 - root - INFO - Starting PvRelay on separate thread
2022-10-10 14:17:08,148 - root - DEBUG - PvRelay waiting 5sec to initialize docker-compose containers
2022-10-10 14:17:13,315 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
/usr/local/lib/python3.10/site-packages/apscheduler/util.py:436: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  return tzinfo.localize(dt)
2022-10-10 14:17:13,320 - apscheduler.scheduler - INFO - Added job "PvRelay.process_fusionsolar_request" to job store "default"
2022-10-10 14:17:13,321 - apscheduler.scheduler - INFO - Scheduler started
2022-10-10 14:17:13,321 - apscheduler.scheduler - DEBUG - Looking for jobs to run
2022-10-10 14:17:13,321 - apscheduler.scheduler - DEBUG - Next wakeup is due at 2022-10-10 15:05:00+02:00 (in 2866.678750 seconds)```

Unable to start due to thread error

Hi, I just cloned the repo, customized docker-compose.yaml and tried a docker-compose up, but this fails with this error:

pyfusionsolardatarelay | Traceback (most recent call last):
pyfusionsolardatarelay |   File "/code/pv.py", line 33, in <module>
pyfusionsolardatarelay |     fs_thread.start()
pyfusionsolardatarelay |   File "/usr/local/lib/python3.10/threading.py", line 935, in start
pyfusionsolardatarelay |     _start_new_thread(self._bootstrap, ())
pyfusionsolardatarelay | RuntimeError: can't start new thread

From the Python threads I found this could be related to too many threads running, but I think there is only one in my case...

I also tried on a Raspberry Pi (which would be my preferred way to keep the container running), but it didn't start with this error:

pyfusionsolardatarelay | standard_init_linux.go:219: exec user process caused: exec format error

Is there a way to have either one to start?
I removed all containers except the pvfusionsolar one, since I only want to publish to pvoutput.org
I changed the folloving variables:

  • pvsysname
  • pvfusionsolarkkid
  • pvfusionsolarurl (added, since it was changed recently to https://uni004eu5.fusionsolar.huawei.com/pvmswebsite/nologin/assets/build/cloud.html#/kiosk?kk= for me)
  • pvinflux=False
  • pvpvoutputsystemid
  • pvpvoutputapikey
  • pvmqtt=False

Thanks in any case!

pvfusionminutecron : variable does not accept 0,30

Hello,

I've got an issue with the variable pvfusionminutecron. If i set 0,30 in my docker-compose.yml, i get this traceback

2023-07-19 10:54:37,839 - root - INFO - PyFusionSolarDataRelay 1.0.5 started pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Conf class instantiated pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Setting default conf values pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - INFO - Processing environment variables to running config pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvdebug=True' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolar=True' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolarurl=https://region03eu5.fusionsolar.huawei.com:443/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolarkkid=1O0eLg93hkB8qp2rL5MQPqJc25jPljtK' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvsysname=inverter01' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionminutecron=0, 30' from the environment pyfusionsolardatarelay | Traceback (most recent call last): pyfusionsolardatarelay | File "/code/pv.py", line 19, in <module> pyfusionsolardatarelay | conf = PvConf(logger) pyfusionsolardatarelay | File "/code/pvconf.py", line 8, in __init__ pyfusionsolardatarelay | self.apply_environment_settings() pyfusionsolardatarelay | File "/code/pvconf.py", line 159, in apply_environment_settings pyfusionsolardatarelay | self.fusionminutecron = int(self.getenv("pvfusionminutecron")) pyfusionsolardatarelay | ValueError: invalid literal for int() with base 10: '0, 30'

My docker-compose has the following parameter set:

  • pvfusionminutecron=0,30

change in fusionsolarurl

Hi, with the last system update, the fusionsolarurl (for the kiosk mode) changed to
https://uni002eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk

pvoutputsystemid not being read correctly

Running PyFusionSolarDataRelay 1.0.4 on a docker container on a Synology NAS.

I've set the environment variable pvoutputsystemid to what is listed at pvoutput.org. However when I start the container it says in the log:

INFO - System ID: 12345

I have also noticed that when it tries to upload to pvoutput.org

requests.exceptions.InvalidHeader: Header part (12345) from {'X-Pvoutput-SystemId': 12345} must be of type str or bytes, not <class 'int'>

I did try to set the variable pvoutputsystemid to "XXX" but it is still read as 12345.

Any ideas?

Docker errors

Docker gives me this error message every time the script runs. I've only configured it for pvoutput and can't really understand what the issue is.

2023-11-05 14:30:00 2023-11-05 13:30:00,001 - root - INFO - Requesting data from FusionSolar Kiosk API...
2023-11-05 14:30:00 2023-11-05 13:30:00,001 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): region04eu5.fusionsolar.huawei.com:443
2023-11-05 14:30:00 2023-11-05 13:30:00,990 - urllib3.connectionpool - DEBUG - https://region04eu5.fusionsolar.huawei.com:443 "GET /pvmswebsite/nologin/assets/build/index.html HTTP/1.1" 200 None
2023-11-05 14:30:01 2023-11-05 13:30:01,001 - root - ERROR - Uncaught exception in FusionSolar data processing loop.
2023-11-05 14:30:01 Traceback (most recent call last):
2023-11-05 14:30:01 File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
2023-11-05 14:30:01 return complexjson.loads(self.text, **kwargs)
2023-11-05 14:30:01 File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
2023-11-05 14:30:01 return _default_decoder.decode(s)
2023-11-05 14:30:01 File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
2023-11-05 14:30:01 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2023-11-05 14:30:01 File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
2023-11-05 14:30:01 raise JSONDecodeError("Expecting value", s, err.value) from None
2023-11-05 14:30:01 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-11-05 14:30:01
2023-11-05 14:30:01 During handling of the above exception, another exception occurred:
2023-11-05 14:30:01
2023-11-05 14:30:01 Traceback (most recent call last):
2023-11-05 14:30:01 File "/code/pvfusionsolar.py", line 29, in fetch_fusionsolar_status
2023-11-05 14:30:01 response_json = response.json()
2023-11-05 14:30:01 File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
2023-11-05 14:30:01 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2023-11-05 14:30:01 requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-11-05 14:30:01
2023-11-05 14:30:01 During handling of the above exception, another exception occurred:
2023-11-05 14:30:01
2023-11-05 14:30:01 Traceback (most recent call last):
2023-11-05 14:30:01 File "/code/pvrelay.py", line 34, in process_fusionsolar_request
2023-11-05 14:30:01 fusionsolar_json_data = self.pvfusionsolar.fetch_fusionsolar_status()
2023-11-05 14:30:01 File "/code/pvfusionsolar.py", line 31, in fetch_fusionsolar_status
2023-11-05 14:30:01 raise Exception(
2023-11-05 14:30:01 Exception: Error while parsing JSON response from Kiosk API: 'Expecting value: line 1 column 1 (char 0)'
2023-11-05 14:30:01 2023-11-05 13:30:01,002 - root - DEBUG - Waiting for next FusionSolar interval...
2023-11-05 14:30:01 2023-11-05 13:30:01,002 - apscheduler.executors.default - INFO - Job "PvRelay.process_fusionsolar_request (trigger: cron[hour='*', minute='0,30'], next run at: 2023-11-05 14:00:00 UTC)" executed successfully

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.