Toon app: Zon op Toon using PVoutput

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Post by marcelr »

Interesting solution. You might pass the digital signal from your raspi straight into the meter adapter, without the leds and the phototransistor (which together form an optocoupler, basically).
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by TheHogNL »

Yeah I want to try that later. Was not sure if the mini jack input could just receive the digital input and don't know the power levels and pin layout. When I have more time I will try to figure that out.
Member of the Toon Software Collective
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by TheHogNL »

Also, using my solution, it is important that the collected Watts from the different installations is almost realtime (30s at most?).

As the Toon receives the P1 realtime (I think it is each 10 seconds or so) the solar power generated Watts should be in that order of precision also. Or else the Toon would make garbage of the 'power usage' statistics, especially on a cloudy day. The Toon calculates the power usage in a formule like (SolarWatts - P1meterReturnWatts = Power usage)
Member of the Toon Software Collective
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by Ierlandfan »

I do not have the P1 meter and I do not have the entry in the projects.xml for the solar. If I remember correctly there was a different version (SW) for Solar. Can someone confirm that?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Post by marcelr »

Not really. All firmwares, starting from 3.2.18, should have it.
The entry is in config_happ_scsync.xml, not qmf_project.xml.
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by Ierlandfan »

Can you share the entry? I do not have an entry for Solar in config_happ_scsync.xml but I also don't have a digital energymeter. Maybe that's the reason.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Post by marcelr »

This is it:

Code: Select all

<SolarDisplay>1</SolarDisplay><SolarActivated>1</SolarActivated>
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by TheHogNL »

If you are not connected to a P1 meter, activating the solar (if even possible) would break stuff. Because it uses the same analog port of the meter-adapter which in your situation is (i think) used for your analog meter (led).
Member of the Toon Software Collective
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Zon op Toon using PVoutput

Post by TheHogNL »

marcelr wrote:Interesting solution. You might pass the digital signal from your raspi straight into the meter adapter, without the leds and the phototransistor (which together form an optocoupler, basically).
Just tried to figure out the wiring of the sensors. There are 3 wires. On seems to be 3v, one seems to be a ground and one again with 3v. When I connect the first 3v to the ground the toon module records that as a pulse. So probably the ground is the pull-down input of the toon module, counting a pulse when provided with the 3v. That is great News! I am not sure what the other 3v does yet, it can not be used as a source to get the pulse to be counted.

However, the toon modules does some kind of booting for the first seconds connected to the powerline. The sensors will then flash blue, stay blue etc and the toon module leds blink a few times. When the boot is over, the sensor blue led will turn of when a red flashing led is detected or will stay on if not (probably if a reflector is used on old meters).

I can not simulate this bootstart yet. So when just connecting the Rasperry Pi directy (electrically) to the Toon module, I can not give the pulses anymore. So I need to boot with the original sensor connected, let the Toon module detect that it is using a red pulsing led and then disconnect the led and connect the Toon module to the Rasp. This makes this solution not boot-proof. I still need more time to figure out how to simulate the sensor behaviour more.
Member of the Toon Software Collective
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: Toon app: Zon op Toon using PVoutput

Post by timkoers »

bwbboot wrote:This is one of the last tests that i did. A strace on for example HCBv2 happ_pwrusage reveils the following messages being sent:

Code: Select all

read(3, "<action class=\"response\" uuid=\"eneco-002-XXXXXX:hcb_config_61127789807\" destuuid=\"eneco-002-XXXXXX:happ_pwrusage\" serviceid=\"urn:hcb-hae-com:serviceId:specific1\" requestid=\"1295-1266\">\n    <u:GetRraDataResponse xmlns:u=\"urn:hcb-hae-com:service:specific1:1\"><requestId>1295-1266</requestId>\n   <rraData>{ \"1502218800\": NaN}</rraData>\n   <firstSample>1344430800</firstSample>\n   <lastSample>1502218800</lastSample>\n   <tzOffset>2</tzOffset>\n    </u:GetRraDataResponse>\n</action>\0", 16384) = 477
gettimeofday({1502218412, 425384}, NULL) = 0
read(3, "<notify uuid=\"5f195db2-8ae7-4e75-a7ba-d227f556c166\" serviceid=\"urn:hcb-hae-com:serviceId:ElectricityQuantityMeter\">\n    <CurrentElectricityQuantity>10798938</CurrentElectricityQuantity>\n</notify>\0", 16384) = 196
read(3, "<notify uuid=\"713aa639-1f74-42fd-a978-4558f50d1159\" serviceid=\"urn:hcb-hae-com:serviceId:ElectricityQuantityMeter\">\n    <CurrentElectricityQuantity>10857074</CurrentElectricityQuantity>\n</notify>\0", 16384) = 196
read(3, "<notify uuid=\"5f195db2-8ae7-4e75-a7ba-d227f556c166\" serviceid=\"urn:hcb-hae-com:serviceId:ElectricityFlowMeter\">\n    <CurrentElectricityFlow>890</CurrentElectricityFlow>\n</notify>\0", 16384) = 179
write(2, "\33[01;34m[\33[01;36mhdrv\33[0m\33[01;34m]\33[0m\33[01;35mDS: \33[0mdatasetUpdate powerUsage\n", 79) = 79
write(2, "\33[01;34m[\33[01;36mhdrv\33[0m\33[01;34m]\33[0m\33[01;35mDS: \33[0mUpdate for dataSet \33[01;35mpowerUsage\33[0m\n", 96) = 96
write(2, "\33[01;34m[\33[01;36mhdrv\33[0m\33[01;34m]\33[0m\33[01;35mDS: \33[0mSend full \33[01;35mpowerUsage\33[0m update to \33[01;35meneco-002-XXXXXX:qt-gui\33[0m\n", 133) = 133
write(3, "<action class=\"invoke\" uuid=\"eneco-002-XXXXXX:happ_pwrusage\" destuuid=\"eneco-002-XXXXXX:qt-gui\" serviceid=\"urn:hcb-hae-com:serviceId:specific1\">\n    <u:UpdateDataSet xmlns:u=\"urn:hcb-hae-com:service:specific1:1\"><powerUsage><value>890</value>\n    <dayCost>4.70</dayCost>\n    <valueProduced>0</valueProduced>\n    <dayCostProduced>0.00</dayCostProduced>\n    <valueSolar>NaN</valueSolar>\n    <maxSolar>NaN</maxSolar>\n    <dayCostSolar>NaN</dayCostSolar>\n    <avgSolarValue>NaN</avgSolarValue>\n    <avgValue>34.61</avgValue>\n    <avgDayValue>830.57</avgDayValue>\n    <avgProduValue>296.56</avgProduValue>\n    <avgDayProduValue>7117.43</avgDayProduValue>\n    <dayUsage>5605</dayUsage>\n    <dayLowUsage>3391</dayLowUsage>\n    <meterReading>10857074</meterReading>\n    <meterReadingLow>10960915</meterReadingLow>\n    <meterReadingProdu>6669844</meterReadingProdu>\n    <meterReadingLowProdu>2570472</meterReadingLowProdu>\n    <isSmart>1</isSmart>\n    <lowestDayValue>0</lowestDayValue>\n    <solarProducedToday>NaN</solarProducedToda"..., 1073) = 1073
write(2, "\33[01;34m[\33[01;36mhdrv\33[0m\33[01;34m]\33[0m\33[01;35mDS: \33[0mSend full \33[01;35mpowerUsage\33[0m update to \33[01;35ma0b6a2690-f343-11e1-a21f-0800200c9a66\33[0m\n", 147) = 147
write(3, "<action class=\"invoke\" uuid=\"eneco-002-XXXXXX:happ_pwrusage\" destuuid=\"a0b6a2690-f343-11e1-a21f-0800200c9a66\" serviceid=\"urn:hcb-hae-com:serviceId:specific1\">\n    <u:UpdateDataSet xmlns:u=\"urn:hcb-hae-com:service:specific1:1\"><powerUsage><value>890</value>\n    <dayCost>4.70</dayCost>\n    <valueProduced>0</valueProduced>\n    <dayCostProduced>0.00</dayCostProduced>\n    <valueSolar></valueSolar>\n    <maxSolar></maxSolar>\n    <dayCostSolar></dayCostSolar>\n    <avgSolarValue></avgSolarValue>\n    <avgValue>34.61</avgValue>\n    <avgDayValue>830.57</avgDayValue>\n    <avgProduValue>296.56</avgProduValue>\n    <avgDayProduValue>7117.43</avgDayProduValue>\n    <dayUsage>5605</dayUsage>\n    <dayLowUsage>3391</dayLowUsage>\n    <meterReading>10857074</meterReading>\n    <meterReadingLow>10960915</meterReadingLow>\n    <meterReadingProdu>6669844</meterReadingProdu>\n    <meterReadingLowProdu>2570472</meterReadingLowProdu>\n    <isSmart>1</isSmart>\n    <lowestDayValue>0</lowestDayValue>\n    <solarProducedToday></solarProducedToday"..., 1072) = 1072
write(3, "<action class=\"invoke\" uuid=\"eneco-002-XXXXXX:happ_pwrusage\" destuuid=\"a0b6a2690-f343-11e1-a21f-0800200c9a66\" serviceid=\"urn:hcb-hae-com:serviceId:specific1\">\n <u:UpdateDataSet xmlns:u=\"urn:hcb-hae-com:service:specific1:1\"><powerUsage><value>890</value>\n

Based on that last write line, i constructed a XML that would update a "known" dataset and destination uuid. Something in the lines of:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action class="invoke" uuid="eneco-002-XXXXXX:happ_pwrusage" destuuid="a0b6a2690-f343-11e1-a21f-0800200c9a66" serviceid="urn:hcb-hae-com:serviceId:specific1" commonname="eneco-002-XXXXXX" xmlns:u="urn:hcb-hae-com:service:specific1:1" 
    <u:UpdateDataSet>
    	<powerUsage>
        <Value>8000</Value>
        </powerUsage>
    </u:UpdateDataSet>

Have you got any idea on how to use bxt to update the datasets?
jerver
Starting Member
Starting Member
Posts: 19
Joined: Wed Feb 06, 2019 5:01 pm

Re: Toon app: Zon op Toon using PVoutput

Post by jerver »

Hi all,
I am very interested in having my PV data visible in Toon. I wondered if some progress is made or that someone can help me figuring things out.
I understand that injecting the Toon database with solar data is a kind of no go area as it is too complex.
An other solution is the standard Toon op zon measuring of pulses. To achieve this a pulse based on the measured kwhs has to be created. The challenge here is that the interval on which the pulses have to be created cannot be larger then eg 10/15 secs, which is way less then the 5 minute interval in which I get the Solar data.
Is the following approach feasible?
Each 5 minutes I get new solar data. The difference in kwh between two measurments is the amount of kwhs in the last five minutes. Based on this delta kwhs and a constant pulses per kwh the frequency of pulses can be calculated and be fed to Toon in the next 5 minutes. So Toon gets the solar data semi real time with a delay of 5 minutes. Will this delay have any impact?
PurpleBlue
Starting Member
Starting Member
Posts: 7
Joined: Wed Aug 07, 2019 7:57 pm

Re: Toon app: Zon op Toon using PVoutput

Post by PurpleBlue »

Hi,

I am using Toon for reading P1 and "Zon op Toon" for our Solarpanels.
On PVoutput I have an account from the past, and i was wondering if it also been posible to upload data to PVoutput, instead of reading it.

So Toon "upload" the data to PVoutput, So that I can compare my graphs.
memo1996
Starting Member
Starting Member
Posts: 21
Joined: Mon Feb 24, 2020 12:34 am

Re: Toon app: Zon op Toon using PVoutput

Post by memo1996 »

Zon op Toon werkt ook zo prima!!!!
Zojuist geinstalleerd

- Meteradapter met 2 vlammen
- Analoge sensor
- KWH meter

Zie foto's!
Attachments
F545462B-C30E-41A0-B18C-1B9F5B53334E.jpeg
F545462B-C30E-41A0-B18C-1B9F5B53334E.jpeg (54.34 KiB) Viewed 4932 times
53E7BEBC-E76F-4AE7-B318-3A0021507F68.jpeg
53E7BEBC-E76F-4AE7-B318-3A0021507F68.jpeg (54.95 KiB) Viewed 4932 times
675DDD63-BA2A-44D3-9CF5-D31E73C3D1D7.jpeg
675DDD63-BA2A-44D3-9CF5-D31E73C3D1D7.jpeg (60.59 KiB) Viewed 4932 times
61E0531C-002D-4828-BB65-A52A9430760D.jpeg
61E0531C-002D-4828-BB65-A52A9430760D.jpeg (64.81 KiB) Viewed 4932 times
Post Reply

Return to “Toon Apps”