Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUNNY TRIPOWER 8.0 not connect #2

Open
g6pl opened this issue Oct 22, 2019 · 13 comments · Fixed by #8
Open

SUNNY TRIPOWER 8.0 not connect #2

g6pl opened this issue Oct 22, 2019 · 13 comments · Fixed by #8
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@g6pl
Copy link

g6pl commented Oct 22, 2019

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

@Dymerz Dymerz added the help wanted Extra attention is needed label Mar 26, 2020
@Dymerz
Copy link
Owner

Dymerz commented Mar 26, 2020

I'm sorry I can help you cause I don't own a SMA SUNNY TRIPOWER

@k-sartor
Copy link
Contributor

k-sartor commented May 8, 2020

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

@Dymerz Dymerz added enhancement New feature or request bug Something isn't working labels May 9, 2020
Dymerz added a commit that referenced this issue May 9, 2020
@Dymerz
Copy link
Owner

Dymerz commented May 9, 2020

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)

@k-sartor
Copy link
Contributor

k-sartor commented May 9, 2020

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

@Dymerz
Copy link
Owner

Dymerz commented May 9, 2020

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!

@k-sartor
Copy link
Contributor

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

@k-sartor
Copy link
Contributor

k-sartor commented May 10, 2020

To add into wiki for example:
To determine a tag for a particular inverter:

  1. Log in into the web interface
  2. Go to on "instantaneous Values" and select the wished value
  3. On firefox, clic on Ctrl+ MAJ + K to open Web Console
  4. Click on Ctrl + Shift + C to select an element on the web page
  5. Select the element et note the span id (beginning by a "v", here v6100_40263F00). See capture
    firefox_4Q1F8SsGib
  6. remove the "v" and add the tag in the list to be able to call it in the main software

@Dymerz
Copy link
Owner

Dymerz commented May 11, 2020

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:
image

@k-sartor
Copy link
Contributor

Here is the required file (for SMA STP50-40). I'va also access to a sunny boy, do you need it?
scripts.015adc2a.zip

@Dymerz
Copy link
Owner

Dymerz commented May 11, 2020

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?

  • The scripts.xxxx.js
  • http://[inverter address]/data/ObjectMetadata_Istl.json
    (contains internal tags links and doesn't include any sensitive data)
  • http://[inverter address]/data/l10n/en-US.json
    (only contains localization)

Thanks for your contribution.

@k-sartor
Copy link
Contributor

k-sartor commented May 11, 2020

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

@k-sartor
Copy link
Contributor

k-sartor commented May 11, 2020

So please find the required files.
Note i notice one issues with getlogger (do you want i open other(s) ticket(s)?):

  • getlogger work on some data for SunnyBoy: data are available on the webinterface of the inverter but nothing is returned over two months ago by current method...
    Data required.zip

@Dymerz Dymerz linked a pull request May 11, 2020 that will close this issue
@Dymerz
Copy link
Owner

Dymerz commented May 11, 2020

Thanks I will take a look 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants