Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.
Post details of your integration with Home Assistant etc.
I'm running an old Thin Client PC imaged with Linux Mint
Running off SSD and don't forget your daily backups.
I moved away from RPi and use an old old laptop. Cheaper and less hassle. Cards have always corrupted on me over the years no matter what precautions I've taken.
Do share the solution, I haven't played with the database queries but I didn't like how HA works with Grafana when I last looked as I hard to search by the unit of measurement. Maybe that was just how I set it up.
I have the home assistant built in energy dashboard doing this calc for me:
Never mind, figured it out!
Anyone familiar with Grafana for homeassistant? I want to create a panel that tallies up the daily total in euro from the kw/h imported.
Using this query to gather the kwh
SELECT mean("value") FROM "autogen"."kWh" WHERE ("entity_id"::tag = 'myenergi_my_home_grid_import_today') AND $timeFilter GROUP BY time($__interval) fill(null)
and if I do a math function of say, $A * 0.39 I'll get both the kwh and result in the same panel.
It's been years since I've worked with Grafana, it's changed so much!
Basically I want a box that performs the calculation with the Euro symbol. Any ideas?
Yeah let us know how it goes, I might throw one onto mine as long as it takes lifepo4 and not just lithium batteries.
I forgot I have one of these hats on my pi https://www.aliexpress.com/item/4001272206755.html?spm=a2g0o.store_pc_groupList.8148356.4.66eb4b4aTFRkXQ&pdp_npi=3%40dis%21EUR%21%E2%82%AC%2050%2C39%21%E2%82%AC%2044%2C84%21%E2%82%AC%2044%2C84%21%21%21%21%40211b88ec16865193651111878e8c03%2112000016797922858%21sh%21IE%21795413750 I just need a battery + housing 😁
I ordered a pijuice hat.. so I'll see how that goes
I see, so maybe something like this https://www.aliexpress.com/item/1005005071564178.html?spm=a2g0o.productlist.main.1.6a4f67afbu4S6H&algo_pvid=97000079-368e-4447-95d8-81d873fbc5f0&algo_exp_id=97000079-368e-4447-95d8-81d873fbc5f0-0&pdp_npi=3%40dis%21EUR%2142.27%2138.04%21%21%21%21%21%402100b1a616864995121743328d0783%2112000031524797081%21sea%21IE%21795413750&curPageLogUid=NCo4MU8MwxNX would have kept it alive?
It's actually on the ups circuit from my inverter but I had a weird issue last night where the inverter tripped it's RCD and the power from the EPS socket took a fraction to kick in.. during an actual power cut recently it was fine
Strange one, I use a similar setup with a pi4 and it never happened when I lost power, in fact I have the pi on a smart switch that I can toggle on and off if it ever hangs on me.
If you have batteries with your solar you could use them as a gigantic UPS with something like this: https://solar-assistant.io/shop/products/dc_usb_psu_type_c or wire the pi to the backup port on your inverter which is still powered by your batteries, that's what I do for the pi and all network gear in the attic
Probably. They tend to plug into the Pi headers and double the height of the Pi.
That's mine in dashcam config (missing the LiOn battery and top of case) for mounting in a footwell during a road-trip. That metal case just happened to fit the Pi and UPS.
I see some examples of pi ups boards, Any with cases? Or would I have to recase mine pi 3?
Sounds like a filesystem problem due to an unclean shutdown Mick. Ideally you need the Pi to do a clean shutdown once it's running off that USB UPS. There are Pi UPS's specifically for that. You could script that by pinging a device such as the router which fails when the power is gone and the the script shuts the Pi down. Maybe somebody already published that type of a script already.
Yeah that's what I'm thinking... Are there any ups power banks that you can run off plug and will keep power when it fails? Something like this I guess?
https://www.amazon.co.uk/Yangers-uninterrupted-supply-8800mAh-battery/dp/B09GNV4FV3/ref=mp_s_a_1_3?crid=36L5CMS5OUTMC&keywords=usb+ups&qid=1686429168&sprefix=usb+ups%2Caps%2C129&sr=8-3
Well as the pi b runs on a USB, a USB power bank? Use the power bank as a ups.
It shouldn't be dying due to a power cut though.
Hi folks,
I have home assistant running on raspberry pi 3b, using 500gb SSD drive. It's all running perfectly and I take daily backups to Google drive. If I've a power cut though I seem to loose the pi and the only way I can get it back is boot from micro SD, flash the SSD drive again, reboot and restore a backup.. thankfully that gets me back up and running but it's a bit of a pain. Apart from a ups, what else could I be looking at?
Cheers,
Mick
What's happened to Home Assistant? I got a core upgrade today so as usual I updated.
Now, I can't restart my LocalTuya Integration nor a few others that I've tried.
Sometimes, LocalTuya loses contact with one of my smart sockets so I go into the LocalTuya integration where there is an option to Restart it. Now, after the core upgrade, this option is no longer there. How can I restart a single integration? Do I have to restart the whole of HA from now on?
@10-10-20 & @Jonathan Thanks. I've been fiddling with Helpers today and have a Min for SOC. I'll put together some logic for time when 90% and 99% SOC is reached. So long as I can see these, at a glance, in the morning rather than having to call up a chart and read them off an axis then I'll be happy to input them myself into a spreadsheet.
Unfortunately to do it using in-built components is a bit of a faff as @10-10-20 has highlighted.
Easiest solution is to use this custom component from HACS.
https://github.com/jeroenterheerdt/HADailySensor
How do I go about creating an automation in HA that records the daily peak PV input
Is your inverter sending a daily yield value in kWh? If not, what about a total yield in kWh?
Use a utility meter with the sensor pointing at one of the kWh counters and specify the reset cycle like this:
utility_meter: solar_hourly_energy: source: sensor.solar_energy_total_sum name: Solar Panel Hourly Energy cycle: hourly solar_daily_energy: source: sensor.solar_energy_total_sum name: Solar Panel Daily Energy cycle: daily solar_weekly_energy: source: sensor.solar_energy_total_sum name: Solar Panel Daily Energy cycle: weekly solar_monthly_energy: source: sensor.solar_energy_total_sum name: Solar Panel Monthly Energy cycle: monthly
Another option is to use a Riemann sum with "method: left" and let that do the counting cycle.
daily minimum State of Charge etc.
I think that a "min" integration would do this:
You can use a helper to set it up instead of using YAML but you may need an automation to trigger the action just after midnight (I think).
I'm using the Solarman integration
https://github.com/StephanJoubert/home_assistant_solarman
The inverter is already sending data to HA. I'd like to have a daily SOC low before sunrise, PV peak, time when battery reached 90% and 99% in the morning.
Solcast et al are not that great so I am just going to take seasonal averages for the battery to charge up in the morning and want to have the data there, waiting for me in the morning, rather than having to trawl through charts and work the figures out.
Depends on inverter and if you're sending the data to HA?
How do I go about creating an automation in HA that records the daily peak PV input, daily minimum State of Charge etc.
I want these values displayed on the HA homepage.
Thanks!
Anyone have any nice set ups in HA using Grafana? Using it for battery view but not integrated right into the main dashboard and would prefer to have a date time filter on it too.
That depends on your outputs from your power monitor/inverter montior.
For me, I use the Huawei integration and the calculation on https://github.com/wlcrs/huawei_solar/wiki/Daily-Solar-Yield
Works pretty well.
pls delete
What do people do to stop the double count of battery and solar in home assistant when the battery is discharging? As you can see from the Energy graph it is double counting as discharge and solar generation during the night.