Flukso To Pvoutput - (bypassing the flukso server) - Script Discussion

That’s what it’s for :ok_hand:

I only record hot water. Not solar.

my script i suggest gauge not counter so it takes the live value every second and averages it.
Counter should work but I did have an issue using counter for power hence my recommendation to use gauge. It seems to work for my water ok though. The other thing is by using both live values pvoutput automatically works out the energy values.

Happy for you guys to test it all out. I created this because I couldn’t put home assistant onto my pi2. I done what I could to get it working then realised alot of others had the same issue as me so i released it to help everyone. It’s had very limited testing!. It suits me. But then I started adding rules and other features for the benefit of everyone so it’s not perfect is not right but it gets the job done.

First off you haven’t allocated solar to anything
The sensor id’s can be put against any sensor number, you then edit the type “gauge” or “counter” to suit.
Then edit the “pvoutput_v” value to suit ie “v2”

Second do you have a screenshot of pvoutput?

Are you saying your solar is showing on the graph but it’s red?

So either edit the v8 to v2.
But then if solar is showing red on pvoutput maybe you need to edit v4 to v2 and v8 to v4

Im sorry chaps but Im lost :frowning:
Here is what I have. Wanted to compare to others setups if relevant?

@bazzle they don’t need to be there anymore.The script handles it all

Remove them.
Fix the script values and should be good

I noticed your solar and consumption were working yesterday…

What do I remove? All the sensor and token fields in the pvoutput settings?
With script values you mean change the ones in the rpi pic above?

It was working on and off but this morning I only got one trace.
I think Flukso popped up for a bit .
Been chasing my tail all day :wink:

@bazzle
Yep sensors and tokens in pvoutput

The script handles it all

Sensor 4299 needs to be v2
Sensor 3dba needs to be v4

Is yours at up as net?

Solar, on Primary

@bazzle
it looks like your system is generating solar at 11pm
not sure if your sensors are the wrong way around or your system is net metered.

im a bit lost on your setup.
I don’t really know what sensor is solar, what is consumption, where your clamps are located, whether its net metered or not.
if its setup correctly in the script

I don’t know if a rule can fix it or the script needs to add a net option…

i feel like
based off of the pvoutput screenshot

Sensor 4299 needs to be v2
Sensor 3dba needs to be v4

but with the setting as opposite would mean its setup as net generation i think? theres no documentation i can find about the opposite only add or subtract or both. @bankstownbloke ?
where if v2 > v4 its a positive number and if v4 > v2 its a negative number…
this makes me thing its net metered.

i guess first things first we need to get a baseline of what its showing and what sensors are doing what.

@bazzle il mio setup è come il tuo

I will swap the sensors in the script. …
8acc0ba7278d9e071f4d530fbc383dba
91eedb56c4eac751cdf185a084174299
Done…
Seems to of fixed it at the moment, will give it a bit more time then shout hoo roo :slight_smile:
https://pvoutput.org/intraday.jsp?id=1335&sid=4380
Just need Temperature some how now.
All the help is really appreciated . :slight_smile:
No idea what all the scripts and calls do/did in rpi but i’m learning to fiddle :slight_smile: @Thanks B-Man
Baz

1 Like

@bazzle for temp look at Openweather One Call discontinued June 2024

@b-man
Thanks, asked q there…

Hello, at last the rules seem to be working, thank you. however, another problem has been happening to me over the last two nights and that is that Flukso interrupts the transmission and I have to switch it off and on again to get it going again; this has never happened before. But shouldn’t the operation of Flukso be independent of this script?
thank you and have a nice day

as long as the flukso is sending mqtt data the script should work.
they are independent so the flukso shouldn’t interfere with it. are you posting the data to pvoutput from the flukso and the script?

I send the data from the script that collects it from l Flukso which lost connection during the night, this for two nights in a row without it having happened before. I do not know

As I was advised to do.
@B-Man
In pvoutput remove the sensor and token data.

@B-Man
System stopped 5:30pm on the dot.
Tried checking all the scripts I modified, Rebooted and tried again. Same issue. Wrote new sd card (bookworm 12) Been setting it up last 3 hours, just tried it… same error. Something wrong with Python?
Should I give your V3 a go?

Not sure what’s happening I have 3 systems using 3 different versions of the script and all still going.

Run the script python3 /home/pi/“script name”.py
Put the script name without the quotes.
And see what details it prints in terminal.
Maybe turn on debug in the settings part of the script and watch the log files.

You can try v3.1

Currently have 3.2 but I haven’t done any testing at all… only added net metering so shouldn’t have broken anything but :man_shrugging:

Are you using a new sd card or overwrote your current one?
Did your sd card get corrupt?

As for paho-mqtt not installing whatever you done last time to get it to work do that again.

I dont remember doing anything other than removing the weather api number I put into the xx.py and saving it. I checked and it still the same as the original but with my Flukso api’s.
When it stopped I wrote onto a new SD card and started again. Same error :frowning:
Im going to have a 4th go tonight but with your v3 maybe?
Do you have a link please? I can only find V2 New Version.
What version of Op system you using? Maybe I should look for that and try it?
My Bookworm is 64bit. I will try the 32 bit release.

If you’re pi is booting you don’t need to do another sd card. Load the old one up again.

I think your confusing the script for everything to do with pvoutput and the pi.

The pi and os (bookworm) are completely seperate.
Python, requests and paho-mqtt are just programs required for the script to work

The script is only the 4 or so files listed in github
A service file so it runs at start up
The actual script. ( the only thing you need too change once setup)
A debug log for issues
And the backlog incase it can’t send the data for some reason.

The script only sends flukso data. Nothing else. All other pvoutput stuff is controlled by pvoutput.

Try trouble shooting

Failing that just try a fresh copy of the script.
The python and paho-mqtt will still be installed

Just click the link at the top
Then branch patch-1 or 2

1 Like

@B-Man I see you have been very busy still, you must have spent a lot of time on this project.

I have done some more work on my draft Flukso Version document. The last configuration in the document uses a Flukso V3 with the current clamps on the inverter output and the grid connect line as there is system that I need to restore and the electrician installed them this way which makes the solution a little different. In short I have not tested that solution yet but will do so shortly to confirm the idea set out in the document is correct in principal.

The only new bit is the last line “v4”: “v2 – v12”, “v2 + v11 + v13”, if I have constructed the rule wrong I will soon know and will fix it in my document.

CUSTOM_RULES = {
“v6”: “v6 * 1.126”,
“v2”: “v2 * 0.89”,
“v11”: “v12 * 0.89”,
“v12”: “v12 * 0.89”,
“v13”: “v13 * 0.89”,
“v4”: “v2 – v12”, “v2 + v11 + v13”,
}

I am not sure if the document will help others or not, its good for me to get it out of my head and onto paper for future reference, however othes may find my documentation confusing, we will see. The document is not to be used to replace your Rules_HowTo_F2VOdoes but compliment it.

I am still impressed with your script and the solution works better than it did before sending the data to the Flukso site for pvoutput to download, its now MUCH better.

Will let you know when I update the document.

Thanks
Chris

1 Like