-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Ruys
committed
Jan 11, 2017
1 parent
af754a9
commit 6950a8b
Showing
5 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import logging | ||
|
||
__author__ = "Mark Ruys" | ||
__copyright__ = "Copyright 2017, Mark Ruys" | ||
__license__ = "MIT" | ||
__email__ = "[email protected]" | ||
|
||
class MovingAverage: | ||
|
||
def __init__(self, n): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,11 @@ | |
import datetime | ||
import requests | ||
|
||
__author__ = "Mark Ruys" | ||
__copyright__ = "Copyright 2017, Mark Ruys" | ||
__license__ = "MIT" | ||
__email__ = "[email protected]" | ||
|
||
class GoodWeApi: | ||
|
||
def __init__(self, system_id): | ||
|
@@ -86,7 +91,7 @@ def call(self, url, payload): | |
return json | ||
except requests.exceptions.RequestException as exp: | ||
logging.warning(exp) | ||
time.sleep(30) | ||
time.sleep(3) | ||
else: | ||
logging.error("Failed to call GoodWe API") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ | |
import datetime | ||
import csv | ||
|
||
__author__ = "Mark Ruys" | ||
__copyright__ = "Copyright 2017, Mark Ruys" | ||
__license__ = "MIT" | ||
__email__ = "[email protected]" | ||
|
||
class GoodWeCSV: | ||
|
||
def __init__(self, filename): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ | |
import time | ||
import requests | ||
|
||
__author__ = "Mark Ruys" | ||
__copyright__ = "Copyright 2017, Mark Ruys" | ||
__license__ = "MIT" | ||
__email__ = "[email protected]" | ||
|
||
class PVOutputApi: | ||
|
||
def __init__(self, system_id, api_key): | ||
|
@@ -67,7 +72,7 @@ def call(self, url, payload): | |
break | ||
except requests.exceptions.RequestException as arg: | ||
logging.warning(arg) | ||
time.sleep(30) | ||
time.sleep(3) | ||
else: | ||
logging.error("Failed to call PVOutput API") | ||
|