PeterH24x7 / -Solar-Analytics-integration-for-Home-Assistant-Energy-monitoring

Integration of the Solar Analytics public API for solar PV system status, and energy/power data for all available channels.
21 stars 2 forks source link

Help for a newbie? #20

Closed illiteratealliterator closed 7 months ago

illiteratealliterator commented 7 months ago

Hi Peter,

I'm very new to Home Assistant (just installed it this week) so please forgive my ignorance. I've installed your SA package and it seems to be working - thank you!

image

However, I'm seeing a bunch of errors in the logs similar to this:

ValueError: Sensor sensor.sa_todays_electric_vehicle_imported has device class 'energy', state class 'None' unit 'Wh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' (<class 'str'>)

ValueError: could not convert string to float: 'unknown'

I suspect these are due to me skipping a couple of steps in your instructions that I didn't understand. I believe I'm meant to somehow be deleting sensors that my system doesn't support, but for the life of me I can't work out how. I'm hoping you don't mind if I ask you some questions.

Question 1

In Step 4, you say:

From States, review the attributes for sa_data_by_5min to identify the device specific channel names and update/delete the satodays... xyz sensors to suit.

By going into Developer Tools / States, I can see a bunch of states.:

image

My best guess here is that I'm meant to identify the sensors that I actually have, such as sensor.sa_data_by_5min_exported_total, and those that I do not, such as sensor.sa_data_by_5min_history_load_air_conditioner. Am I on the right track?

You say to then "update/delete the satodays... xyz sensors to suit". I can see the satodays sensors:

image

But when I click on the "More Info" button to open the settings, the only delete button I've managed to find is disabled:

image

Any chance you'd be able to clarify for me what I'm actually meant to be doing in Step 4, and how?

Question 2

In Step 5 you say to add the new energy sensors from Step 4 to the HA Energy Manager as "Monitor Individual Devices". I haven't added anything here as I wasn't really sure what I was doing. After a bit more reading, I think this section is for monitoring specific appliances like your air conditioner. I don't have any specific devices monitored via Solar Analytics, so I suspect I can ignore this for now - correct?

Question 3

I just noticed that there's a solar_analytics_3phase.yaml file in the repo. I installed solar_analytics.yaml, but I do have three phase power. Have I done the wrong thing here?

Thanks for your excellent contribution, and any advice you can give me!

Roving-Ronin commented 7 months ago

@illiteratealliterator

If your a 3 phase user and just have the Solar Analytics installed with 3 CTs used to monitor the grid in/out and the other 3 used to monitor the in/out from a 3 phase Solar inverter(s), just delete the existing SA file, restart HA and clean out the now unused entities in Developer Tools --> Statistics screen. The copy the 3 phase yaml file over and restart HA again.

You'll then have a configuration just monitoring the grid and solar side of things (so you'll see solar production, grid import and export, solar sent to grid, total consumption for the house ie solar + grid used).

PeterH24x7 commented 7 months ago

Hi @illiteratealliterator - thank you for your contact and questions. Like @Roving-Ronin has concluded, I gather you have 3-phase monitoring and so should be using the solar_analytics_3phase.yaml version; it's basically a cut-down version without EV, HVAC, hot-water or stove-oven related sensors. Please follow the instructions as provided by @Roving-Ronin to install the right version. Let me know if you have any other problems. Chrs, Peter

illiteratealliterator commented 7 months ago

Thanks @Roving-Ronin and @PeterH24x7. I shutdown HA, removed the default yaml file, restarted HA, deleted all the entities related to SA, shutdown again, installed the 3phase version, started up again, reconfigured the Energy dashboard and it looks like it's all working again.

I suspect this isn't causing a problem, but I am still seeing errors on startup:

ValueError: could not convert string to float: 'unknown' ValueError: Sensor sensor.sa_todays_energy_consumed_total has device class 'energy', state class 'None' unit 'Wh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' (<class 'str'>)

I imagine this is caused by the sensor having no data yet, and the template trying to read the value as a float. But it seems like you've already addressed this back in version 6.2:

general improved error checking using is_number (instead of is defined) and providing float(0.0) and int(0) default values.

It seems to happen each time I restart. Anything I can do to get rid of these?

image

Thanks again for your help!

Roving-Ronin commented 7 months ago

@illiteratealliterator yes when your restart/reload HA, the SA sensors take a while to pull the data via REST and give those warnings. Simplest is to check in Developer Tools --> Statistics, and you'll see them go away as they eventually get data.

PeterH24x7 commented 7 months ago

Instead of waiting, there's also a defined automation "SA Refresh all REST data gets" (under Settings / Automations & Scenes) which when manually Run updates all the Rest gets for Solar Analytics.