sunny beam vervangen

Kijk hier voor datalog programma's en handleidingen.
Plaats reactie
Gebruikersavatar
asl
junior lid
Berichten: 11
Lid geworden op: 02 apr 2021, 22:00
Installatie Land: België

Re: sunny beam vervangen

Bericht door asl »

I'm at my PC now.

Indeed it is definitions: it is de definition of DWORD in smadef.h .
For it to work on a 64 bit computer I had to change the typedef to unsigned int, it was unsigned long in the original. It has to be 4 bytes.
Gebruikersavatar
Robin61
junior lid
Berichten: 7
Lid geworden op: 04 aug 2022, 15:40
Installatie Land: België

Re: sunny beam vervangen

Bericht door Robin61 »

Thanks for you help. Unfortunately, it didn't help. I would have been surprised that the python port, specifically made for rPi, would have suffered the same issue.

Still always reading 0160, like the cmd submitted was not understood or received.
So, do you confirm that your sunnybeam is also the radio version and not the bluetooth version ?
Gebruikersavatar
asl
junior lid
Berichten: 11
Lid geworden op: 02 apr 2021, 22:00
Installatie Land: België

Re: sunny beam vervangen

Bericht door asl »

Yes it is radio.You are reading from USB ?
The program does connect to the boy because you get some information.
I do think I remember having exactly the same problem moving from a pi 3 to a 64 bit desktop.
I had to go deep in the code (which is not that large anyway).
Gebruikersavatar
Robin61
junior lid
Berichten: 7
Lid geworden op: 04 aug 2022, 15:40
Installatie Land: België

Re: sunny beam vervangen

Bericht door Robin61 »

Yes reading from USB.
I tried several usb cable and several powersupply for the rPi... you never know...

For information, I manage to make it work with the Sunny Data Control on a windows virtualbox... but it was a bit painful as well, I had to reset the sunnybeam so the software to detect it but it worked...
If I can't make it work I guess I'll need to find another to monitor my panels.
:-(
Gebruikersavatar
SBF
Senior lid
Berichten: 293
Lid geworden op: 28 jun 2013, 14:29
Installatie Land: België
Contacteer:

Re: sunny beam vervangen

Bericht door SBF »

If SDC can read the data your inverter has most probably an old firmware.
Afbeelding
Yet another tool to read power production of SMA® solar/battery inverters
GitHub @SBFspot
Gebruikersavatar
asl
junior lid
Berichten: 11
Lid geworden op: 02 apr 2021, 22:00
Installatie Land: België

Re: sunny beam vervangen

Bericht door asl »

Robin,
I can send you my source code. Please check personal message I sent you.
Gebruikersavatar
Robin61
junior lid
Berichten: 7
Lid geworden op: 04 aug 2022, 15:40
Installatie Land: België

Re: sunny beam vervangen

Bericht door Robin61 »

So, as I was being able to read the data from SDC , I decided to go further and sniff the USB messages :D I never did that before, but it was fun.

I saw that the message to get the device id was different than the tool.
SDC is sending

Code: Selecteer alles

7EFF03404100000000900003D2F45808D4F58B7B7E
But the SunnyBeamTool (SBT) is sending:

Code: Selecteer alles

7EFF0340410000000090000280854F2DB2E67E
Quite different. SBT is hardcoding the first byte with 7EFF03404100000000900002 while SDC is sending 7EFF03404100000000900003
The message submitted by SDC is 21 bytes while SBT is 19 bytes. I don't really know why there is this difference and I didn't really investigate it yet BUT I hardcoded the byte array in search_device_id() to the one sent by SDC and ... Voila !
It is now working, the device id is now returned by the sunnybeam and all other methods are working correctly so I can now retrieve my data !
Gebruikersavatar
asl
junior lid
Berichten: 11
Lid geworden op: 02 apr 2021, 22:00
Installatie Land: België

Re: sunny beam vervangen

Bericht door asl »

Well done !
Gebruikersavatar
Robin61
junior lid
Berichten: 7
Lid geworden op: 04 aug 2022, 15:40
Installatie Land: België

Re: sunny beam vervangen

Bericht door Robin61 »

Another thing, I noticed that sometime the device is just not responding.
Going to the settings in the sunnybeam "wakes" it up, and then start responding. Then; as far as you are requesting data, it is not going to sleep (I guess, finger crossed ! ).
I don't know if there is a way to wake it via serial port, because it will probably mean that everytime the pi will be restarting, there is a high chance that the sunny beam went to sleep in the mean time...
Plaats reactie

Terug naar “Data logging programma's en handleidingen”