[FHEM] MiniJoule / Enecsys Wechselrichter auslesen

1,276 views
Skip to first unread message

Arno Willig

unread,
Aug 26, 2012, 7:41:51 AM8/26/12
to fhem-users
Hi,

Ich habe eine kleine Photovoltaik-Anlage von MiniJoule.
Die Enecsys-Wechselrichter senden die aktuellen Messdaten per Zigbee
an das Enecsys Gateway, einem kleinen Kasten mit LAN-Anschluss.
Das Gateway bereitet die Daten auf und sendet sie weiter an den
Enecsys-Server, wo man auf einer Webseite eine (leider Flash-basierte)
Webseite aufrufen kann.

Optimal wäre es natürlich, die Daten direkt aus dem Gateway abzurufen,
aber ich habe das Protokoll noch nicht verstanden.
Da kommen Zeilen wie diese:
WS=F4_3BQCaxjQAAJTgIQEAAAGGFDADiAABDAD6A6QyAOMkAmQACwAA9A
WZ=Ya81dwCaxjQAAJUpIQEAAAHdClNhrzV3AJrGNEg=60,S=2000007009
WS=QY_3BQCaxjQAAJVKIQEAAAGHFDADiAABFQEDA6cyAOMlA3gACwAA6B
WZ=Ya81dwCaxjQAAJVWIQEAAAHeClNBj_cFAJrGNEg=6F,S=2000007009
WS=F4_3BQCaxjQAAJVYIQEAAAGHFDADiAABFAECA6YyAOQlAmQACwAAB4

Hat jemand eine Eingebung, was das bedeuten könnte? Es handelt sich
jedenfalls scheinbar NICHT um BASE64, auch wenns ein bisschen so
aussieht.

Auf jeden Fall ist es mir gelungen, die Flash-Webseite zu analysieren,
dabei kam raus, dass Enecsys ein ASP.NET-basiertes SOAP-Interface
verwendet.
Ich habe ein Shell-Script geschrieben, mit dem man die Daten auslesen
und in FHEM verwenden kann.
Hat jemand Lust, aus dem Script ein FHEM-Modul zu machen? Das wäre
eleganter! Ich rufe das Script derzeit mit einem Timer alle zwei
Minuten auf:
define pv_timer at +*00:02:00 "/Users/akw/enecsys.sh"

Hab das Script ins Wiki gestellt:
http://www.fhemwiki.de/wiki/Enecsys_Monitoring_System


Hat noch jemand Enecsys - Hardware und potentiell Interesse an der
Weiterentwicklung?

Ciao, Arno

--
Arno Willig <a...@thinkwiki.org>

duinsel

unread,
Sep 11, 2012, 4:50:32 PM9/11/12
to fhem-...@googlegroups.com
Auf English, da mein Deutsch nicht so gut mehr ist.

I recently tried to deal with this (unsuccessfully) with another dutch Enecsys user. I don't use FHEM, but would like to tap into the gateway to get data in a little more detail. I ran into this thread while googling around.

Here some discussions addressing the issue

Tweakers.net
Navitron

Things we found
WZ=i7c1dwC.. lines seem to be from the gateway, number in the end is gateway serial+1
Then the WS=lines are most likely from the inverters.
Each inverter sends lines that start with a unique prefix, which probably encodes some sort of serial/ID string. I have 4 inverters, the are 4 unique prefixes, plus a prefix for the gateway.

The gateway also reports de Zigbee adress of the inverters as something like 05F6F017, which in decimal matches the serial number as printed on the inverters.

Here are some of my strings

WS=-vL2BQCaxjQAAN7HIQEAAADnFDADiAAAlwCKA5EyAOUxAiMADgAAB4
WZ=i7c1dwCaxjQAAN7TIQEAAAS8ClP68vYFAJrGNEg=00,S=2000XXXXXX
WS=F_D2BQCaxjQAAN7iIQEAAAG4FDADiAAAngCPA4kyAOUwA9UAGwAA61
WS=IfH2BQCaxjQAAN8lIQEAAAGXFDADiAAAqQCaA48yAOc0A4wAEQAAAF
WZ=i7c1dwCaxjQAAN8xIQEAAAS9ClMh8fYFAJrGNEg=7D,S=2000XXXXXX
WS=b_P2BQCaxjQAAN8yIQEAAAGYFDADiAAAoACTA5YyAOUwAeYADgAA51
WS=-vL2BQCaxjQAAN8_IQEAAADoFDADiAAAlgCJA5EyAOUxAiwADgAA4C
WZ=i7c1dwCaxjQAAN9EIQEAAAS-ClOLtzV3AJrGNEg=24,S=2000XXXXXX
WS=F_D2BQCaxjQAAN9aIQEAAAG5FDADiAAAnACOA44yAOUwA9UAGwAA1B
WZ=i7c1dwCaxjQAAN9nIQEAAAS_ClMX8PYFAJrGNEg=35,S=2000XXXXXX


However, no luck in decoding the string.

Your script seems nice though, I will try to get it to run on my QNAP NAS.and log to a file or otherwise (maybe even FHEM :-) )

Cheers

Martijn

Op zondag 26 augustus 2012 13:41:51 UTC+2 schreef akw het volgende:

duinsel

unread,
Oct 7, 2012, 7:03:18 AM10/7/12
to fhem-...@googlegroups.com
This is what I found out. Numbers are expressed in base64 instead of decimal.


WS=F_D2BQCaxjQAAIGkIQEAAADRFDADiAAAdABpA4kxAOcbAM4ANQAA94

   F_D2BQ                                                   System ID
              AAIG                                          Timestamp, base64, unit: 30s after 9:00 or 21:00
                      AAADR                                 Power related, probably voltage. base64, unit unknown, divide by 7 to get reasonable V
                                     BpA4k                  Power related, probably amps, base 64, unit unknown, divide by 8 x 10E6 to get reasonable A
                                          xAOc              AC related, bin64 related. Goes to AAAA if no grid. could be xA=V, Oc is freq?
         Caxj                                               Unknown, always there. Year, serial prefix, model inverter?
                  kIQE                                      Unknown. k varies, IQE constant.
                           FDADi                            Unknown
                                AAA                         Suspect error states. AAA=feeding grid, AMA/AEA error states undervoltage, no grid
                                              bAM4ANQAA94   Unknown. quite variable. Constant for a few minutes, different between inverters.
                                             
Missing: datestamp, AM/PM marker (time counter resets twice daily), AC power (unlikely), inverter temperature.


Op dinsdag 11 september 2012 22:50:32 UTC+2 schreef duinsel het volgende:

Arno Willig

unread,
Nov 23, 2012, 1:45:02 AM11/23/12
to fhem-users
Hi Martijn,

any progress on decoding the lines?

Ciao, Arno



2012/10/7 duinsel <vand...@gmail.com>
--
To unsubscribe from this group, send email to
fhem-users+...@googlegroups.com



--
Arno Willig <a...@thinkwiki.org>

Martijn van Duijn

unread,
Nov 23, 2012, 2:27:55 AM11/23/12
to fhem-...@googlegroups.com

Yes!

 

Most of the discussion ended up in a thread on the Navitron forum

 

http://www.navitron.org.uk/forum/index.php/topic,18276.90.html

 

I have written a simple perl script that pulls in data, and another guy wrote a .NET windows app that does the same and pushes data to PVOUtput. (Aloaha solar)

 

In a nutshell, the current interpretation is posted below. Not all is known, especially the timekeeping is not entirely clear to me (but we can timestamp with system time)

Some uncertainties remain, but I think we have gotten pretty close. We now have access to power, energy produced,DC volt, AC volt, DC amps, efficiency, invertertemperature, AC frequency.

 

I hope this is of use to you.

 

Best,

 

Martijn

 

 

WS=F_D2BQCaxjQAAIGkIQEAAADRFDADiAAAdABpA4kxAOcbAM4ANQAA94

 

   F_D2BQ                                                   System ID. Relation to serial unknown.

         Caxj                                               Unknown, always there. Year, serial prefix, model inverter?  

              AAIG                                          Timestamp, base64, unit: 30s, counts up in 12h and resets, but '0' time varies sometimes

                  k                                         k counts down 64->0 in ~ 8 min, linear with time and resets to 64. Somehow related to timekeeping.

                        IQE                                      Unknown. always there.                 

                      AAADR                                 Linear with time, 0 at no power. Uptime?

                           FDADi                            Unknown, constant

                                AAA                         Suspect error states. AAA=feeding grid, AMA/AEA error states undervoltage, no grid

                                   dA                       Current in base64, unit 2 mA                                     

                                     Bp                     Power(W) in base64

                                       A4k                  Efficiency in base64. Divide by 4000 to get fraction (0.9=90% efficient)

                                          x                 AC frequency base64 (x=49 y=50)

                                           AOc              AC voltage in base64, 0.25V units                                                      

                                              b             Temperature in base64(C)

                                               AM4          Cumulative DC power produced. 0.25 Wh units. Counter resets after 1 kWh.                                                         

                                                  AN        Increments monthly. Months since unit production date?  

                                                    QAA94   Unknown, characters change.

Reply all
Reply to author
Forward
0 new messages