Installation - flashg1/SolarCharger GitHub Wiki

How to migrate from TeslaSolarCharger/evSolarCharger to SolarCharger?

Hey, your favourite solar charger is now a full-fledged Home Assistant custom integration! It is much easier to use without the need to create helper entities because the required control entities are automatically created by the integration. It has finer control of charge behaviour, improved functionality and diagnostics, and a whole lot more ... Please give it a try!

  1. Follow the procedure in the README to install and configure the custom integration. Unlike Blueprints, there is no need to create helpers for the custom integration.

  2. Turn off the TeslaSolarCharger/evSolarCharger Blueprint.

SolarCharger initial configuration

Net power sensor

Sensor that expresses negative value in Watts for power exported to grid, or positive value for power imported from grid. This sensor is the feedback loop for adjusting power consumption.

Charger current update period

The charger current update period defines how often to adjust the charge current, and hence how often the charger API is polled. The default is every 60 seconds. The charger current update period must be greater than or equal to the net power sensor update period.

The actual charger current update is triggered on a net power update cycle provided the charger current update period has elapsed, or just about to elapse.

If you are uncertain about the net power sensor update period, please check the median net allocated power period in the diagnostic section.

What configs are required after installation?

The following configs are required as a minimum after installation and adding charger,

  • Effective voltage
  • Max current

Global defaults

Effective voltage

This defines the charger effective voltage.

Local device

Max current

This defines the charger maximum current. The maximum current is required to determine the maximum power that can be allocated to the device during power allocation and rebalancing.

Max charge speed

Please see user guide for description.

How to reconfigure net power and charger current update period?

Settings > Devices & services > SolarCharger > 3-dots next to cog wheel > Reconfigure

Please see SolarCharger initial configuration for more information.

How to delete and re-add the SolarCharger integration?

IMPORTANT NOTE

Please note down all your customised configs done via "SolarCharger > Settings (cog wheel)" before removing the integration so that you can manually put them back later if required. Please see SolarCharger config files for more information.

To delete the integration:

Settings > Devices and services > Integration tab > SolarCharger > 3-dots next to cog wheel > Delete

To re-add the integration:

Settings > Devices and services > Integration tab > Add integration > Search for "SolarCharger"

Redo any config customisation that you need.

SolarCharger configuration files

Starting with v0.10.0, SolarCharger custom configs in settings (cog wheel) are now saved in configuration files in /config/.storage directory. The files start with the name "solarcharger" (see examples below). These files are only used when you recreate a SolarCharger device so that you don't have to enter the same configurations everything time you delete and re-add the integration.

The files can be removed if you need to recreate SolarCharger devices from scratch.

\\homeassistant.local\config\.storage

solarcharger.custom_hot_water
solarcharger.custom_vulcan_1500w_heater
solarcharger.device
solarcharger.global_defaults
solarcharger.source
solarcharger.tesla_custom_tesla23m3

Keep current config and history when updating SolarCharger

The instructions here have not gone through thorough testing and might not work for all scenarios.

A SolarCharger entity ID is made up of following parts,

[HA Domain].[SolarCharger Prefix]_[Charger Domain]_[Device Name]_[Entity Key]

For example, the entity ID for "Net allocated power" is,

sensor.sc_tesla_custom_tesla23m3_net_allocated_power

where,

  • HA Domain = sensor
  • SolarCharger Prefix = sc
  • Charger Domain = tesla_custom
  • Device Name = tesla23m3
  • Entity Key = net_allocated_power

A successful migration from the old name to the new name and keeping history is not dependent on the "SolarCharger Prefix", but is dependent on the other 4 parameters staying the same. So it should be possible to keep history and config if we are only changing "SolarCharger Prefix".

In order to keep config and history for the SolarCharger entities, the migration steps must be carried out in the order specified.

Step 1 - Update to latest version

Just update SolarCharger to the latest version, and then restart HA. Do NOT manually delete the old version then reinstall the new version at this stage.

Step 2 - Check entities after update

After the update and restart, you should see some entities are unavailable because their "Entity Key" have changed. The history for those entities cannot be migrated, but the config and history for the other available entities can be migrated.

Step 3 - Migrate the entities to the new name

Settings > Devices and services > Integration tab > SolarCharger > Select your device > Click the 3-dots > select "Recreate entity IDs".

Inspect the entity IDs to be renamed, noting that you will need to change your automations and templates to use the new name later. Click "Update" to rename the IDs.

Repeat this step for all your SolarCharger devices, including the "Global defaults" device.

Step 4 - Migrate settings in SolarCharger config files

Once completed all steps above, follow this procedure here to delete and re-add the integration to update the SolarCharger config files. These config files are used to store the configs done via settings (cog wheel), ie.

Settings > Devices and services > Integration tab > SolarCharger > cog wheel