Open g6pl opened 4 years ago
I'm sorry I can help you cause I don't own a SMA SUNNY TRIPOWER
Some changes must be done to acheive connected.
First in each requests verify=False need to be added depending of your python version Moreover in the beginning of the file i add the last line
if self.useSSL:
self.__url ='https://'+self.ip
port = 443
Edit beware the tags need to be added while in tripower there are not the same. Use get all values to determine them and add them in the KEYS definition
Thanks for your contribution @k-sartor I will integrate the verify=False
👍
You can pass the port in the constructor instead of editing:
WebConnect('127.0.0.1', 'strongPassword', 443, True)
Ok for passing port in constructor (but from my point of vue, default SSL port could be added). Contrary to i previously said, getallvalues() does not work for tripower to determine the new KEY. I think that i could add a "procedure" to determine them if you want. Finally, we could determine generic profile of keys depending of the inverter type if you want
I prefer to be more flexible and don't force the HTTPS port since I don't know all SMA types and what the user can do or not (maybe the SSL port can be arbitrary chosen).
Yeah you can fork and contribute, a feature like that could be very useful!
Ok for the port. To be honest i don't use git. However, there are some tags for a STP50-40 inverter: Total Power: 6100_40263F00 Frequency : 6100_00465700 Type surexcitation 6180_08465A00 I L1 6100_40465300 I L2 6100_40465400 I L3 6100_40465500 U L1 6100_00464800 U L2 6100_40464100 U L3 6100_00464A00 U 12 6100_00464B00 U 23 6100_00464C00 U 31 6100_00464D00 P L1 6100_40464000 P L2 6100_40464100 P L3 6100_40464200 Total Energy 6400_00260100 Service time 6400_00462E00 Injection time 6400_00462F00 (i think it is the production time value while in our case there is not injection of electricy on network)
Production PV 6100_0046C200 (i think it is similar to Total Energy but i don't know the difference Etat du compteur de production pv v6400_0046C300
To add into wiki for example: To determine a tag for a particular inverter:
It's particularly interesting, I didn't know tags was in the HTML, it changes a lot of stuff! I've take a look on the javascript script of my SMA Dashboard and after few hours I've successfully retrieve all tags and match them with a friendly label directly from the internal SMA script.
I'm not sure and need some work but I think it could be possible to retrieve these tags whatever the inverter your using without changing the code, but I need to know if the file scripts.xxxx.js
I'm using is basically the same on all types of inverters.
Can you, please, send me your scripts.xxxx.js
?
You can find it easily:
Here is the required file (for SMA STP50-40). I'va also access to a sunny boy, do you need it? scripts.015adc2a.zip
Yeah the more samples I have better it is. Ok, it looks good, I need others files to "emulate" your inverter, can you send me these files for each inverters?
scripts.xxxx.js
Thanks for your contribution.
Notice getlogger works for sunny boy but no for STA50-40 (its returns nothing) => Solved: i add verify=false in your new code and it works I will try to send you this data
So please find the required files. Note i notice one issues with getlogger (do you want i open other(s) ticket(s)?):
Thanks I will take a look 👍
Hello I have SMA SUNNY TRIPOWER 8.0 and trying to use your library to connect to my inverter ... unfortunately it doesn't connect. Permission denied message. I have SSL conection. I connect via WLAN (not LAN) Firmware is: 3.00.05.R