Closed DanielB0nd closed 9 months ago
Sorry, not answering, just asking you a question.
How did you get the New Solar Generated today to work in the first place?
When Growatt worked, it had a total power generating and total power generated for the day, across both inverters. This was automatically there
Not sure what you mean, it "worked" straight away albeit wrong, the reason the sensors is called new solar is because I have two solar setups one was installed a while ago and that has a solar edge inverter, not Growatt. My solution to this currently is I have made a custom sensor that simply adds, PV1 Generated and PV2 Generated
I mean it worked as in I was given a total power generating right now and a total power generated today added together from both inverters on HA.
They are both the same inverters.
You have answered my question with the custom sensor but sadly that is a bit over my head at the moment. I am very new to HA and it is a huge learning curve.
Heres a write up on how to achieve the custom sensors,
template: !include_dir_merge_list templates/
templates
If you have any other questions about this lmk and I can try to walk you through it! @chesterflaps
Thank you, I will take a look later.
Shame it is pointless right now because my Grott has gone to sh*t in the last 5 minutes.
there was a HA update so I updated and now when I start the Grott add on, it stops after a couple of seconds.
I did this and tried to restart HA but got the below message
The system cannot restart because the configuration is not valid: Invalid config for [shell_command]: value should be a string for dictionary value @ data['shell_command']['template']. Got [{'sensor': [{'name': 'power_solar_today', 'unique_id': 'power_solar_today', 'state': "{{ states('sensor.be04070045_pv_output_actual') |int(0) + states('sensor.be04070099_pv_output_actual') |int(0) }}", 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing'}]}]. (See /config/configuration.yaml, line 23).
here is my code
- sensor:
- name: power_solar_today
#friendly_name: "Solar Generation - Today"
unique_id: "power_solar_today"
state: "{{ states()'sensor.be04070045_generated_energy_today') |int(0) + states()'sensor.be04070099_generated_energy_today') |int(0) }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
The issue is that the sensors names and unique ids are the same, forgot to mention that my bad, this should work https://pastebin.com/ERCQWzWS
In future so you know, you dont specifically need unique ids, it just means that you can edit the sensor settings within the UI, not the yaml file (you dont need to make them match the sensors name, I do this so that there will never be the issue of one unique id matching another, it just makes it easier in my mind) and the sensor name is what you would call in home assistant dashboards e.g. power_solar_actualtoday, and this can be anything I just prefix anything to do with power with power so that I know at a glance what its related to. (sorry for wall of text)
Hang on, ignore that pastebin link I missed something that will cause it to error. Use this one https://pastebin.com/4wnuTquX
Worked that part out. I accidentally indented the code in the config file so HA thought it was part of the code above.
There was also a ) out of place which I noticed which is why I sent the two pastebins. And do you mean you changed the sensor names and unique ids already?
If you see on the state_class line of the first sensor there is a : on the end, if you remove that it should work (thanks for the screenshot)
There was also a ) out of place which I noticed which is why I sent the two pastebins. And do you mean you changed the sensor names and unique ids already?
No I meant I managed to get it to restart
any luck? that should have fixed it
any luck? that should have fixed it
It stopped the error but I had to also remove the second word 'sensor' for it to stop giving an error
Like attached. The thing is, where do I find this sensor within HA to see if it is working? It seems that one of my inverters is not givng me any information since I did this but that could be down to slow feed from Growatt.
If you go to Settings - Devices & Services - Entities (at the top) - and in the search type power_solar and there should be the two sensors, you do need to restart HA before they show up
Was it correct to me the second instance of the word 'sensor'?
If you go to Settings - Devices & Services - Entities (at the top) - and in the search type power_solar and there should be the two sensors, you do need to restart HA before they show up
I thought it would be there but it hasn't shown up as yet. Trying another restart
Was it correct to me the second instance of the word 'sensor'? Yes, thats fine, thats how it should be as far as i know (at least thats how mine is)
Sadly not
its power_solar no? or did you change the sensor names
No, I just typed the wrong thing
In developer tools there is a states, try searching in that maybe?
In developer tools there is a states, try searching in that maybe?
Sadly not
and you have added that line to the configuration.yaml?
I wonder, could it be because there should be 2 sensors?
Like this
and you have added that line to the configuration.yaml?
yes
no it should be fine
this is what mine looks like
Let me put a line in between and check
It is there now but see below
also, just getting unknowns across the board but I'm hoping that's due to the feed from growatt.
So I am getting the info now for each inverter but still getting the above error
and the sensors in the yaml are correct?
what data are you getting from grott? and are you running grott edge with the built in intergration?
and the sensors in the yaml are correct?
Just checking but there is only one showing anyway
did you add the extra -sensor: if so try removing that
I notice your code is different.
you have 4 different entities. 2 different ones on the top part of the code and 2 totally different ones on the bottom part. Is you old one called old in one entity and pv1 in another?
I removed the second 'sensor'
Just realised, I
what data are you getting from grott? and are you running grott edge with the built in intergration?
I meant from Growatt. Info as in the data of the inverters.
I have the grott edge with the MQTT thingy
It should work then providing the sensors match up, only reason it wouldn't is that grott has no data on the sensors that you are using...
I am now back, what does your grott config/console look like and are those sensors that are being read actually have data?
Sorry, had to go out.
I have put some images below to show. I ended up just doing one sensor to see if it would work and it did but I cannot work out the figures as it says 0kwh in the top right but when I press on the line graph, it says things like '117'
Actually, I guess the number is the power in watts at that time.
I now need to create another one to show the total generated across both inverters in the day. Seems the way I had it, the second one wouldn't work, almost like HA couldn't see it because it was thinking it was part of the first sensor and that's why neither worked.
This is very frustrating but I really appreciate your help through this.
created another sensor file called power2.yaml and all is fine.
Now I am trying to work out how I sue this sensor I have created in an automation. Any ideas?
I use it on a power flow plus card (hacs)
I use it on a power flow plus card (hacs)
bajaysus
Next project ahoy!
Can I ask how you get your data for exporting to the grid? I am using Bright/Hildebrand at the moment but it only updates once a day with my smart meter usage and even though my smart meter tells me when I am exporting, I have no way of getting that information into HA.
I get mine through a MyEnergy Zappi (EV charger), it reads solar and grid to only charge on green energy, it provides me with, grid (I can also get this through growatt because of the battery), all data relating to old solar. You could use something like a Shelly EM, but I dont know how easy that would be, another solution would be to use a Hildebrand IHD but that is about £20 more, that was something I looked at as the zappi is cloud pull and there is no local intergration so often the house consumption which I calculate using solar, grid import/export, battery charge/discharge goes to below 0 but 0 is the min on the sensor
And this isnt related to this post but you mention you are new to HA, one of the best things to do is backups, there are google backups and onedrive backups (with encryption to keep your data private)
I had a look at the MQTT data to try to confirm this and these are my findings,
This is the energy generated by pv1
This is what the supposibly combined generation is for pv1 and pv2![image](https://github.com/egguy/grott-home-assistant-add-on/assets/53864241/10d04ce5-799b-4a3d-ab4c-d91d083fc849)
And this is what pv2 generated![image](https://github.com/egguy/grott-home-assistant-add-on/assets/53864241/95487980-4477-4c5d-a98d-97a080e5153c)
As seen in the data taken from MQTT epv1today is 53 which is converted to 5.3kWh by the sensors added also stored in mqtt. However there is also pvenergytoday which matches pv1 at 53. epv2today is 28 (2.8kWh) so pvenergytoday should in theory be 81 (8.1kWh)
I dont know if this is an issue with GROTT as a whole or just the HA addon, so if I am misunderstanding something, or this is better suited to be posted on the GROTT page let me know and I will make an appropriate post on that page.
I am using the following version: Home Assistant 2023.7.3 Supervisor 2023.07.1 Operating System 10.3 Grott edge edge-5353307094 Growatt Shine LAN-X Home assistant is also running as a VM (incase this matters)