Toon App: solarPanel ---> solar data without hardware
Moderators: marcelr, TheHogNL, Toonz
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
Maybe you can share your credentials by sending me an email? Then i can have a look.
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
You could share your credentials by email to me. Then i can have a look.
You could alsso try in a browser by fillimg the fields:
https://api.enphaseenergy.com/api/v2/systems/" + siteid+ "/summary?key=" + apiKey + "&user_id=" + userName
You could alsso try in a browser by fillimg the fields:
https://api.enphaseenergy.com/api/v2/systems/" + siteid+ "/summary?key=" + apiKey + "&user_id=" + userName
Re: Toon App: solarPanel ---> solar data without hardware
Thanks oepi-loepi,
So I used this in browser:(from the API setup under "mijn account" in "mijn toegangscontrole on https://enlighten.enphaseenergy.com/)
Is this correct?
If so I get:
{"reason":"401","message":["Not authorized to access requested resource.","User not found."]}
So I doubt about the UserID (26 characters long??)
Oh and btw I use APIv4 not v2.... meaning I created an account on https://developer-v4.enphase.com/
Using this in Postman with I get, I get:
https://api.enphaseenergy.com/api/v4/sy ... _id=UserID
with output in json:
With status 200 "OK"
So I used this in browser:
Code: Select all
https://api.enphaseenergy.com/api/v2/systems/siteID/summary?key=APIkey&user_id=userID
Is this correct?
If so I get:
{"reason":"401","message":["Not authorized to access requested resource.","User not found."]}
So I doubt about the UserID (26 characters long??)
Oh and btw I use APIv4 not v2.... meaning I created an account on https://developer-v4.enphase.com/
Using this in Postman with I get, I get:
https://api.enphaseenergy.com/api/v4/sy ... _id=UserID
with output in json:
Code: Select all
{"system_id":XXXXX,"
current_power":210,"
energy_lifetime":20667,"
energy_today":336,
"last_interval_end_at":1675758000,
"last_report_at":1675757985,
"modules":14,
"operational_at":1675333431,
"size_w":5120,
"source":"microinverters",
"status":"normal",
"summary_date":"2023-02-07"}
Toon2 with 6.0.2 firmware TSC 2.1.7
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Re: Toon App: solarPanel ---> solar data without hardware
Still no luck, used different configs/setups.
I think there is an issue with API v4 code in this app....
On the website of Enphase I read:
@Oepi-loepie, just checking out your github https://github.com/ToonSoftwareCollecti ... plugin.txt
the code:
This should be for APIv4:
API v2 can't be registered anymore according the site https://developer.enphase.com/signup, I get this error:
I think there is an issue with API v4 code in this app....
On the website of Enphase I read:
Following manuals there is a lot changed since v2.....Announcement: Effective April 1, 2023, Enphase API will only support TLS 1.2 and will not accept any applications on older TLS versions
Announcement: The end of life for Enphase API v2 has been extended from August 15, 2022 to March 31, 2023. For more details, visit About API v4
@Oepi-loepie, just checking out your github https://github.com/ToonSoftwareCollecti ... plugin.txt
the code:
Code: Select all
///////// <version>1.0.3</version>
///////// ENPHASE2 /////////////
///////// Plugin to extract Enphase Solar data for Toon ///////////////
///////// By Oepi-Loepi ///////////////
function getSolarData(passWord,userName,apiKey,siteid,urlString,totalValue){
if (debugOutput) console.log("*********SolarPanel Start getEnphaseData")
var http = new XMLHttpRequest();
var url = "https://api.enphaseenergy.com/api/v2/systems/" + siteid+ "/summary?key=" + apiKey + "&user_id=" + userName
http.open("GET", url, true)
http.onreadystatechange = function() {
if (http.readyState == XMLHttpRequest.DONE) {
if (http.status === 200 || http.status === 300 || http.status === 302) {
try {
var JsonString = http.responseText
var JsonObject= JSON.parse(JsonString)
var today2
currentPower = parseInt(JsonObject.current_power)
today2 = parseInt(JsonObject.energy_today)
totalValue = parseInt(JsonObject.energy_lifetime)
parseReturnData(currentPower,totalValue,today2,0,0,0,0,http.status,"succes")
}
catch (e){
currentPower = 0
parseReturnData(0,totalValue,0,0,0,0,0, http.status,"error")
}
} else {
if (debugOutput) console.log("*********SolarPanel error: " + http.status)
parseReturnData(0,totalValue,0,0,0,0,0, http.status,"error")
}
}
}
http.send();
}
Code: Select all
///////// <version>1.0.3</version>
///////// ENPHASE2 /////////////
///////// Plugin to extract Enphase Solar data for Toon ///////////////
///////// By Oepi-Loepi ///////////////
function getSolarData(passWord,userName,apiKey,siteid,urlString,totalValue){
if (debugOutput) console.log("*********SolarPanel Start getEnphaseData")
var http = new XMLHttpRequest();
var url = "https://api.enphaseenergy.com/api/v4/systems/" + siteid+ "/summary?key=" + apiKey + "&user_id=" + userName
http.open("GET", url, true)
http.onreadystatechange = function() {
if (http.readyState == XMLHttpRequest.DONE) {
if (http.status === 200 || http.status === 300 || http.status === 302) {
try {
var JsonString = http.responseText
var JsonObject= JSON.parse(JsonString)
var today2
currentPower = parseInt(JsonObject.current_power)
today2 = parseInt(JsonObject.energy_today)
totalValue = parseInt(JsonObject.energy_lifetime)
parseReturnData(currentPower,totalValue,today2,0,0,0,0,http.status,"succes")
}
catch (e){
currentPower = 0
parseReturnData(0,totalValue,0,0,0,0,0, http.status,"error")
}
} else {
if (debugOutput) console.log("*********SolarPanel error: " + http.status)
parseReturnData(0,totalValue,0,0,0,0,0, http.status,"error")
}
}
}
http.send();
}
On Github I did a commit....."Signup disabled"
Toon2 with 6.0.2 firmware TSC 2.1.7
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Re: Toon App: solarPanel ---> solar data without hardware
I have 2 Solis inverter. In the app i must select "user" and "password".
Result is only the first inverter-system on both.
How i can select the right inverter or plant-system?
Result is only the first inverter-system on both.
How i can select the right inverter or plant-system?
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
looks like Github hase troubles now.. Is changing V2 into V4 the only thing you did and then it is working?
Re: Toon App: solarPanel ---> solar data without hardware
Yes, I tested with postman, when using v2 then I get the autorization error, when using v4 I get the output as posted e few posts back with a 200 status code.
ohhh btw. I think the userguide has to be updated on page 5 of this thread.....
ohhh btw. I think the userguide has to be updated on page 5 of this thread.....
Toon2 with 6.0.2 firmware TSC 2.1.7
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Re: Toon App: solarPanel ---> solar data without hardware LIVE
Dit geldt voor mij hetzelfde, alleen dan voor "solis" inverters. Zie ook mijn vorige vraag.oepi-loepi wrote: ↑Tue Jan 26, 2021 7:12 pmIk haal voor de Omnik alleen de eerste omvormer binnen, niet de tweede. Als je een speciale plugin wilt (omnik-dubbel) dan kan ik die wel toevoegen maar dan moet je mij even helpen door het sturen van je accountnaam en (tijdelijk aangepaste) wachtwoord per pm om te testenAlxwin wrote:Goedemorgen,
Super deze app! Ben gelijk gaan testen met mijn twee Omnik omvormers. Ik krijg netjes data te zien, echter het lijkt erop alsof hij maar van 1 omvormer de data toont. Ik heb echter twee Omnik omvormers, die dus op hetzelfde Omnik account zitten. Heb het palletje in de instellingen op 2 gezet en bij beide dezelfde logingegevens gezet voor de Omnikportal. Wat doe ik verkeerd?
Groeten, Arjen
Re: Toon App: solarPanel ---> solar data without hardware
hi, i have today an problem
for now no sun is produced, toon says 0W from solar (thats right) but
{"result":"ok","solar": {"current":0, "total":24108678, "today":1766, "production":894, "usage_net":704, "usage_own":-190}}
why it is saying that 894W are going to the net ?
ok found it
in /mnt/data/tsc/appData/solarPanel_fiveminuteValuesProd.txt
deleted the values in that file (the file self i leave) now it is showing the right values. strange i have it the first time like this
for now no sun is produced, toon says 0W from solar (thats right) but
{"result":"ok","solar": {"current":0, "total":24108678, "today":1766, "production":894, "usage_net":704, "usage_own":-190}}
why it is saying that 894W are going to the net ?
ok found it
in /mnt/data/tsc/appData/solarPanel_fiveminuteValuesProd.txt
deleted the values in that file (the file self i leave) now it is showing the right values. strange i have it the first time like this
Re: Toon App: solarPanel ---> solar data without hardware
The growatt servers keep blocking user agents.
My Toon Solar keeps locking my account and my Toon stops reporting solar information.
The homeassistant growatt maintainer solved this by implementing dynamic user agents at startup, instead of hard-coded ShinePhone user agent
More info can be found at:
- https://community.home-assistant.io/t/g ... xing/48385
- https://community.home-assistant.io/t/a ... /60430/271
My Toon Solar keeps locking my account and my Toon stops reporting solar information.
The homeassistant growatt maintainer solved this by implementing dynamic user agents at startup, instead of hard-coded ShinePhone user agent
More info can be found at:
- https://community.home-assistant.io/t/g ... xing/48385
- https://community.home-assistant.io/t/a ... /60430/271
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware LIVE
Ook hier hetzelfde antwoord. Ik kan en ga niet helpen als ik geen inloggegevns kan gebruiken om het programma aan te passen. Ik wil best ernaar kijken maar stuur dan even je inloggegevens per mail of per pmBenToon wrote: ↑Wed Feb 08, 2023 9:50 pmDit geldt voor mij hetzelfde, alleen dan voor "solis" inverters. Zie ook mijn vorige vraag.oepi-loepi wrote: ↑Tue Jan 26, 2021 7:12 pmIk haal voor de Omnik alleen de eerste omvormer binnen, niet de tweede. Als je een speciale plugin wilt (omnik-dubbel) dan kan ik die wel toevoegen maar dan moet je mij even helpen door het sturen van je accountnaam en (tijdelijk aangepaste) wachtwoord per pm om te testenAlxwin wrote:Goedemorgen,
Super deze app! Ben gelijk gaan testen met mijn twee Omnik omvormers. Ik krijg netjes data te zien, echter het lijkt erop alsof hij maar van 1 omvormer de data toont. Ik heb echter twee Omnik omvormers, die dus op hetzelfde Omnik account zitten. Heb het palletje in de instellingen op 2 gezet en bij beide dezelfde logingegevens gezet voor de Omnikportal. Wat doe ik verkeerd?
Groeten, Arjen
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
Xavier wrote: ↑Wed Feb 08, 2023 8:25 pm Yes, I tested with postman, when using v2 then I get the autorization error, when using v4 I get the output as posted e few posts back with a 200 status code.
ohhh btw. I think the userguide has to be updated on page 5 of this thread.....
[/quote
Ik kan niet helpen als ik geen inloggegevns kan gebruiken om het programma aan te passen. Ik wil best ernaar kijken maar stuur dan even je inloggegevens per mail of per pm
Laat svp ook even wweten wat precies je oplossing was.
De handleiding heb ik niet geschreven. Ik heb totaal geen ervaring met enPhase daarin. Kun jij wellicht de handleiding herschrijven en hier posten? Dan maak ik de verwijzing naar die van jou.
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
In het algemeen: ik krijg veel vragen per mail, pm, marktplaatsaccount, via de toonWater pagina en ook via andere forums of een omvormer in de lijst zit en of ik even een omvormer wil toevoegen. Mijn antwoord is altijd gelijk… ik kan alleen iets maken als ik ook inloggegevens heb. Als ik daar dan om vraag dan blijft het stil… jammer.
Gelukkig zijn er ook mensen die wel eillen delen en zo de community steunen.
Gelukkig zijn er ook mensen die wel eillen delen en zo de community steunen.
-
- Advanced Member
- Posts: 681
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Toon App: solarPanel ---> solar data without hardware
Ik heb de twee stukken doorgelezen maar misschien lees ik er overheen. Kun je aangeven hoe hij dat heeft gedaan met die dynamic user-agent?georon wrote: ↑Sun Feb 12, 2023 9:22 pm The growatt servers keep blocking user agents.
My Toon Solar keeps locking my account and my Toon stops reporting solar information.
The homeassistant growatt maintainer solved this by implementing dynamic user agents at startup, instead of hard-coded ShinePhone user agent
More info can be found at:
- https://community.home-assistant.io/t/g ... xing/48385
- https://community.home-assistant.io/t/a ... /60430/271
Probeer ook niet te vaak de data op te halen. Daarmee blokt de server de api toegang, tenminste daar lijkt het op.
Re: Toon App: solarPanel ---> solar data without hardware
PM sent.oepi-loepi wrote: ↑Sun Feb 12, 2023 10:33 pm In het algemeen: ik krijg veel vragen per mail, pm, marktplaatsaccount, via de toonWater pagina en ook via andere forums of een omvormer in de lijst zit en of ik even een omvormer wil toevoegen. Mijn antwoord is altijd gelijk… ik kan alleen iets maken als ik ook inloggegevens heb. Als ik daar dan om vraag dan blijft het stil… jammer.
Gelukkig zijn er ook mensen die wel eillen delen en zo de community steunen.
Toon2 with 6.0.2 firmware TSC 2.1.7
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.