Page 5 of 5

Re: SMA Sunny Boy 1.5

Posted: Friday 04 December 2020 0:18
by Carthman
Hi guys,

The plugin is working fine for me, but I don't know anything about Python, and I want to use some datas from SMA in a bash script.
I would need it to calculate self consumption and other things.
I could use /json.htm?type=devices&rid=1 from the device created by the plugin, but it would be quicker to read directly from the SMA Inverter, and the refresh of the device is too slow (5s).
In the pyhton script it's look like a request is made to the Json of the SMA to get the values back.

For the bash I tried

Code: Select all

curl -k -i -H "Accept: application/json" "https://192.168.0.18/dyn/getValues.json?sid=6400_00260100"
or
curl -k -i "https://usr:[email protected]/dyn/getValues.json?sid=6400_00260100"
And I always get something like that :

Code: Select all

HTTP/1.1 200 OK
Content-Type: application/json;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length: 11
Date: Thu, 03 Dec 2020 23:09:52 GMT
Server: lighttpd/1.4.48

{"err":404}
Thanks for help !

Re: SMA Sunny Boy 1.5

Posted: Friday 04 December 2020 23:47
by Carthman
After few hours looking for an way to connect to SMA, I find the answer just in the page 3 of this topic !!!

Now I just need to do a script !
fdemees wrote: Saturday 10 October 2020 18:04 curl -H "Content-Type: application/json, Accept-Charset: UTF-8" -X POST -d '{"pass" : "password", "right" : "usr"}' http://pv/dyn/login.json

You get a session ID: {"result":{"sid":"NHIsYKZaBmBa7KJG"}}

Quickly send the second command on one line:
curl -H "Content-Type: application/json, Accept-Charset: UTF-8" -X POST -d '{"destDev":[],"keys":["6400_00260100","6400_00262200","6100_40263F00"]}' http://pv/dyn/getValues.json?sid=NHIsYKZaBmBa7KJG
and you get the JSON result:
{"result":{"0156-76BCFF**":{"6400_00260100":{"1":[{"val":12020721}]},"6400_00262200":{"1":[{"val":17570}]},"6100_40263F00":{"1":[{"val":831}]}}}}

Re: SMA Sunny Boy 1.5

Posted: Wednesday 27 January 2021 13:31
by svdhaar
Hi, i have a question about this super SMA Sunny Boy Solar Inverter Plugin.
It is working plug and play :-), very nice!

i've installed the plugin and it creates 2 devices. 1. total generated 2. actual generation

in the actual generation device the daily generation data is shown also.
is it possible to creat a third device which is showing the daily generation data?

Re: SMA Sunny Boy 1.5

Posted: Monday 28 February 2022 9:25
by knights
rklomp wrote: Monday 30 November 2020 21:31 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.
Hi Rklomp, I am having issues since since some new version of domoticz it seems. When I enable your (awesome) plugin, my domoticz keeps crashing.
Is there anything I can share so you can look into it?

Also the HTTP setting does not seem to work anymore, tried to troubleshoot the problem by going back to HTTP:
Although I choose to use HTTP, in the error log it shows port 443? :D

2022-02-28 09:23:22.768 SMA: Error accessing SMA inverter on 192.168.1.166; HTTPSConnectionPool(host='192.168.1.166', port=443): Read timed out. (read timeout=1)
2022-02-28 09:24:56.048 SMA: No valid response from SMA inverter on 192.168.1.166; {'err': 404}
2022-02-28 09:24:57.070 SMA: Received data: {'err': 404}
2022-02-28 09:24:57.070 SMA: Previous attempt failed, trying new login...
2022-02-28 09:24:58.153 SMA: Error accessing SMA inverter on 192.168.1.166; HTTPSConnectionPool(host='192.168.1.166', port=443): Read timed out. (read timeout=1)
2022-02-28 09:24:59.435 SMA: Received data: {'err': 404}
2022-02-28 09:24:59.435 SMA: Acquiring GIL for 'onHeartbeatCallback'
2022-02-28 09:24:59.485 SMA: Pushing 'onHeartbeatCallback' on to queue
2022-02-28 09:24:59.536 SMA: Processing 'onHeartbeatCallback' message
2022-02-28 09:24:59.536 SMA: Acquiring GIL for 'onHeartbeatCallback'
2022-02-28 09:24:59.536 SMA: Calling message handler 'onHeartbeat' on 'module' type object.

I already deleted the plugin and installed it again, but this doesnt solve the problem.

Any other people have the same issue?

Re: SMA Sunny Boy 1.5

Posted: Friday 10 March 2023 12:37
by mvveelen
Hi,

I've just started using this version: https://github.com/rklomp/Domoticz-SMA-SunnyBoy
And it works.

But, I have 2 SMA SB's, and I'm now reading just one of them. How can I add both?

Re: SMA Sunny Boy 1.5

Posted: Tuesday 14 March 2023 8:24
by waltervl
mvveelen wrote: Friday 10 March 2023 12:37 Hi,

I've just started using this version: https://github.com/rklomp/Domoticz-SMA-SunnyBoy
And it works.

But, I have 2 SMA SB's, and I'm now reading just one of them. How can I add both?
Just create a new hardware gateway for the second SMA SB and fill in the correct IP?

Re: SMA Sunny Boy 1.5

Posted: Tuesday 14 March 2023 8:51
by mvveelen
waltervl wrote: Tuesday 14 March 2023 8:24
mvveelen wrote: Friday 10 March 2023 12:37 Hi,

I've just started using this version: https://github.com/rklomp/Domoticz-SMA-SunnyBoy
And it works.

But, I have 2 SMA SB's, and I'm now reading just one of them. How can I add both?
Just create a new hardware gateway for the second SMA SB and fill in the correct IP?
How do I create a new hardware gateway? Sounds great, but where to start :-) ?

Stupid me.....I just can add a second gateway with another name/IP.........doh....!

Re: SMA Sunny Boy 1.5

Posted: Tuesday 14 March 2023 10:09
by mvveelen
Unfortunately I receive an error when I add the second converter, using the right IP address and the right password:

2023-03-15 08:08:59.038 SMA Sonny Boy Solar inverter woning: Pushing 'onHeartbeatCallback' on to queue
2023-03-15 08:08:59.088 SMA Sonny Boy Solar inverter woning: Processing 'onHeartbeatCallback' message
2023-03-15 08:08:59.088 SMA Sonny Boy Solar inverter woning: Acquiring GIL for 'onHeartbeatCallback'
2023-03-15 08:08:59.088 SMA Sonny Boy Solar inverter woning: Calling message handler 'onHeartbeat' on 'module' type object.
2023-03-15 08:08:59.088 SMA Sonny Boy Solar inverter woning: onHeartbeat called 0
2023-03-15 08:08:59.368 SMA Sonny Boy Solar inverter woning: No valid response from SMA inverter on 192.168.0.20; {'err': 404}
2023-03-15 08:08:59.637 SMA Sonny Boy Solar inverter woning: Received data: {'err': 404}
2023-03-15 08:08:59.637 SMA Sonny Boy Solar inverter woning: Previous attempt failed, trying new login...
2023-03-15 08:09:00.058 SMA Sonny Boy Solar inverter woning: No valid response from SMA inverter on 192.168.0.20; {'err': 404}
2023-03-15 08:09:00.352 SMA Sonny Boy Solar inverter woning: Received data: {'err': 404}
2023-03-15 08:09:00.352 SMA Sonny Boy Solar inverter woning: Previous attempt failed, trying new login...
2023-03-15 08:09:00.626 SMA Sonny Boy Solar inverter woning: No valid response from SMA inverter on 192.168.0.20; {'err': 404}
2023-03-15 08:09:00.998 SMA Sonny Boy Solar inverter woning: Received data: {'err': 404}
2023-03-15 08:09:00.998 SMA Sonny Boy Solar inverter woning: Acquiring GIL for 'onHeartbeatCallback'
2023-03-15 08:09:00.998 Error: SMA Sonny Boy Solar inverter woning: Failed to retrieve data from 192.168.0.20, cancelling...


I managed to logon to this IP address/converter with the same password. What could be wrong, maybe because it is a SMA SB 3.6 I have to change something in the code (but that would break the other setup)?

Details of the 2 converters:

Sunny Boy

3.6
firmware 4.0.55.R
Naam SB3.6-1AV-41622
Webconnect 1.5.4.R

2.0
firmware 3.11.5.R
Naam SB2.0-1VL-40383
Webconnect 1.5.1.R

Re: SMA Sunny Boy 1.5

Posted: Wednesday 15 March 2023 16:01
by mvveelen
akortekaas wrote: Tuesday 18 February 2020 14:25 Thanks for the plugin, it works very well :)

The only thing i had to change was the 012F-730BXXXX number, the last 4 digits were different for me.

For those who don't know how to get this number:

-
-now you should have a list of nonsense with a few lines that look like this: "276 HTTP/1.0 200 OK (application/json)" these are the packets that contain the user id. (012f number)
-Click on one of the application/json entries and in the window below you will see a bunch of stuff (sometimes you will need to click the ">" arrow a few times to expand the code)
-somewere in there or multiple times is your 012F code, as far as i know there only should be one, so if you find one, you should be done.

Now you need to change the 012f number in the plugin to your unique number ( it's in Domoticz-SMA-SunnyBoy/plugin.py after you installed the plugin, there are 3 instances of this number that need to be changed)
I don't know enough about linux and stuff to give more clear instructions about this part.
I don't find this even after 1 minute. Tried it a few times, even with logging out and logging in again. But no such lines or even something that looks like this 012F code. Any ideas?

Edit:

using the method without Wireshark, as described on page 3, I only get a session ID with the converter I already added to Domoticz.
The one I can't add just doesn't give a reply/session ID. What could be wrong here.....?

Edit 2:

Nevermind, I'm using the plugin I couldn't use before for the SMA SB 3.6 now. I only had to change http to https ... doh !

Re: SMA Sunny Boy 1.5

Posted: Friday 31 March 2023 13:18
by mvveelen
With SBFSpot I can read the Voltage from the SMA converters. But I don't want to use that plugin and stick with this one.

Is it possible to add this readout to the plugin so I can make better exports to PVOutput.org ?

Re: SMA Sunny Boy

Posted: Monday 21 August 2023 14:46
by RudolfMBe
Hello,
I would like to use this/ somthing similar to read the values of the SunnyBoy Sorage 3_7

I get the following error message:
2023-08-21 14:14:09 679 Error: Bat: Traceback (most recent call last):
2023-08-21 14:14:09 679 Error: Bat: File "/home/pi/domoticz/plugins/Domoticz-SMA-SunnyBoy/plugin. py", line 182, in onHeartbeat
2023-08-21 14:14:09 679 Error: Bat: _ plugin. onHeartbeat()
2023-08-21 14:14:09 679 Error: Bat: File "/home/pi/domoticz/plugins/Domoticz-SMA-SunnyBoy/plugin. py", line 147, in onHeartbeat
2023-08-21 14:14:09 679 Error: Bat: sma_pv_watt = result['6100_40263F00']['1 '][0]['val']

The available id's I found in the Sunny Boy Storage 3_7
v6100_40263F00
v6100_40464000
v6100_40466C00
v6100_40466D00
v6100_0046E800
v6100_0046E900
v6100_0046EB00
v6100_0046EC00
v6100_40463700
v6100_00499100_0
v6100_00696E00
v6100_00496900
v6100_00499300_0
v6100_00496A00
v6100_00499400_0 A
None of them work for me.
I have Domoticz since a few days so this is all new to me.
Regards,
Rudolf