Skip to content

hoang-rio/lux-grid-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

584 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lux Grid Watcher

Tiếng Việt | English

GitHub Release License Commit activity GitHub last commit

Docker publish action status Docker Image Latest Docker Image Latest Docker Image Size

About

A python script allow watch Luxpower SNA inverter in realtime. Tested in Luxpower SNA 6K with old wifi dongle (BAxxxxxx wifi name)

Inverter setup

See wiki from lxp-bridge here. (You can ignore AC charge setup)

Configuration

  • Copy .env.example to .env
  • Update configuration in .env with your info

Installation and run

  • Sync gitsubmodule with git submodule init && git submodule update
  • Python 3 required
  • Setup python venv with python -m venv venv
  • Active python venv source venv/Scripts/activate on git-bash Windows or source venv/bin/active on Unix/Linux
  • Install dependencies with pip install -r requirements.txt or ./pip-binary-install.sh on low-end device (example: OpenWrt router)
  • Run application with python app.py

If you can't install and run you can use docker method bellow

Locking for docker? Here is step

  • cd to docker folder
  • run command docker compose up -d to run docker container

Notification app

You can implement notification app for Android/iOS by your self and push Firebase Device ID to devices.json file to get notification when grid connect state change.

I also developed an app for Android/iOS. If you need it feel free to contact me

The built-in web server also exposes mobile-friendly APIs:

  • POST /fcm/register with JSON or form body token=<firebase_device_token> to save a device token
  • GET /mobile/state to read the current grid connection state and state-change history

Web Viewer

  • Build FE with command cd web_viewer/fe_src && yarn install && yarn build (Ignore this step if you run via docker)
  • Now you can see LuxPower realtime web viewer in http://localhost:88 (or another port if you changed PORT in .env).
  • HTTPS is also supported; enable it by setting HTTPS_ENABLED=true and providing HTTPS_PORT, HTTPS_CERT_FILE, and HTTPS_KEY_FILE in .env.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Third-party

Thanks to @celsworth by awesome project celsworth/lxp-packet (has been deleted) and celsworth/lxp-bridge (under MIT License)

This project includes code from aiohttp library (https://github.com/aio-libs/aiohttp.git) which is licensed under the Apache License 2.0.

About

Watch LuxPower SNA inverter via Luxpower local wifi dongle

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors