Open fullerms opened 3 days ago
@fullerms Powercalc complete profile library previously was included in the component, but it's size was growing out of control. So since a few months powercalc downloads the needed profiles from the internet. It should only do that once and load locally when it has already downloaded. On every startup powercalc downloads meta data about the full library to see if certain profiles have been updated and than it should redownload.
It seems you got an error on downloading this metadata, but this should also fallback to local to not break the powercalc setup.
I will have a look into this to see why this fallback was not working for you and to make it more robust.
Also more information about the library and download feature is here: https://homeassistant-powercalc.readthedocs.io/en/latest/library/library.html
I have a related issue: my powercalc
v1.12.1 fails to start when there is no internet when starting Home Assistant. It tried to connect to the internet, fails, and then the sensors are unavailable.
This is the log file:
I like the option to manually download the libraries. Perhaps it's an idea to download once, and make the check for updates opt-in/opt-out/manual/(more) robust against lack of internet.
P.S. really like your add-on :)
There were some changes to make things more robust in v1.12.x revisions, and better retry mechanism and error handling. I improved more on it and just released v1.13.1 which contains latest improvement in logging. The error you got @tvwerkhoven were fixed in recent versions of powercalc.
I tried myself by disconnecting the internet and then it should just fallback to local files which were already downloaded before, and successfully startup powercalc. So in essence it should work like you want @tvwerkhoven with the latest version.
When you never want Powercalc to attempt connecting to the internet ever you can use this configuration: https://homeassistant-powercalc.readthedocs.io/en/latest/library/library.html#disable-download-feature But that also means you'll need to manage all the downloading and copying of the profiles manually.
Could you please try again with v1.13.1 and let me know if this starts up correctly without internet access? When still problems please also enable debug logging and share the logs after startup.
@bramstroker thanks for the prompt response. Will test after upgrading to the new release and let you know.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4845 Installed Version | 1.34.0 Stage | running Available Repositories | 1386 Downloaded Repositories | 13Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 57.8 GB disk_used | 16.0 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | false virtualization | board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.14.0), File editor (5.8.0), Network UPS Tools (0.13.0), Home Assistant Google Drive Backup (0.112.1), HassOS I2C Configurator (0.14), ArgonOne Active Cooling (30a), LMS Lyrion Music Server(Formerly Logitech Media Server) (8.5.2.0), Mosquitto broker (6.4.1), Syslog (0.1.0), Zigbee2MQTT (1.39.0-1), Studio Code Server (5.15.0), Advanced SSH & Web Terminal (18.0.0), SunGather (0.1.4)Dashboards
dashboards | 12 -- | -- resources | 6 views | 12 mode | storageRecorder
oldest_recorder_run | June 24, 2024 at 23:11 -- | -- current_recorder_run | July 5, 2024 at 09:40 estimated_db_size | 380.54 MiB database_engine | sqlite database_version | 3.45.3Sonoff
version | 3.7.3 (e240aaf) -- | -- cloud_online | 0 / 1 local_online | 0 / 0Checklist
Describe the issue
Had an internet outage for a couple of hours today and noticed that PowerCalc sensors were not available anymore, Checked the logs and found these entries.
Failed to download, retrying... (Attempt 1 of 3) Failed to download, retrying... (Attempt 2 of 3)
Reproduction steps
1.Disconnect internet from main router 2. 3. ...
Debug logs
Diagnostics dump or YAML config
No response