Do you think you get this working again??galadril wrote:Hmm lijkt erop dat de api url niet meer werkt voor Omnik Solar..
Ginlong, Omnik Solar, Solarman and Trannergy Inverters Topic is solved
Moderator: leecollings
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
-
- Posts: 20
- Joined: Sunday 19 March 2017 22:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
I let it working with setup:nwessels wrote:Hi,
@underscore4 or someone else: did you solved your problem? I have the same problem. like to hear your solution.
Grtz Niels
#!/usr/bin/python
import urllib, urllib2, hashlib
from xml.etree import ElementTree as ET
#config
username = 'username'' #your portal username
password = 'mypassword' #your portal password
baseURL = 'http://www.ginlongmonitoring.com' #base url
stationid = '1' #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 = '127.0.0.1'
domoticz_port = '8080'
domoticz_url = 'json.htm'
domoticz_ActualPower = 'Id on domoticz' #idx of new device
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)
urllib.urlopen(url)
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
mmm Will give this a try ...
Do i need crontab?
Just change the ip port
Replace the url:port? or where do you use the port? [ not in the example..
Station id part i do not understand..
Hope for your support
Do i need crontab?
Just change the ip port
Replace the url:port? or where do you use the port? [ not in the example..
Station id part i do not understand..
Hope for your support
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
-
- Posts: 20
- Joined: Sunday 19 March 2017 22:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
here my answare:
Yes, please set crontab, i have every 5 minutes
It work with no port, probably it open directly and automatic.
station id, it's just in device, after description of harware of domoticz or you could use script (code shoud be on first page).
Let me know.
Yes, please set crontab, i have every 5 minutes
It work with no port, probably it open directly and automatic.
station id, it's just in device, after description of harware of domoticz or you could use script (code shoud be on first page).
Let me know.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Sweet Let me try it as well.
Well if we are this far with the python script it should be possible to get it working as an official hardware plugin in domoticz right?
Code: Select all
Getting Info...
TodayIncome: 6.918
ActualPower: 872.00
etoday: 30.08
etotal: 14534.0
etotal 1000: 14534000.0
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Code: Select all
linaro@odroidxu4:~/domoticz/scripts/python$ ./SofarSolar.py
Traceback (most recent call last):
File "./SofarSolar.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 210, in open
return self.open_unknown(fullurl, data)
File "/usr/lib/python2.7/urllib.py", line 222, in open_unknown
raise IOError, ('url error', 'unknown url type', type)
IOError: [Errno url error] unknown url type: 'www.solarmanpv.com'
linaro@odroidxu4:~/domoticz/scripts/python$
Still got errors....
Where do i go wrong.?
Did try this in the cli with manual activate.
Copy paste all script.
And change my locals..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Please post your full file please.Derik wrote:Code: Select all
linaro@odroidxu4:~/domoticz/scripts/python$ ./SofarSolar.py Traceback (most recent call last): File "./SofarSolar.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 210, in open return self.open_unknown(fullurl, data) File "/usr/lib/python2.7/urllib.py", line 222, in open_unknown raise IOError, ('url error', 'unknown url type', type) IOError: [Errno url error] unknown url type: 'www.solarmanpv.com' linaro@odroidxu4:~/domoticz/scripts/python$
Still got errors....
Where do i go wrong.?
Did try this in the cli with manual activate.
Copy paste all script.
And change my locals..
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Mmm what happens if you change:
baseURL = 'www.solarmanpv.com/' #base url
to:
baseURL = 'http://www.solarmanpv.com' #base url
baseURL = 'www.solarmanpv.com/' #base url
to:
baseURL = 'http://www.solarmanpv.com' #base url
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
I wanted to have the script working with python 3 so
Here we go: Stationid.py
Here we go: Omnik.py
Here we go: Stationid.py
- Spoiler: show
Here we go: Omnik.py
- Spoiler: show
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
sincze wrote:Mmm what happens if you change:
baseURL = 'www.solarmanpv.com/' #base url
to:
baseURL = 'http://www.solarmanpv.com' #base url
Thanks..
Looks this do the job: [ pvo has a problem on this moment ]
baseURL = 'http://www.solarmanpv.com:10000' #base url
What is the output in the log??
Is there a option to change this somewhere?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
- galadril
- Posts: 824
- Joined: Monday 07 September 2015 10:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Should I change the script on the op?
Verstuurd vanaf mijn SM-T713 met Tapatalk
Verstuurd vanaf mijn SM-T713 met Tapatalk
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
https://play.google.com/store/apps/deta ... ongmonitor
-
- Posts: 20
- Joined: Sunday 19 March 2017 22:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
I tried to look up about your error and i believe i have found the problem.sincze wrote:Please post your full file please.Derik wrote:Code: Select all
linaro@odroidxu4:~/domoticz/scripts/python$ ./SofarSolar.py Traceback (most recent call last): File "./SofarSolar.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 210, in open return self.open_unknown(fullurl, data) File "/usr/lib/python2.7/urllib.py", line 222, in open_unknown raise IOError, ('url error', 'unknown url type', type) IOError: [Errno url error] unknown url type: 'www.solarmanpv.com' linaro@odroidxu4:~/domoticz/scripts/python$
Still got errors....
Where do i go wrong.?
Did try this in the cli with manual activate.
Copy paste all script.
And change my locals..
Well, system try to connect to the Ginlong or other manufactur cloud and download the data. I have tried to change the DNS using my internet provider default and after 2 days i got this error. Using back Google DNS or Open DNS i solved soon the problem again. Would you please try to take a look?
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 20
- Joined: Sunday 19 March 2017 22:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Remove port 10000, you don't need to writ it.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
Currently working on the Shinemonitor and able to retrieve the following data from their API. I was able to retrieve the data using PHP and Python3.devros wrote: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
Why Python3. well I'm trying to figure out how to build a native-domoticz plugin and that one seems to require Python3.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
wow you made my day thanks a lot
thats perfect news..., i did my own python sihinemonitor scraper, but is really buggy and works only for current watt. Can you share script that you already have? Im quite curios how did you managed to get json data.
Native domoticz plugin is not so important but would be also great.
BTW: Did you noticed, that shinemonitor.com have quite often conection problems (error 502) ?
thats perfect news..., i did my own python sihinemonitor scraper, but is really buggy and works only for current watt. Can you share script that you already have? Im quite curios how did you managed to get json data.
Native domoticz plugin is not so important but would be also great.
BTW: Did you noticed, that shinemonitor.com have quite often conection problems (error 502) ?
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
That was the idea.devros wrote:wow you made my day thanks a lot
Well at the moment my script is in as-is fase meaning you need to enter a lot of values or login to the shinemonitor website to retrieve a few. The guy on the other side of the world is implementing http://api.shinemonitor.com, but he speaks Chineese.devros wrote:thats perfect news..., i did my own python sihinemonitor scraper, but is really buggy and works only for current watt. Can you share script that you already have? Im quite curios how did you managed to get json data.
Native domoticz plugin is not so important but would be also great.
Code: Select all
usr='' #your username
pwd='' #your password
companykey='' #your companykey
# needed to retrieve data, can be obtained from portal
pn='' #your plant id
sn='' #your serial number
O yes I did, first I thought that it was me, but they are experiencing some problems and are working on it.devros wrote: BTW: Did you noticed, that shinemonitor.com have quite often conection problems (error 502) ?
And now the piece you have been waiting for.
- Spoiler: show
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
thanks all looks good but im litte lost where to find company number....
tried to fetch some json from my login page but cant, find that number
thanks
tried to fetch some json from my login page but cant, find that number
thanks
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Ginlong, Omnik Solar, Solarman and Trannergy Inverters
So forum member devros and myself have been playing around to see if we could modify the initial shinemonitor script in such a way that it should work for all kinds of inverters that report their data to shinemonitor.
Kudo's to the devros and his wireshark skills.
Pay special attention to the following values:
pn= on your wifi stick or can be found on the shinemonitor portal after signing in the regular way
sn= the serial number of your inverter. Can also be found on the official portal
devcode= this tricky number you have to extract using for example chrome f12 (under network) to see an initial string between your browser and shinemonitor. It seems every brand has its own devcode.
Just run with Python3 as cronjob every 5 minutes or so.
Have fun!!.
devros & sincze.
Kudo's to the devros and his wireshark skills.
Pay special attention to the following values:
pn= on your wifi stick or can be found on the shinemonitor portal after signing in the regular way
sn= the serial number of your inverter. Can also be found on the official portal
devcode= this tricky number you have to extract using for example chrome f12 (under network) to see an initial string between your browser and shinemonitor. It seems every brand has its own devcode.
Just run with Python3 as cronjob every 5 minutes or so.
Have fun!!.
devros & sincze.
- Spoiler: show
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Who is online
Users browsing this forum: No registered users and 0 guests