Page 2 of 12
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Wednesday 23 March 2016 20:58
by Erwinvos72
I am new on domoticz and with much help i was able to get my evohome system in domoticz. But i have a solarman account with panels on my roof. And i see that is possible to get the information into domoticz. I have gone through the information but it is a bit confusing.
As far as i understand
- create virtual hardware with dummy
- create virtual sensor in devices (question: what type do i have to choose?)
- which script is complete and can i use? This part is very confusing to understand because there are many people with solutions and add-ons
Thanks already for your answer and help
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Wednesday 23 March 2016 21:29
by Derik
This is working fine...
For my Sofarsolar inverter....
Code: Select all
#!/usr/bin/python
import urllib, urllib2, hashlib
from xml.etree import ElementTree as ET
#config
username = ' YOUR MAIL' #your portal username
password = ' YOUR PASS ' #your portal password
baseURL = 'http://www.solarmanpv.com:10000/' #base url
stationid = ' YOUR STATION ID ' #station id, get this via the station python script
# example: Working base urls: [ CHANG THE URL FOR YOU INVERTER
# http://www.ginlongmonitoring.com:10000/
# http://www.omnikportal.com:10000/
# http://log.trannergy.com:10000/
# http://www.solarmanpv.com:10000/
#domoticz settings
domoticz_host = '192.168.5.70'
domoticz_port = '8080'
domoticz_url = 'json.htm'
domoticz_ActualPower = '3905' #optional [ YOUR DUMMY IDX ]
m = hashlib.md5()
m.update(password)
#building url
requestURL = baseURL+'/serverapi/?method=Login&username='+username+'&password='+m.hexdigest()+'&key=apitest&client=iPhone'
#login call
root = ET.parse(urllib.urlopen(requestURL)).getroot()
token = root.find('token').text
print 'Logged In: '+username
#info url
infoURL = baseURL+'/serverapi/?method=Data&username='+username+'&stationid='+stationid+'&token='+token+'&key=apitest'
print 'Getting Info... '
#login call
infoRoot = ET.parse(urllib.urlopen(infoURL)).getroot()
income = infoRoot.find('income')
TodayIncome = income.find('TodayIncome').text
ActualPower = income.find('ActualPower').text
etoday = income.find('etoday').text
etotal = income.find('etotal').text
multiply='1000.0'
etotal1000 = float(etotal) * float(multiply)
TotalIncome = income.find('TotalIncome').text
etotalstr=str(etotal1000)
#logging values
print 'TodayIncome: '+TodayIncome
print 'ActualPower: '+ActualPower
print 'etoday: '+etoday
print 'etotal: '+etotal
print 'etotal 1000: '+etotalstr
#uploading values to domoticz
url = ("http://" + domoticz_host + ":" + domoticz_port + "/" + domoticz_url+ "?type=command¶m=udevice&idx=" + domoticz_ActualPower+ "&nvalue=0&svalue=" + ActualPower+ ";" + etotalstr)
And the place:
- ScreenShot124.jpg (48.87 KiB) Viewed 6607 times
And make it executable or something look @ the RWX
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Wednesday 23 March 2016 21:57
by Erwinvos72
So if i understand create the virtual hardware and use the idx for the sofarsolar.py script?
And is it realtime or do you have to create a task schedular or something like that
And get the station id is running the script stationid.py i saw, so i will try it
Thnx
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Thursday 24 March 2016 0:06
by Derik
Yes use the idx and set your domoticz settings and the inverter setting of your brand.
realtime
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Thursday 24 March 2016 11:53
by Erwinvos72
I have created the stationid.py and tested it. the inverter setting was shown
Then i created the, in my case, solarman.py and put it a debian-chroot directory (i use debian chroot, and within that i have root and subdirs).
Then i started ./solarman.py from within debian-chroot and i received the output which i copied below. Any suggestions?
root@Synology:~/Zonnepanelen# ./solarman.py
Traceback (most recent call last):
File "./solarman.py", line 34, in <module>
root = ET.parse(urllib.urlopen(requestURL)).getroot()
File "/usr/lib/python2.7/urllib.py", line 87, in urlopen
return opener.open(url)
File "/usr/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 351, in open_http
errcode, errmsg, headers = h.getreply()
File "/usr/lib/python2.7/httplib.py", line 1145, in getreply
response = self._conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 415, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
IOError: [Errno socket error] [Errno 104] Connection reset by peer
root@Synology:~/Zonnepanelen#
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Monday 04 April 2016 19:58
by BasvdLinde
Hy all,
I'm a bit of a beginner with raspberry and Domoticz, but would like to add my solar panels to my setup. I've started with filling out the script, but how and where can I get the station id which I need to fill out?
Thanks in advance
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Wednesday 06 April 2016 14:24
by gdg16
BasvdLinde wrote:Hy all,
I'm a bit of a beginner with raspberry and Domoticz, but would like to add my solar panels to my setup. I've started with filling out the script, but how and where can I get the station id which I need to fill out?
Thanks in advance
You need to edit and run the stationid.py file.
You can run the script as follows: sudo python stationid.py
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Thursday 07 April 2016 13:00
by BasvdLinde
Hy all,
got it running now, perfect!
Thanks a lot!
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Thursday 07 April 2016 14:41
by gdg16
Which virtual sensor do i need to choose? I have chosen for the "Elektra (aktueel + teller)" but now i don't see decimal numbers.
- Naamloos.png (16.18 KiB) Viewed 6482 times
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Thursday 16 June 2016 7:25
by Baskoomen
Mediacj wrote:
.....
EDIT:
Found it already it was the authorization on the Domoticz database, now it works
Can you tell me how you fixed this? I have the same issue but no idea how I can adjust the rights to the database....
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Sunday 10 July 2016 8:19
by Mediacj
It's long ago but I think it is the authorization in the http string, so you have to add the username password:
http://<username:password@>domoticz-ip<:port>/json.htm?api-call
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Friday 30 September 2016 10:46
by Erwinvos72
Is there already a possibility to read the values from a Solax-X inverter in Domoticz? I have tried it with the base settings in the stationid.py but i receive errors when i run the script about http.
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Sunday 15 January 2017 11:19
by robinschip
Hi,
is there a way to get data without the username and password?
i have a few sites i would like monitor, and they are all publicsites:
http://www.omnikportal.com/Terminal/Ter ... &pid=17390
or is there an explanation for the api they used?
With regards,
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Friday 03 February 2017 10:50
by Bou19
Hi,
I am new to this and i'm trying to find the stationid.py file. I can't find it in Domoticz. Or, do i have to create it? If so, what do I put in the file then?
With regards,
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Sunday 19 March 2017 23:07
by underscore4
Hi,
i have tried to configure this python script and seems to work by terminal. Anyway i dont see any data on domoticz. Would you please help me about?
Here what i see by the script:
python /home/amministratore/domoticz/scripts/ginlong.py
Logged In: my username
Getting Info...
TodayIncome: 2.52
ActualPower: 550
etoday: 14
etotal: 590
etotal 1000: 590000.
Here what i see in the ginlong.py
#!/usr/bin/python
import urllib, urllib2, hashlib
from xml.etree import ElementTree as ET
#config
username = 'myuser' #your portal username
password = 'mypassword' #your portal password
baseURL = '
http://www.ginlongmonitoring.com:10000/' #base url
stationid = 'xxxx' #station id, get this via the station python script
# example: Working base urls:
#
http://www.ginlongmonitoring.com:10000/
#
http://www.omnikportal.com:10000/
#
http://log.trannergy.com:10000/
#
http://www.solarmanpv.com:10000/
#domoticz settings
domoticz_host = '192.168.2.177'
domoticz_port = '8088'
domoticz_url = 'json.htm'
domoticz_ActualPower = '82001' #optional
m = hashlib.md5()
m.update(password)
#building url
requestURL = baseURL+'/serverapi/?method=Login&username='+username+'&password='+m.hexdigest()+'&key=apitest&client=iPhone'
#login call
root = ET.parse(urllib.urlopen(requestURL)).getroot()
token = root.find('token').text
print 'Logged In: '+username
#info url
infoURL = baseURL+'/serverapi/?method=Data&username='+username+'&stationid='+stationid+'&token='+token+'&key=apitest'
print 'Getting Info... '
#login call
infoRoot = ET.parse(urllib.urlopen(infoURL)).getroot()
income = infoRoot.find('income')
TodayIncome = income.find('TodayIncome').text
ActualPower = income.find('ActualPower').text
etoday = income.find('etoday').text
etotal = income.find('etotal').text
multiply='1000.0'
etotal1000 = float(etotal) * float(multiply)
TotalIncome = income.find('TotalIncome').text
etotalstr=str(etotal1000)
#logging values
print 'TodayIncome: '+TodayIncome
print 'ActualPower: '+ActualPower
print 'etoday: '+etoday
print 'etotal: '+etotal
print 'etotal 1000: '+etotalstr
#uploading values to domoticz
url = ("http://" + domoticz_host + ":" + domoticz_port + "/" + domoticz_url+ "?type=command¶m=udevice&idx=" + domoticz_ActualPower+ "&nvalue=0&svalue=" + ActualPower+ ";" + etotalstr)
Anyone would you please try to help me? Thanks in advance
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Wednesday 07 June 2017 22:02
by nwessels
Hi,
@underscore4 or someone else: did you solved your problem? I have the same problem. like to hear your solution.
Grtz Niels
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Sunday 11 June 2017 12:34
by JacquesMulders
nwessels wrote:Hi,
@underscore4 or someone else: did you solved your problem? I have the same problem. like to hear your solution.
Grtz Niels
underscore4 wrote:Hi,
i have tried to configure this python script and seems to work by terminal. Anyway i dont see any data on domoticz. Would you please help me about?
if youv'e had read the topic you would have known the script rounds up the value's, because omnik doesnt provide the value's in kWh... if you dont want roundup numbers youve have to write a script yourself, or get som hardware witch can measure in watts
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Friday 16 June 2017 9:37
by galadril
Hmm lijkt erop dat de api url niet meer werkt voor Omnik Solar..
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Friday 16 June 2017 10:09
by Derik
mm did they set anything different?
is the Solarman then also not working?
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Posted: Saturday 17 June 2017 0:28
by devros
hello, any chance to support this portal
im using invertor with limiter and USB-PLUG (witch is registred to this page)
http://www.shinemonitor.com/main.html
looks similar to omnik
tried restfull page
http://www.shinemonitor.com:10000/
but number is propablly diferent.... any idea how to find right number?
thanks