Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimenting with predai #13

Open
SwiftRR opened this issue Aug 12, 2024 · 1 comment
Open

Experimenting with predai #13

SwiftRR opened this issue Aug 12, 2024 · 1 comment

Comments

@SwiftRR
Copy link

SwiftRR commented Aug 12, 2024

Hi Trefor,
I have experimented with predai on my raspberry pi HAOS setup. I have free-standing predbat installed without appdaemon.
I have got it working and have added the relevant lines to my predbat apps.yaml.
I managed to generate an apex chart that looks very similar to the chart shown in the documentation.
image

I did notice that there was an extra space in the documentation code lines that I added to my apps.yaml file. It reads as below.
I removed the extra space.

load_forecast_only: True
load_forecast:
- sensor.givtcp_{geserial}_load_energy_today_kwh_prediction$results

Some questions:

  1. I wasn't sure what to add for the 'subtract' line for ev use which refers to a 'sensor'. In predbat, ignoring ev charging or large usages is handled by a switch or inputs (in documentation car charging hold options). I have a zappi.
  2. Should I change the historical days to 10 in the predai yaml to match what I have in HA currently? In fact, what use is such a small sample of historical days? I see that you want a larger sample in a database.
  3. I have a heat pump with weather compensation, and I have been able to add the sensor for my weather compensation to the predai.yaml.

This is what happened to my load predictions for Monday 12th August – scary with so many predicted loads of zero.
My predbat settings are nothing out of the ordinary.
image

I've now commented out the predai code lines from my predbat apps.yaml.
I have kept predai running though. Should this then start populating a historical database?

Still an interesting experiment and good to see that is seems to be quite easy to step back.

Rob

@SwiftRR
Copy link
Author

SwiftRR commented Aug 12, 2024

Trefor,
as an add-on to my earlier comments in #13, I have checked predai.db and I get this error:
'utf-8' codec can't decode byte 0xf8 in position 102: invalid start byte

So it looks as if a database isn't being generated (at least for me). In your video, you suggested that a database would be for the future, relying on HA for now.
This is my predai.log file:
predai.log.txt

In the predai add-on log, I get lots of warnings referring to neuralprophet and types used, e.g.

WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use ``astype`` as an alternative to change the dtype.
  converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)

For completeness, these are the apex charts that I have generated for load and temperature:
image
I intend to leave predai running as an add-on and serving predbat for load.
I will see how it proceeds.

I hope my comments are useful.

Rob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant