Bernd Wurst
Initial commit
Bernd Wurst commited 65e5ba1 at 2012-03-08 15:58:38
#!/usr/bin/python
# -* coding: utf-8 *-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Developed 2009-2010 by Bernd Wurst <bernd@schokokeks.org>
# for own use.
# Released to the public in 2012.
import time, sys, os
from solarmax import SolarMax
from sqlite3 import dbapi2 as sqlite
DB_FILE=sys.argv[1]
inverters = { '192.168.0.201': [1,],
'192.168.0.202': [2,],
'192.168.0.203': [3,],
'192.168.0.204': [4,],
}
smlist = []
for host in inverters.keys():
sm = SolarMax(host, 12345)
sm.use_inverters(inverters[host])
smlist.append(sm)
allinverters = []
for host in inverters.keys():
allinverters.extend(inverters[host])
dbconn = sqlite.connect(DB_FILE)
db = dbconn.cursor()
while True:
pac_gesamt = 0.0
daysum_gesamt = 0.0
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX