March 20, 20233 yr Author Hmm that one is in my automation script. I will look tomorrow and move it to the gather scripts I have allready created a login on the "new" area site and think I have it figured out. I did a quick run earlier and all seemed ok. Will wait for them to move my proper account accross, but I think I have the major work done. Did a whole lot of changes today to put all the gather url's in one place and configurable. So any changes needed should be easy now. Edited March 20, 20233 yr by Gary Waterworth
March 20, 20233 yr 3 minutes ago, Gary Waterworth said: Hmm that one is in my automation script. I will look tomorrow and move it to the gather scripts I have just added some of your automation scrips for Timer/SOC setting based on sun/weather. It is working well Now I just need to create a toggle to force grid charge ON and ignore the timer settings for special circumstances. We do not have load shedding (yet) here in the UK. Edited March 20, 20233 yr by randomfool
March 20, 20233 yr Author Just now, randomfool said: I have just added some of your automation scrips for Timer/SOC setting based on sun/weather. Now I just need to create a toggle to force grid charge ON. We do not have load shedding (yet) here in the UK. Yeah it is a pain here Just keep in mind that all of this is done on my own and not approved by sunsynk/e-linter
March 20, 20233 yr Got it, thanks! Attached is a JSON for Grafana if anyone wants to use it. Dependencies are InfluxDB (currently running 4.5.0) Follow the standard install guide and I recommend limiting the view to sensors Maybe with some development it could be nicely integrated into a HA dashboard. Sunsynk PV & Battery-1679335020803.json
March 20, 20233 yr One more question Gary... splix06 linked a nice dashboard layout on his github. I am trying to recreate something like this, but I keep coming unstuck as every time I use one of the "total" sensors it is a cumulative sensor which creates a compounding ladder view if that makes any sense.
March 20, 20233 yr Author 35 minutes ago, randomfool said: One more question Gary... splix06 linked a nice dashboard layout on his github. I am trying to recreate something like this, but I keep coming unstuck as every time I use one of the "total" sensors it is a cumulative sensor which creates a compounding ladder view if that makes any sense. Yes those forever totals are best for the energy graphs There are daily and weekly totals as well in the main sensors in the attributes. Will have to try see how those graphs are being generated. There are also ways to pull in the sunsynk graph data as well. Same as what I did for the temperature data. Will look at it when I have some time Edited March 20, 20233 yr by Gary Waterworth
March 20, 20233 yr 46 minutes ago, Gary Waterworth said: Yes those forever totals are best for the energy graphs There are daily and weekly totals as well in the main sensors in the attributes. Will have to try see how those graphs are being generated. There are also ways to pull in the sunsynk graph data as well. Same as what I did for the temperature data. Will look at it when I have some time Thank you. Does the Free Forecast.Solar account provide enough information or do you require an trial account with API key? sensor.calculated_current_solar_pred is not working, which causes the solar prediction card to N/A. logs shows this:- 2023-03-20 13:48:42.233 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((float(states('sensor.power_production_now_2')) * 1 ) + (float(states('sensor.power_production_now')) * 1 ))|float }}' but no default was specified') while processing template 'Template("{{ ((float(states('sensor.power_production_now_2')) * 1 ) + (float(states('sensor.power_production_now')) * 1 ))|float }}")' for attribute '_attr_native_value' in entity 'sensor.calculated_current_solar_pred' Unsure if this is related but reading online, it states "Starting in version 2021.12.0, you must specify the default value. If you don’t, and float cannot convert the value, it will be reported as an error message and the template will fail." Edited March 20, 20233 yr by randomfool
March 20, 20233 yr Author Actually Found a very quick answer for you using Apex Charts Try this example. The long term statistics are available. I dont see the point in making a parrallel system Documentation : https://github.com/RomRider/apexcharts-card type: custom:apexcharts-card graph_span: 20day stacked: true yaxis: - id: first decimals: 1 min: 0 span: end: day header: show: true title: 20 Day Graph show_states: true colorize_states: true all_series_config: stroke_width: 4 opacity: 1 group_by: func: diff duration: 1day show: legend_value: false color_list: - cyan - blue - red series: - entity: sensor.sunsynk_grid_total type: column name: Grid - entity: sensor.sunsynk_pv_total type: column name: PV - entity: sensor.sunsynk_load_total type: line name: Load Edit : Added some more params so day = cal day Edited March 20, 20233 yr by Gary Waterworth
March 20, 20233 yr Author 10 minutes ago, randomfool said: Thank you. Does the Free Forecast.Solar account provide enough information or do you require an trial account with API key? sensor.calculated_current_solar_pred is not working, which causes the solar prediction card to N/A. logs shows this:- homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((float(states('sensor.power_production_now_2')) * 1 ) + (float(states('sensor.power_production_now')) * 1 ))|float }}' but no default was specified 2023-03-20 13:48:42.233 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((float(states('sensor.power_production_now_2')) * 1 ) + (float(states('sensor.power_production_now')) * 1 ))|float }}' but no default was specified') while processing template 'Template("{{ ((float(states('sensor.power_production_now_2')) * 1 ) + (float(states('sensor.power_production_now')) * 1 ))|float }}")' for attribute '_attr_native_value' in entity 'sensor.calculated_current_solar_pred' I have an east and west set of panels configured. if you only have one set of panels you will need to change that template : - sensor: - name: "Calculated Current Solar Pred" unique_id: "sensor.calculated.current.solar.pred" state: > {{ float(states('sensor.power_production_now') }} Edited March 20, 20233 yr by Gary Waterworth
March 21, 20233 yr Thank you to all who have made this integration possible. Comparing this (based on the wifi dongle) to the integration approaches based on the RS485 to USB or ESPHome devices, how quickly are the data available?
March 21, 20233 yr Updated 👌 Thanks everyone for the cards gonna try them and see what works best for me 👍 Dumb question time, but in the original iteration there was a node where you added the long lived access token (update sensor.sunsynk_access_token) to get things working. I don't see it anymore or I'm looking over it. Is it perhaps renamed or no longer relevant? Just asking as the wiki still refers to it. My stuff do work but that is because I just imported the new code and left the localhost settings un-ticked, so assuming all my stuff just got left as is when I got the warning during import. Just thinking about it from the viewpoint of someone that needs to setup from scratch, it might be a bit confusing or am I just confusing myself 🤷♂️
March 21, 20233 yr 15 minutes ago, -cK- said: Updated 👌 Thanks everyone for the cards gonna try them and see what works best for me 👍 Dumb question time, but in the original iteration there was a node where you added the long lived access token (update sensor.sunsynk_access_token) to get things working. I don't see it anymore or I'm looking over it. Is it perhaps renamed or no longer relevant? Just asking as the wiki still refers to it. My stuff do work but that is because I just imported the new code and left the localhost settings un-ticked, so assuming all my stuff just got left as is when I got the warning during import. Just thinking about it from the viewpoint of someone that needs to setup from scratch, it might be a bit confusing or am I just confusing myself 🤷♂️ Yeah its still required and available. Edited March 21, 20233 yr by randomfool
March 21, 20233 yr Also minor update to hide the log errors for a few of the sensors, you need to update the configuration.yaml sensors as follows (I did them all just for completeness) float requires updating to: float(0) HA requires a default value. Edited March 21, 20233 yr by randomfool
March 21, 20233 yr Author You can set the 1 hour ago, -cK- said: Updated 👌 Thanks everyone for the cards gonna try them and see what works best for me 👍 Dumb question time, but in the original iteration there was a node where you added the long lived access token (update sensor.sunsynk_access_token) to get things working. I don't see it anymore or I'm looking over it. Is it perhaps renamed or no longer relevant? Just asking as the wiki still refers to it. My stuff do work but that is because I just imported the new code and left the localhost settings un-ticked, so assuming all my stuff just got left as is when I got the warning during import. Just thinking about it from the viewpoint of someone that needs to setup from scratch, it might be a bit confusing or am I just confusing myself 🤷♂️ Let me check. Latest itteration doesnt need the sensor.sunsynk_access_token. It now uses context variables. I have done a ton of changes in the last few days to make it easier for when region 2 drops so that I dont have to change url's etc in a lot of places. I think I have everything needed, just need to run more tests when my login is migrated over. There is a slight "annoyance" now, when you restart HA. you need 2 runs to get all of the data. So either 2 minutes or trigger twice. But after that everything is normal. There some nice technical reasons to tolerate this. You may be thinking of the HA long lived token which you update in the web call. Let me just check the wiki and refer back to another one that still exists Edited March 21, 20233 yr by Gary Waterworth
March 21, 20233 yr Yea noticed the 2 runs when I first deployed the update and was thinking to myself oh no am I going to get stuck again mid way then saw everything firing up with with a big sigh of relief 😅 See you updated the wiki for us newbies, perfect👌 Edited March 21, 20233 yr by -cK-
March 21, 20233 yr Author 1 hour ago, randomfool said: Also minor update to hide the log errors for a few of the sensors, you need to update the configuration.yaml sensors as follows (I did them all just for completeness) float requires updating to: float(0) HA requires a default value. Dont do this. Live with the errors. This breaks long term statistics when you restart.. I have looked at a way to save values between restarts. Still looking into it. Ask me I know . Remembered after the fact why I prefered them being an error to being 0 when you restarted lol Busy fixing my energy stats now Also end up with stuff like this : If you dont set defaults then you just have a gap Edited March 21, 20233 yr by Gary Waterworth
March 21, 20233 yr 1 hour ago, Gary Waterworth said: Dont do this. Live with the errors. This breaks long term statistics when you restart.. I have looked at a way to save values between restarts. Still looking into it. Ask me I know . Remembered after the fact why I prefered them being an error to being 0 when you restarted lol Busy fixing my energy stats now Also end up with stuff like this : If you dont set defaults then you just have a gap Thanks for the explanation. I'll revert the changes and ignore the errors, although so far I haven't spotted any anomalies.
March 21, 20233 yr 2 hours ago, randomfool said: Thanks for the explanation. I'll revert the changes and ignore the errors, although so far I haven't spotted any anomalies. Is there a way to mute a warning in ha? This one occurs all the time. 2023-03-21 23:24:13.682 WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for sensor.sunsynk_temp_data exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored Edited March 21, 20233 yr by randomfool
March 22, 20233 yr Author 3 hours ago, randomfool said: Is there a way to mute a warning in ha? This one occurs all the time. 2023-03-21 23:24:13.682 WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for sensor.sunsynk_temp_data exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored Ok that is the ac Dc temperature graph data I pull in from the website. Will disable that in a few hours and see how I can handle it differently
March 22, 20233 yr Author 1 hour ago, Gary Waterworth said: Ok that is the ac Dc temperature graph data I pull in from the website. Will disable that in a few hours and see how I can handle it differently Removed the temp graph data that is retrieved from the website. Created 2 new sensors so that historical data will get updated normally Changed AC DC Temperature card. In case you have extra data ( Should be purged after 10 days anyway ) . Install the SQLLite Web addon Then run this query DELETE FROM states WHERE entity_id="sensor.sunsynk_temp_data"; Edited March 22, 20233 yr by Gary Waterworth
March 23, 20233 yr Author Have a look at this page : https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki/Optimisations-In-Home-Assistant-Config-File
March 23, 20233 yr 8 hours ago, Gary Waterworth said: Have a look at this page : https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki/Optimisations-In-Home-Assistant-Config-File Thanks Gary. Have to say I wouldn't of known where to begin but working on this setup for HA has opened a whole new world for me to explore with home automation. Its genuinely really impressive. Now I need to work out how to automatically enable grid export mode based on a timer, in the UK its profitable to take from the grid overnight when its cheap then export the battery in the morning, profiting the difference. I'd probably tie this into the weather so would only do this if it was a sunny/partly sunny day when I knew PV would subsequently recharge the battery and provide my home requirements as it would otherwise be a false economy. Edited March 23, 20233 yr by randomfool
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.