Toon app: Zon op Toon using PVoutput

Forum about forum-provided applications on Toon

Moderator: marcelr

Re: Toon app: Zon op Toon using PVoutput

Postby marcelr » Sun Aug 20, 2017 9:53 pm

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).
marcelr
Advanced Member
Advanced Member
 
Posts: 934
Joined: May 2012
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Postby TheHogNL » Mon Aug 21, 2017 7:26 am

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.
TheHogNL
Member
Member
 
Posts: 491
Joined: August 2017

Re: Toon app: Zon op Toon using PVoutput

Postby TheHogNL » Mon Aug 21, 2017 7:36 am

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)
TheHogNL
Member
Member
 
Posts: 491
Joined: August 2017

Re: Toon app: Zon op Toon using PVoutput

Postby Ierlandfan » Tue Aug 22, 2017 11:01 am

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?
Ierlandfan
Member
Member
 
Posts: 126
Joined: October 2013

Re: Toon app: Zon op Toon using PVoutput

Postby marcelr » Tue Aug 22, 2017 5:09 pm

Not really. All firmwares, starting from 3.2.18, should have it.
The entry is in config_happ_scsync.xml, not qmf_project.xml.
marcelr
Advanced Member
Advanced Member
 
Posts: 934
Joined: May 2012
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Postby Ierlandfan » Tue Aug 22, 2017 5:59 pm

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.
Ierlandfan
Member
Member
 
Posts: 126
Joined: October 2013

Re: Toon app: Zon op Toon using PVoutput

Postby marcelr » Tue Aug 22, 2017 6:14 pm

This is it:
Code: Select all
<SolarDisplay>1</SolarDisplay><SolarActivated>1</SolarActivated>
marcelr
Advanced Member
Advanced Member
 
Posts: 934
Joined: May 2012
Location: Ehv

Re: Toon app: Zon op Toon using PVoutput

Postby TheHogNL » Wed Aug 23, 2017 6:20 am

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).
TheHogNL
Member
Member
 
Posts: 491
Joined: August 2017

Re: Toon app: Zon op Toon using PVoutput

Postby TheHogNL » Wed Aug 23, 2017 4:14 pm

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.
TheHogNL
Member
Member
 
Posts: 491
Joined: August 2017

Re: Toon app: Zon op Toon using PVoutput

Postby timkoers » Mon Jul 30, 2018 4:03 pm

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?
timkoers
Starting Member
Starting Member
 
Posts: 40
Joined: June 2018

Previous

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest