Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow always uploading data to PVOutput #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions config-org.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,19 @@ port = 8899
# time to wait for inverter logger response
timeout = 3


### repeat this for every inverter ID that must be logged to pvoutput
### The apikey(s) and sysid(s) can be found at http://pvoutput.org/account.jsp
[pvout]
#use apikey-<inverter serial> in the apikey name
# use apikey-<inverter serial> in the apikey name
apikey-NLBN1234567A1234 = NOTAREALAPIKEY86e2258d4e29169fb79cf18b00
#use sysid-<inverter serial> in the sysid name
# use sysid-<inverter serial> in the sysid name
sysid-NLBN1234567A1234 = 12345
# By default the data is only uploaded every 5th minute of the hour. If you are polling less
# frequently then once per minute, or when your inverter pushes data at a lower frequency, you may
# need to push the data always, or data will never be uploaded. Otherwise you should not enable
# this feature, to prevent sending too many requests to pvoutput.
# always-upload-NLBN1234567A1234 = true

### use domoticz-<INVERTER SERIAL> as section name
### repeat this section for every inverter ID that must be logged to domoticz
Expand Down
5 changes: 4 additions & 1 deletion outputs/PVoutputOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def process_message(self, msg):
timezoner = timezone('Europe/Amsterdam')
now = datetime.now(timezoner)

if (now.minute % 5) == 0: # Only run at every 5 minute interval
always_upload_option = 'always-upload-'+msg.id
always_upload = self.config.getboolean('pvout', always_upload_option, fallback=False)

if always_upload or (now.minute % 5) == 0:

sys_id = 'sysid-'+msg.id
if not self.config.has_option('pvout', sys_id):
Expand Down