Code Monkey home page Code Monkey logo

solmate-sdk's People

Contributors

asraelis avatar felix-pilgram avatar felixgrabler avatar felixmark avatar johannespuntigam avatar mhorn8054 avatar mmattel avatar mrp01 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mmattel

solmate-sdk's Issues

Feature Request: Total Energy

First of all, thank you for this wonderful API which makes life so much easier. For some implementations like eg. HA energy board a total amount of injected energy in kWh and total PV energy generated would make the implementation of the API much easier.
I guess these values are available as they are used in the SolMate App as far as I understand.

Exception when creating directory for credentials file on Windows machine

Running the quickstart() (module apiclient.py) on a Windows machine raises an exception when creating the directory for the credentials file. Solution: Add "parents=True" keyword to mkdir() to allow Windows to create all missing parents in the path.

This doesn't work on Windows machines

...
CONFIG_DIRECTORY.mkdir(exist_ok=True)
...
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'C:\Users\anyuser\.config\solmate-sdk'

This works on Windows machines as well

...
CONFIG_DIRECTORY.mkdir(parents=True, exist_ok=True)
...

Feature Request: MQTT Integration for SolMate

would be a unique feature for haveing all api states and battery to control its behaviour with mqtt.

  • set features:

    • user minimum injection
    • user maximum injection
    • user minimum bettery percentag
  • get: (all values from the current api + cummulative energy values (solar_energy_kwh, inject_energy_kwh, battery_in_kwh, battery_out_kwh)

image

Homeassistant

Hallo,

als nicht Programmierer: wie bekomme ich die SDK in meinen Home Assistant integriert
Muss ich den Ordner in config/custom_componenets kopieren?
Wie installliere ich dann die Files?

über das Terminal?

Bitte um eine ANleitung für den "Normal" User!

Besten Dank!

LocalSolMateAPIClient Authentication Example

sn = "S1K0506A0000xxxx"
solclient = solmate_sdk.LocalSolMateAPIClient(sn)
solclient.uri = "ws://sun2plug.local:9124/"

solclient.list_wifis()
{'id': 2, 'error': {'type': 'BadRequest', 'message': 'Not authenticated.'}}
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/dist-packages/solmate_sdk/apiclient.py", line 232, in list_wifis
return self.request("list_wifis", {})

wie läuft die authentifizierung mit LocalSolMateAPIClient? (Parallel zur online)

serial number bereits für "online" requests verwendet
(/.config/solmate-sdk/authconfig.json ist bereits vorhanden)

Allow minimum inject power above 200W

In order to control the Solmate via an external home automation system such as Home Assistant together with a home energy meter, it is very important to set a higher minimum injection power than the current 200W. I would like to be able to set a value up to the maximum power of 800W to discharge the battery on sunny days.

solmate mit home assistent and mqtt - wunsch


ich bekomm aktuell nicht die api-dokumentation sauber zum laufen. (DOKUMENT: EET SolMate API Documentation)
der pyton code ist einfach nicht aus dem pdf rauszukopieren mit all den tabstops (GIT REPO?)

  File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 165, in initialize_app
    await utils.run_in_executor(self, init)
  File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 337, in run_in_executor
    response = future.result()
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/appdaemon/apps/eet.py", line 47, in initialize
    self.client.quickstart()
  File "/usr/lib/python3.10/site-packages/solmate_sdk/apiclient.py", line 123, in quickstart
    self.connect()
  File "/usr/lib/python3.10/site-packages/solmate_sdk/apiclient.py", line 54, in connect
    asyncio.get_event_loop().run_until_complete(self._connect())
  File "/usr/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'

source: https://github.com/eet-energy/solmate-sdk/blob/master/solmate_sdk/apiclient.py

You are trying to run asyncio.get_event_loop() in some thread other than the main thread - however, asyncio only generates an event loop for the main thread.

Instead use new_event_loop:

asyncio.new_event_loop().run_until_complete(main())

ENVIRONMENT: appdeamon config packages:

init_commands: []
python_packages:
  - gurux-dlms
  - beautifulsoup4
  - paho-mqtt
  - lxml
  - pyserial
  - cryptography
  - pycryptodomex
  - solmate-sdk
system_packages:
  - libxslt-dev
  - python3-idle
  - python3
  - python3-dev
  - alpine-sdk
  - autoconf
  - automake
  - libtool
  - gcc
  - g++
  - make
  - libffi-dev
  - py3-pycryptodome
  - libcrypto1.1
  - libssl1.1
log_level: info

refs:
https://solmate-sdk.readthedocs.io/en/latest/#sol2mqtt
https://appdaemon.readthedocs.io/en/latest/HASS_TUTORIAL.html

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.