Skip to content

stevebuk1/pv_opt_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PV Opt App: Home Assistant Solar/Battery Optimiser

App (AddOn) v1.0.0-Beta-4, utilising Pv_opt v5.1.0-Beta-1.

Introduction

Solar / Battery Charging Optimisation App for Home Assistant.

This App (previously known as an AddOn) can be used with Home Assistant to run Pv_opt without using AppDaemon.

Pv_opt itself is unchanged from the AppDaemon version and so will behave identically.

Upgrading from PV_opt running under AppDaemon

If you are currently running PV_opt under AppDaemon, follow this section, otherwise go to Installation Instuctions below .

  • Stop Appdaemon, and make sure the toggles "Start on Boot" and "Watchdog" are set to off (or remove Pv_opt from AppDaemon if you have other AppDeamon apps still running).
  • Open your Home Assistant instance and show the Add app repository dialog with a specific repository URL pre-filled.
  • Go to settings, apps, install app
  • Click the 3 vertical dots at top right and select "Repositories".
  • Press the "Add" button, and add 'https://github.com/stevebuk1/pv_opt_app)' as a new repository
  • Go back one page, scroll to the bottom to the Pv_opt Addon, and press Install
  • Installation will take a few minutes as the App is built (you can follow progress in the HA Supervisor Log)
  • When installed, go to the Configuration tab and add the MQTT username and password you used when originally intalling Mosquito.
  • Click Start on the App.

Notes:

  • The installer will copy across your config.yaml from the AppDaemon area, this will now live at /config/pv_opt/config.yaml. No changes are required.
  • pv_opt.log is now written to /config/pv_opt/pv_opt.log
  • error.log is now written to /config/pv_opt/error.log
  • There is also a live log in the Log Tab of the App which includes the contents of both logs as well as any logging that went to main.log/AppDaemon.log.

And remember: Do not run the Pv_opt App at the same time as Pv_opt within AppDaemon.

Installation Instructions

Follow these instructions if you are installing Pv_opt for the very first time.

1. Get a Solcast Hobby Account

PV_Opt relies on solar forecasts data from Solcast. You can sign up for a Private User account here. This licence gives you 10 (it used to be 50 🙁) API calls a day.

2. Install the Solcast PV Solar Integration (v4.1.x)

  1. Install the integation via HACS: https://github.com/BJReplay/ha-solcast-solar
  2. Add the Integration via Settings: http://homeassistant.local:8123/config/integrations/dashboard
  3. Once installed configure using your Solcast API Key from (1) .
  4. Set up an automation to update according to your desired schedule. Once every 3 hours will work. Or utilise Solcast automatic updates.

3. Install the Octopus Energy Integration (If Required)

This excellent integration will pull Octopus Price data in to Home Assistant. Pv Opt pulls data from Octopus independently of this integration but will extract current tariff codes from it if they are avaiable. If not it will either use account details supplied in secrets.yaml or explicitly defined Octopus tariff codes set in config.yaml. If on Intelligent Octopus Go, this integration is required, as Pv_opt will use this to identify any slots allocated outside of 23:30 to 05:30 for use in its charge plan and managing the house battery during car charging slots.

4. Install the Integration to Control Your Inverter

At present this app works directly with Solis hybrid inverters using one of the following:

  1. the Solax Modbus integration (https://github.com/wills106/homeassistant-solax-modbus)
  2. the HA Core Modbus as described here: (https://github.com/fboundy/ha_solis_modbus)
  3. SolisCloud - via the Solis-Sensor integration (with Control enabled) as described here (https://github.com/hultenvp/solis-sensor)
  4. SolisCloud - Combining the Solis-Sensor (https://github.com/hultenvp/solis-sensor) and Solis-Control (https://github.com/mkuthan/solis-cloud-control) integrations.
  5. A Solarman integration (https://github.com/davidrapan/ha-solarman)

Solax Modbus:

  1. Install the integration via HACS: https://github.com/wills106/homeassistant-solax-modbus
  2. Add the Integration via Settings: http://homeassistant.local:8123/config/integrations/dashboard
  3. Configure the connection:
    Prefix solis
    Interface TCP/Ethernet
    Inverter Type solis
    IP Address IP of your datalogger
    TCP Port 502
    Protocol Modbus TCP
  4. Check that you have comms with the inverter and the various entities in the integration are populated with data

HA Core Modbus

Follow the Github instructions here: https://github.com/stevebuk1/ha_solis_modbus

Using Solis Cloud

Solis-Sensor

Follow the Github instruction here: https://github.com/hultenvp/solis-sensor Either enable Control via this integration (mnote this is Experimental/Beta), or leave disabled and install Solis-Control below.

Solis-Control

Follow the Github instruction here: https://github.com/mkuthan/solis-cloud-control

Note: install with device name of "solis" rather than the default of "inverter_control_XXXXXXXXXXX" (where X is the inverter S/N)

Solarman

Follow the Github instructions here: (https://github.com/davidrapan/ha-solarman)

For Solis Inverters, replace existing Solis_Hybrid.yaml with this one:

https://github.com/stevebuk1/pv_opt/blob/main/files/solis_hybrid.yaml

5. Install the MQTT Integraion in Home Assistant

  1. Click on the button below to add the MQTT integration:

6. Install Mosquitto MQTT Broker

  1. Navigate to Settings -> Addons and click "Mosquito Broker"

  2. Click on Install

  3. Configure the Add-On as per the documentation: http://homeassistant.local:8123/hassio/addon/core_mosquitto/documentation

  4. Make a note of the MQTT username and password for later.

7. Install File Editor

Follow instructions here: https://github.com/home-assistant/addons/blob/master/configurator/README.md

Navigate to Settings -> Addons -> File editor -> Configuration and set "Enforce Basepath" to "off".

8. Install Samba Share and/or Studio Code Server Add-ons If Required

Both of these add-ons make it easier to edit text files on your HA Install but aren't strictly necessary. Samba Share also makes it easier to access the log files.

9. Install the PV_opt App (formerly known as an AddOn)

  • Open your Home Assistant instance and show the add app repository dialog with a specific repository URL pre-filled.
  • Go to settings, apps, install app
  • Click the 3 vertical dots at top right and select "Repositories".
  • Add 'https://github.com/stevebuk1/pv_opt_app)' as a new repository
  • Go back one page, scroll to the bottom to the Pv_opt Addon, and press Install. This will take a couple of minutes.
  • When installed, go to the Configuration tab and add the MQTT username and password from Step 4 above.
  • Click Start on the App.
  • Select the Log tab. The following should be produced:
[22:20:33] INFO: Starting PV Opt dev
[22:20:33] INFO: Using existing config at /config/pv_opt/config.yaml
[22:20:33] INFO: Launching PV Opt...
2026-04-28 22:20:35  INFO     *************** PV Opt Add-On Version: 1.0.0-Beta-2 ***************
2026-04-28 22:20:35  INFO     Logging to /config/pv_opt/pv_opt.log and /config/pv_opt/error.log
2026-04-28 22:20:35  INFO     Loaded pv_opt config from /config/pv_opt/config.yaml
2026-04-28 22:20:35  INFO     
2026-04-28 22:20:35  INFO     WebSocket: connecting to ws://supervisor/core/api/websocket
2026-04-28 22:20:35  INFO     *************** PV Opt Version: v5.1.2-Beta-6 ***************
2026-04-28 22:20:35  INFO     
2026-04-28 22:20:35  INFO     Pre-release version. Enabling debug logging
2026-04-28 22:20:35  INFO     Debug Categories selected = O
2026-04-28 22:20:35  INFO     Debug Categories selected = O
2026-04-28 22:20:35  INFO     MQTT connected to core-mosquitto:1883
2026-04-28 22:20:35  INFO     Local timezone set to GB
2026-04-28 22:20:35  INFO     Time Zone Offset: 60 minutes
2026-04-28 22:20:35  INFO     Inverter type: SOLIS_SOLAX_MODBUS: inverter module: solis.py

About

Home Assistant PV Optimisation App (AddOn) for Solis Inverters

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages