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

Just of the top of my head I don’t think the rules are in the correct format for v3

V3 needs the square brackets

CUSTOM_RULES = {
    # "v1": ["v2 / 12"],  # Converts a live value ie. Watts to an energy value ie Wh...... but this is not needed as pvoutput already does this.
    # "v3": ["v4 / 12"],  # See above rule
    # "v2": ["v2 * 0.75"], # adjust the sensor readings by a multiplication of xxx to get teh correct reading.
    # "v4": ["v4 * 0.75", "0 if v4 < 300 else v4"],  # Applying 2 rules sequentially the first rule is done first then seperated by a comma, the second rule is applied.
    # "v8": ["v7 + 100"],  # Assuming v7 = 0 then v8 = 100
    # "v9": ["v8 + 100"],  # v8 = 100 from above rule so v9 = 200
    # "v10": ["v9 + 100"],
    # "v11": ["v10 + 100"],
    # "v12": ["v11 + 100"],
    # Add more rules as needed, (values update after each rule so you can use an updated value from one rule for the next rule) (the rules run from top to bottom).

@B-Man Oh dear, I have been mixing up v2 and v3 format all througth that document. Have corrected it and uploaded it again.

1 Like

This thread is getting very long. Should I start one for my issues?
Anywaystill the same error after a couple of clean rebuilds No module named β€œpaho”
I am really stuck after fiddling around all last night and today :frowning: I rekon my brain tumor is growing back :slight_smile: Anyone got it working on a rpi 400 (4)
I wish I knew why it worked initially for a day?

This might be the answer;?? Waiting to see what happens.

         sudo pip3 install paho-mqtt
In lieu of:     pip install paho-mqtt

![PAHO module not found 3a Fix |347x500](upload://w416L9V7FUN80YHWNT8i0r0PIuW.jpeg) 

1 Like

Nice work.

Can you document what steps you required that were different to the readme to get everything working so I can post them in the script page for other users of a pi4 with bookworm. or if you need to get it going again some other time…

im not sure if your playing around with it or the readings are playing up?

Like a roller Coaster at the moment. I had to swap the sensor codes around again in the script.
https://pvoutput.org/intraday.jsp?id=1335&sid=4380
Not me, every 10mins . Only been running for about 25mins so far.
Might be something to do with the 5minute call?

I will try to see what I did. A lot of forum reading and script lines in there BUT I believe its the step in post above …sudo pip3 install paho-mqtt
The sudo and pip3 changes.

what version did you end up using?
do you have any rules set by any chance?

zip off this page…whats a β€œRule” ha ha

thats the same version you ran before and it seemed to work fine.
not sure whats happening.

Edit:
Seems to be working fine now

1 Like

Clue I think was in this thread, last post.
https://forums.raspberrypi.com/viewtopic.php?t=176131
Plus the Answer on this page

just noticed my script somehow stopped uploading at at 1am this morning.
just done a stop and start and its working again… it has been up for about 7 days without issue.

  1. sudo systemctl stop flukso2pvoutput_mqtt.service
  2. sudo systemctl start flukso2pvoutput_mqtt.service

I should have tried
sudo systemctl status flukso2pvoutput_mqtt.service and seen what the script was saying…

debug log didnt show anything other than. just stopping after writing the adjusted values but never got to send to pvouput.

2024-06-17 01:00:00 - Initial payload: {β€˜d’: β€˜20240617’, β€˜t’: β€˜01:00’, β€˜v1’: 0, β€˜v2’: 0, β€˜v3’: 0, β€˜v4’: 193, β€˜v5’: 0, β€˜v6’: 0, β€˜v7’: 0, β€˜v8’: 0, β€˜v9’: 0, β€˜v10’: 0, β€˜v11’: 0, β€˜v12’: 0}
2024-06-17 01:00:00 - Adjusted payload: {β€˜d’: β€˜20240617’, β€˜t’: β€˜01:00’, β€˜v1’: 0, β€˜v2’: 0, β€˜v3’: 0, β€˜v4’: 193, β€˜v5’: 0, β€˜v6’: 0, β€˜v7’: 0, β€˜v8’: 0, β€˜v9’: 0, β€˜v10’: 0, β€˜v11’: 0, β€˜v12’: 0}
2024-06-17 01:00:02 - Sent data to PVOutput: 200 OK 200: Added Status
2024-06-17 01:00:02 - Payload: {β€˜d’: β€˜20240617’, β€˜t’: β€˜01:00’, β€˜v4’: 193, β€˜v7’: 0, β€˜v8’: 0}

2024-06-17 01:05:00 - Initial payload: {β€˜d’: β€˜20240617’, β€˜t’: β€˜01:05’, β€˜v1’: 0, β€˜v2’: 0, β€˜v3’: 0, β€˜v4’: 267, β€˜v5’: 0, β€˜v6’: 0, β€˜v7’: 0, β€˜v8’: 0, β€˜v9’: 0, β€˜v10’: 0, β€˜v11’: 0, β€˜v12’: 0}
2024-06-17 01:05:00 - Adjusted payload: {β€˜d’: β€˜20240617’, β€˜t’: β€˜01:05’, β€˜v1’: 0, β€˜v2’: 0, β€˜v3’: 0, β€˜v4’: 267, β€˜v5’: 0, β€˜v6’: 0, β€˜v7’: 0, β€˜v8’: 0, β€˜v9’: 0, β€˜v10’: 0, β€˜v11’: 0, β€˜v12’: 0}

Bugger… :frowning:
Welcome to the Party :slight_smile:
Im sure you will find the issue quicker than me .:slight_smile:

v1 has been running stable sending my hot water since before this script was available on github.
v3 is the one that crashed after 7 days. that is doing counters for water and just sending power values for the fun of it.
I have updated it to 3.2 and its working fine atm. I don’t need rules or net metering on it so no real gain.
will see how long this one goes for…

anyone that’s competent in python see any reason it would crash? only possible thought is it having to β€˜remember’ too much data ? but its meant to clear the readings ever loop too so …

1 Like

Mine seems to be steady now with this script settings. :slight_smile:
Solar input and Consumption plus temp now working from pvoutput settings.

But why sensor 2 and sensor 4 and not sensor 1 and 2?

@ciarly
I did wonder that myself.
At a guess maybe that’s where they are in the flukso?

It doesn’t matter where they go so not a big issue

@ciarly I am using the Pulse inputs NOT currents clamps on the Flukso if that was your question.
But I dont think it was. :slight_smile:
I believe I was instructed to use 2 and 4 earlier in this conversation?
BUT it seems to work. :wink:

1 Like

@bazzle
That was to use v2 and v4 as the pvoutput β€œv” values
Sensors can go anywhere.

I assume everyone would just use 1 to 5 in that order.

It’s working so don’t mess with it :ok_hand:

2 Likes

I also recommend setting up an idle system alert so if the script stops for some reason you can stop/start the service again…

edit your system and enable this