Page 1 of 1

Omnik inverter to Zon op Toon

Posted: Thu Apr 18, 2019 10:38 pm
by ikookmaar

(next level: find a way to get the data from my Omnik inverter into Zon op Toon)
Did you manage to get the omnik data into Toon?[/quote]

Didn't look into this for a long time...
In short: no.

Buying, installing and monitoring a seperate metering device - while all the data is already monitored and available in the Omnik inverter itself, the Omnik portal, my rpi, PVoutput and Domoticz - seems rather silly.
I'm still hoping for someone to find a way to "inject" the available data into Zon op Toon...

(sorry, I'm aware that this is offtopic here..)

Re: Omnik inverter to Zon op Toon

Posted: Fri Apr 19, 2019 8:19 am
by TheHogNL
I moved the topic to a new one because I want to reply on it :-)

It is possible to get the data in the toon by just simulation the (led) pulses to your toon meteradapter. See my python code below which I run on a PI connected to a red led on GPIO18. And the toon analog sensor is pointing to the led. You could also connect it directly to the meteradapter (without a led and the sensor) using a transistor between the gpio output and the meteradapter. I haven't done this yet as my red led method just works fine.

The script collects current produced Watts from a source (in you case could be domoticz or your omnik inverter portal). The collected Watts must be almost realtime as the Toon compares and calculates it with data from the P1 port from the smart meter. If the data is 30 seconds off or more your will get incorrect values displayed at the toon.

Code: Select all

import RPi.GPIO as GPIO
import requests
import time
import urllib


GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)

# how long is a pulse, this is ok for toon meteradapter
ledPulseWidth = 0.01
# how often per seconds do we get new Watts - faster is better resolution on the Toon compared to the P1 output from the slimme meter
collectWattsInterval = 5
# initial watts (can not be 0)
watts = 0.01
#how many pulses per watthour (2 = 2000 imp/kwh)
pwh = 2
#initiate the timer
last = time.time()

def getWatts():
        value = requests.get('some url which provides the current Watt produces by your inverter')
        try:
                newwatts = float(value)
        except ValueError:
                newwatts = watts
        print "New watts: ",newwatts
        return newwatts

watts = getWatts()
lastWattsPull=time.time()
nextPulseTime = 3600/watts/pwh

while True:
        if (time.time() > (last+nextPulseTime)):
                last = time.time()
                nextPulseTime = float(3600/watts/pwh)
                print "Calculated next pulse after (seconds): ",nextPulseTime
                if (watts > 10):
                        GPIO.output(18,GPIO.HIGH)
                        print "Giving pulse"
                        time.sleep(ledPulseWidth)
                        GPIO.output(18,GPIO.LOW)
        if (time.time() > (lastWattsPull+collectWattsInterval)):
                watts = getWatts()
                lastWattsPull=time.time()
        # need to sleep a short amount of time  before looping back or else the cpu on the Pi will not go idle
        time.sleep(0.01)

GPIO.cleanup()

Re: Omnik inverter to Zon op Toon

Posted: Mon Apr 29, 2019 11:55 pm
by ikookmaar
Thanks, I will try this as soon as I find time to do so!

Re: Omnik inverter to Zon op Toon

Posted: Thu Jun 24, 2021 11:18 pm
by oepi-loepi
Try the solarPanel app from the toonstore..

Re: Omnik inverter to Zon op Toon

Posted: Wed Aug 04, 2021 1:02 am
by ikookmaar
Thanks, I did and it works!

Re: Omnik inverter to Zon op Toon

Posted: Fri Aug 06, 2021 10:12 pm
by oepi-loepi
ikookmaar wrote:Thanks, I did and it works!
Nice. You can also select a lot more other inverters from the list. It is even possible to selct 2 inverters.