Page 4 of 5

Re: SMA Sunny Boy 1.5

Posted: Sunday 29 November 2020 20:57
by fdemees
If your SMA can be reached without SSL, please give it a try. (e.g. http on port 80)

If your Syno is really too old, it is possible that its openssl libraries do not support the underlying more recent TLS versions.

Re: SMA Sunny Boy 1.5

Posted: Sunday 29 November 2020 21:14
by Huff002
I I can only reach my SMA via https, I can't find a setting to disable https. (Tripower 4.0 with firmware 3.10.10.R).
My Synology is a RS812+ with DSM 6.2.3-25426 Update 2

Re: SMA Sunny Boy 1.5

Posted: Sunday 29 November 2020 23:02
by fdemees
SSL can be tricky.
Old protocols are e.g. SSLv3, TLS1.0
Newer include TLS1.2, 1.3.

There must be a matching protocol between the client and the server, and then a matching cipher.


The user manual https://manuals.sma.de/SBxx-1VL-40/en-U ... 30027.html seems to indicate that http is supported.
This means connecting directly to the IP address of your inverter, not the sunnyportal.com website.

Re: SMA Sunny Boy 1.5

Posted: Sunday 29 November 2020 23:12
by Huff002
192.168.0.4 redirects to https://192.168.0.4 if I open the webpage in a browser.
I searched within the settings of the SMA but can't find any settings, not for security, SSL, TLS, 443, ...

Re: SMA Sunny Boy 1.5

Posted: Sunday 29 November 2020 23:49
by rklomp
Could you make a tcpdump and share this?
Would be something like:

tcpdump -i any -w capture.pcap host 192.168.0.4

Let it run for a minute and than stop with ctrl-c so it has captured at least one try by the plugin to connect to the sma. Share the generated file called capture.pcap.



You can share it in a private message if you prefer that.

Re: SMA Sunny Boy 1.5

Posted: Monday 30 November 2020 21:19
by Huff002
I can't get tcpdump to do anything (i'm trying with windump).

What do you expect to see?
Is is something that I can get with Wireshark?

Re: SMA Sunny Boy 1.5

Posted: Monday 30 November 2020 21:31
by rklomp
You should run it on the synology device you run domoticz on. I want to see the ssl handshake process of the plugin with the sma device.

Re: SMA Sunny Boy 1.5

Posted: Monday 30 November 2020 21:47
by Huff002
Zipped the pcap file.

Re: SMA Sunny Boy 1.5

Posted: Tuesday 01 December 2020 15:15
by rklomp
In the log I do not see a SSL handshake, but I see it tries to setup the connection via HTTP port 80. What is you current configuration? Have configured it to use HTTPS? Can you share a screenshot?

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 14:30
by artstam
I switched from synology (did not work) to raspberry pi. I installed python, git and pip and i can add the hardware. I see 2 devices but no data.

The error log is:
2020-12-02 13:16:52.186 (Zonnepanelen) No valid response from SMA inverter on 192.168.178.49; {'err': 404}
2020-12-02 13:16:52.703 Error: (Zonnepanelen) Failed to retrieve data from 192.168.178.49, cancelling...
2020-12-02 13:16:56.206 (Zonnepanelen) Pushing 'onHeartbeatCallback' on to queue
2020-12-02 13:16:56.211 (Zonnepanelen) Processing 'onHeartbeatCallback' message
2020-12-02 13:16:56.211 (Zonnepanelen) Calling message handler 'onHeartbeat'.
2020-12-02 13:16:56.211 (Zonnepanelen) onHeartbeat called 7

Any idea?
Thomas

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 14:37
by rklomp
Can you provide de full debug log of the plugin including initialization?

Go to hardware, select the SMA Sunny Boy Solar Inverter and press update. This will trigger a reload of the plugin.
Than go to log and copy the full log output.

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 14:56
by Huff002
rklomp wrote: Tuesday 01 December 2020 15:15 In the log I do not see a SSL handshake, but I see it tries to setup the connection via HTTP port 80. What is you current configuration? Have configured it to use HTTPS? Can you share a screenshot?
New log and printscreen of settings attached.

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 15:01
by rklomp
Huff002 wrote: Wednesday 02 December 2020 14:56 New log and printscreen of settings attached.
Thanks, For some reason I do not see the SSL traffic. Can you try with -s 65535 added to the command?

tcpdump -i any -s 65535 -w capture.pcap host 192.168.0.4

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 15:11
by Huff002
I let it run longer and did a update on the hardware in Domotics while running.
New log attached, it looks the same for me 8-)

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 15:40
by artstam
rklomp wrote: Wednesday 02 December 2020 14:37 Can you provide de full debug log of the plugin including initialization?

Go to hardware, select the SMA Sunny Boy Solar Inverter and press update. This will trigger a reload of the plugin.
Than go to log and copy the full log output.
Changed to https and now the kwh is visible!

2020-12-02 15:36:04.747 Status: (Zonnepanelen) Stop directive received.
2020-12-02 15:36:04.747 Status: (Zonnepanelen) Exiting work loop.
2020-12-02 15:36:04.775 Status: (Zonnepanelen) Closing session to SMA inverter on 192.168.178.49
2020-12-02 15:36:05.788 (Zonnepanelen) Debug logging mask set to: NONE
2020-12-02 15:36:05.448 Status: (Zonnepanelen) Stopping threads.
2020-12-02 15:36:05.448 Status: (Zonnepanelen) Stopped.
2020-12-02 15:36:05.448 Status: (Zonnepanelen) Started.
2020-12-02 15:36:05.787 Status: (Zonnepanelen) Entering work loop.
2020-12-02 15:36:05.787 Status: (Zonnepanelen) Initialized version 1.0.4, author 'rklomp'
2020-12-02 15:36:06.195 Status: (Zonnepanelen) Successfully logged in to SMA inverter on 192.168.178.49

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 15:42
by Huff002
artstam wrote: Wednesday 02 December 2020 14:30 I switched from synology (did not work) to raspberry pi. I installed python, git and pip and i can add the hardware. I see 2 devices but no data.
What Synology and what DSM version did you used?

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 15:47
by rklomp
Huff002 wrote: Wednesday 02 December 2020 15:11 I let it run longer and did a update on the hardware in Domotics while running.
New log attached, it looks the same for me 8-)
Strange. I would expect something like this:
Image

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 17:26
by artstam
Huff002 wrote: Wednesday 02 December 2020 15:42
artstam wrote: Wednesday 02 December 2020 14:30 I switched from synology (did not work) to raspberry pi. I installed python, git and pip and i can add the hardware. I see 2 devices but no data.
What Synology and what DSM version did you used?
Synology 211+ en 6.2 hardware

Re: SMA Sunny Boy 1.5

Posted: Wednesday 02 December 2020 18:23
by Huff002
That is the same software version as my Synology.
Maybe @rklomp is right and it is caused by the openssl libraries.

If I do a Google search on openssl tls synology I only find information about the ssl certificate on the Synology itself, nothing about SSL connection to another device. Is there any way to make sure this is the problem?

Re: SMA Sunny Boy 1.5

Posted: Thursday 03 December 2020 10:25
by artstam
Huff002 wrote: Wednesday 02 December 2020 18:23 That is the same software version as my Synology.
Maybe @rklomp is right and it is caused by the openssl libraries.

If I do a Google search on openssl tls synology I only find information about the ssl certificate on the Synology itself, nothing about SSL connection to another device. Is there any way to make sure this is the problem?
I think my problem is that i couldn't install a recent domoticz version (like node-mydomoathome-0.2.39.spk) because my hardware did not allow me to install node.js_v4!

But it is now working great on my raspberry pi!