Giter Club home page Giter Club logo

solarlog-exporter's People

Contributors

chrishrb avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

solarlog-exporter's Issues

SolarLog Version

Hi, there is no information about the current version of the software on the Solarlog or the model.
Does it also work with software versions 2.X.X ?

UnicodeDecodeError

I have a similar problem as in #3 but it seems to be with the ftp part. I used the release 0.0.3.
I tested with ftp server and with a local directory, the issue seems to be the same. What can i do do fix this?

solarlog_exporter  | DEBUG:urllib3.connectionpool:http://influxdb:8086 "GET /query?q=SELECT+%2A+FROM+solarlog_min+WHERE+system+%3D+%27PV-System%27+ORDER+BY+time+DESC+LIMIT+1%3B&db=solarlog HTTP/1.1" 200 None
solarlog_exporter  | WARNING:root:No last record found
solarlog_exporter  | DEBUG:root:Starting..
solarlog_exporter  | DEBUG:root:Used directory: /
solarlog_exporter  | DEBUG:root:Last Record 2023-02-25 12:52:20.456000+00:00
solarlog_exporter  | Traceback (most recent call last):
solarlog_exporter  |   File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
solarlog_exporter  |     return _run_code(code, main_globals, None,
solarlog_exporter  |   File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
solarlog_exporter  |     exec(code, run_globals)
solarlog_exporter  |   File "/app/./__main__.py", line 47, in <module>
solarlog_exporter  |     sys.exit(main())
solarlog_exporter  |   File "/app/./__main__.py", line 33, in main
solarlog_exporter  |     start_ftp_import(
solarlog_exporter  |   File "/app/./solarlog_exporter/core.py", line 89, in start_ftp_import
solarlog_exporter  |     config_parser.parse_ftp_file(ftp, path + "/base_vars.js")
solarlog_exporter  |   File "/app/./solarlog_exporter/parser.py", line 33, in parse_ftp_file
solarlog_exporter  |     ftp.retrlines(f'RETR {ftp_file_path}', string_list.append)
solarlog_exporter  |   File "/usr/local/lib/python3.8/ftplib.py", line 461, in retrlines
solarlog_exporter  |     line = fp.readline(self.maxline + 1)
solarlog_exporter  |   File "/usr/local/lib/python3.8/codecs.py", line 322, in decode
solarlog_exporter  |     (result, consumed) = self._buffer_decode(data, self.errors, final)
solarlog_exporter  | UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 1046: invalid start byte

Encoding-Issue

There seem to be some parsing issues with special chars in the base_vars.js:

solarlog-exporter | Traceback (most recent call last): solarlog-exporter | File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main solarlog-exporter | return _run_code(code, main_globals, None, solarlog-exporter | File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code solarlog-exporter | exec(code, run_globals) solarlog-exporter | File "/app/./__main__.py", line 53, in <module> solarlog-exporter | sys.exit(main()) solarlog-exporter | File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__ solarlog-exporter | return self.main(*args, **kwargs) solarlog-exporter | File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1062, in main solarlog-exporter | rv = self.invoke(ctx) solarlog-exporter | File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke solarlog-exporter | return ctx.invoke(self.callback, **ctx.params) solarlog-exporter | File "/usr/local/lib/python3.8/site-packages/click/core.py", line 763, in invoke solarlog-exporter | return __callback(*args, **kwargs) solarlog-exporter | File "/app/./__main__.py", line 49, in main solarlog-exporter | start_import(directory) solarlog-exporter | File "/app/./solarlog_exporter/core.py", line 25, in start_import solarlog-exporter | config_parser = ConfigParser(path + "/base_vars.js") solarlog-exporter | File "/app/./solarlog_exporter/parser.py", line 39, in __init__ solarlog-exporter | self.parse_file(config_path) solarlog-exporter | File "/app/./solarlog_exporter/parser.py", line 23, in parse_file solarlog-exporter | for line in file: solarlog-exporter | File "/usr/local/lib/python3.8/codecs.py", line 322, in decode solarlog-exporter | (result, consumed) = self._buffer_decode(data, self.errors, final) solarlog-exporter | UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 620: invalid start byte solarlog-exporter exited with code 1

This is triggered by e.g. German Umlauts:
WRInfo[0]=new Array("QS3200/Pro","XXXXXXXXX",2760,1,"MV QS3500, Süd",2,null,null,0,null,16,0,1,1000,null)

Changing this to
WRInfo[0]=new Array("QS3200/Pro","XXXXXXXXX",2760,1,"MV QS3500, Sued",2,null,null,0,null,16,0,1,1000,null)
helps.

Same on some other characters:

  • Degree-Sign:
    var HPAusricht="30°SSO, 30°NNW"
  • Some special char:
    var Currency ="<80>"

Solarlog pushes all files using ftp daily, therefore manually fixing base_vars.js does not really help.

Error: Missing option '-d' / '--directory'.

I really like what you put together here and like to point it to my Solarlog.
Unfortunately I get stuck already when trying to launch the docker images:

solarlog-db        | 2022-03-07T12:34:56.       info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
solarlog-db        | 2022-03-07T12:34:56.       info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
solarlog-exporter  | Usage: python -m  [OPTIONS]
solarlog-exporter  | Try 'python -m  --help' for help.
solarlog-exporter  | 
solarlog-exporter  | Error: Missing option '-d' / '--directory'.

Probably something very easy, but I don't know much about Python I am afraid.
I tried with the image from your repo as well as built locally. Here's my test docker-compose.yml

cat docker-compose.yml 
version: '2'
services:
  solarlog-exporter:
    image: solarlog-exporter:latest
    container_name: solarlog-exporter
    volumes:
      - ./tests/assets:/data
    environment:
      - INFLUXDB_DB=solarlog

  influxdb:
    image: influxdb:2.1-alpine
    container_name: solarlog-db
    ports:
      - "8086:8086"
    environment:
      - INFLUXDB_HOST=influxdb
      - INFLUXDB_DB=solarlog

    volumes:
      - ./influxdb:/var/lib/influxdb2

Config file, where do I get it from?

When starting up with docker-compose solarlog-exporter crashes immediately, complaining about "No inverters in config found", which is probably correct because I did not provide a config file.
The readme says:

  1. Get data from LOCAL
  2. Parse Config file

What does this config file look like and where should it come from? An export from SolarLog?

Docker image won't start

I just wanted to test this container.

The container crashes on startup:

# docker logs solarlog-exporter
Usage: python -m  [OPTIONS]
Try 'python -m  --help' for help.

Error: Missing option '-d' / '--directory'.

Any idea?

Best, Dirk

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.