The StromLog is working by a RISC-Chip with WIFI support (ESP8266). The main function is to receive the protocols from meter as a SML-decoded digital data-stream. According of the meter-explanations from manufacturer will the StromLog extract delivered values.
For sending into an URL, those are two different protocols. One protocol is designed for a PHP-Script. This script received every values by http post. The other transmission is designed for influx database. Also the influx transmission is sending by post. Only the protocol-details are different.
For both protocols, data will be sending every quarter hour from StromLog to target-URL (0, 15, 30 and 45 min). Those are 96 protocols per day.
We using to sending encrypted data if the StromLog recognised in the target-URL a string like "encrypt". All data will be encrypt by hash-key created from user-name and password. The post-values are sending as usid and the encrypted data as data.
usid=userID&data=‹encrypted data coded by base64 are put into here›
The function sending encrypted data works just with PHP-Script. The calculation of hash key, what is using to encrypt data, we don't want to public it. Sorry for this inconvenience. By the way, if you use your own server into your own net, then isn't important to encrypt data, because the data don't will be send over external providers. The function to calculate the hash-key for encryption is an one way key and will drop bits in its calculations. Sorry, that we don't want to public our encryption functions!
If the StromLog recognised a string like "xyz.php" in the target-URL-string then it will be sending data to a php-script. Otherwise it's sending according influx-protocol.
Post-values are:
timestamp=actual timestamp by StromLog (seconds since 1970-1-1)
usid=userID what you input into the StromLog
bez1=actual value of actual meter-count for from-grid sum rate(dWh)
bez2=actual value of actual meter-count for from-grid rate one(dWh)
bez3=actual value of actual meter-count for from-grid rate two(dWh)
eeg1=actual value of actual meter-count for into-grid rate one(dWh)
pwa= actual consumption (W)
ul1=actual voltage of L1 (dV)
ul2=actual voltage of L2 (dV)
ul3=actual voltage of L3 (dV)
il1=actual curent of L1 (cA)
il2=actual curent of L2 (cA)
il3=actual curent of L3 (cA)
frq=actual Frequency from grid (dHz)
ip=the IP from StromLog in your isolated private net
dtzma=the meter-manufacture
dtzid=the meter identification-number
dtzname=the meter-name that your input into the StromLog-setup
All values from meter are sending as integer. The others as string.
Exemple: timestamp=1234567890; userID=123456789; bez1=4000000; bez2=1000000; bez3=3000000; eeg=2000000; pwa=109; ul1=23000; ul2=24000; ul3=22500; il1=10000; il2= 15000; il3=12000; frq=500; ip=0.0.0.127; dtzma=484c5; dtzid=00000A01484C59020001FDFF; dtzname=yourMeterName
Return-value comes from php-script is: "OK‹br›" and as http-status: 200 or what your script returned.
All this data are sending to the xyz.php. The php-script has to receive all those values and can save it into your database, if you want to use your own database. You can provide your own server, like a raspberry pi or everything else.
When no "xyz.php" into the target-URL is recognised all data will be sending as an InFlux-string.
Also all values are sending by http-post.
Those are two different values-types. The first one are immutable values, separated from the changeable values by space. Attentions: It is possible to put a space into the dtzname-value, but in this protocol that will be create an insufficient error in the protocol! The reason is, that influx used the space as an separator between immutable and changeable values. To avoid it, don't use a space in your meter-name (dtzname).
Immutable values are:
usid=ID
ip=local IP from StromLog
dtzma=manufacturer
dtzid=meter-ID
dtzname=your meter-name that your input into your StromLog
--- Now it's a space to separate immutable values from changeable values ---
pwa=actual power consumption between fromgrid and intogrid (W)
bez1=fromgrid sum divided by 10000 (kWh)
bez2=fromgrid rate one divided by 10000 (kWh)
bez3=fromgrid rate two divided by 10000 (kWh)
eeg1=intogrid divided by 10000 (kWh)
ul1=voltage L1 divided by 10 (V)
ul2=voltage L2 divided by 10 (V)
ul3=voltage L3 divided by 10 (V)
il1=consumption divided by 100 (A)
il2=consumption divided by 100 (A)
il3=consumption divided by 100 (A)
frq=frequency divided by 10 (Hz)
timestamp=actual time from StromLog (seconds since 1970-1-1)
All values those are divided by, are sending as type float with dot into it.
Example:
URL:yourURL or Server
POST:meinzaehler,usid=123456789,ip=0.0.0.127,dtzma=484c5,dtzid=00000A01484C59020001FDFF,dtzname=MeinZähler
(space)pwa=250.40,bez1=345.45,bez2=145.00,bez3=200.45,eeg=122.33,ul1=230.15,ul2=240.11,ul3=225.88,il1=1.05,il2=2.35,il3=5.55,frq=49.9,timestamp=1234567890
Return-value from influx is empty and as http-status: 204
Influx-Example diagram:
If you want to integrate the StromLog into your own system, you have the following option. When you call the StromLog by parameter http://IP-address/currentData, you get all values as a JSON string, like this:
{"timestamp":1652220254,"meterData":{"consumption":{"value":83,"unit":"W"},"FromGridSum":{"value":414062304,"unit":"dWh"},"FromGridA":{"value":0,"unit":"dWh"},"FromGridB":{"value":414062304,"unit":"dWh"},"FeedIn":{"value":0,"unit":"dWh"}},"electricsData":{"voltageL1":{"value":0,"unit":"dV"},"voltageL2":{"value":0,"unit":"dV"},"voltageL3":{"value":0,"unit":"dV"},"currentL1":{"value":0,"unit":"dI"},"currentL2":{"value":0,"unit":"dI"},"currentL3":{"value":0,"unit":"dI"},"freq":{"value":0,"unit":"dHz"}}}
or you can get all entries by GET http://IP-address/allData, than you get everything, like this:
{"userid":9,"meter":{"localip":"192.168.10.54","metername":"Messung Computerplatz","manufacturer":"EMH","meterid":"0000000004039FC8DE585E91"},"currentData":{"timestamp":1652220397,"meterData":{"consumption":{"value":84,"unit":"W"},"FromGridSum":{"value":414062338,"unit":"dWh"},"FromGridA":{"value":0,"unit":"dWh"},"FromGridB":{"value":414062338,"unit":"dWh"},"FeedIn":{"value":0,"unit":"dWh"}},"electricsData":{"voltageL1":{"value":0,"unit":"dV"},"voltageL2":{"value":0,"unit":"dV"},"voltageL3":{"value":0,"unit":"dV"},"currentL1":{"value":0,"unit":"dI"},"currentL2":{"value":0,"unit":"dI"},"currentL3":{"value":0,"unit":"dI"},"freq":{"value":0,"unit":"dHz"}}}}
This is available from Version 3.9 and higher (2022-05-01)
You can included into many systems, via polling service. Call the WEB-service and decode the JSON answer. In this case, the used-ID should be set as zero (0), but also you can used your own server and our service together too.
When you set the user-name as "sendJSON" then will be send the StromLog every quarter hour the JSON, like you get by option "/allData", to the registered address at field "Daten-Server". That is your server, where can decode the JSON and saving in your database.
Add in the "configuration.yaml" behind the entry "sensor:" following entries for the StromLog entireties. If there no entry "sensor:" then you have to add it before!
Only available from version: 3.9x of StromLog. Exchange "your.ip.of.stromlog" in the config below with your IP-address of StromLog from your network.
Config-Data:
Only available from version: 5.04 of StromLog.
Der StromLog empfängt und dekodiert die Zählerdaten von allen unterstützten Zählern. Diese werden dann im(W)LAN als JSON-String für den ioBoker bereitgestellt. Damit ist jeder Zähler, der durch den StromLog ausgelesen wird, kann auch mit dem ioBroker ausgelesen werden. Und das über WLAN ohne USB- oder Serial-Kabel.
Im ioBroker ist die URL "STROMLOGIP/json.txt" mit der Option "JSON-Format for EFR SmartGridHunb" ohne Nutzer und Passwort einzutragen. Dann können die Daten im ioBroker ausgelesen werden.
- Der JSON String für den ioBroker ist so aufgebaut:
Einstellungen / Visualisierung:
The hardware based on a chip ESP8266. This MC receive on the serial-port the data-stream from meter. The meter transmit its data per IR-light continuously every 1..60 seconds. Our IR optocoupler receive this IR light and exchange it for a serial stream in order to send it to the serial interface of the MC. The MC decode this stream and collect some selected values. After decoding values it will prepare for send to our or your database, using http-protocol. That happens every quarter hour. In result there are 96 http-protocols per day.
Circuit diagram (only for mME):
The last but not actual software can you find and download here:
Description and software for Arduino.
Important to know, all encryption functions we don't public it and is not part of our publishings... sorry. Without encryption isn't without contact to us impossible to use our data base and you have to use your own data base server. In additions we can provide our service without encrypted protocols too, but we have to programming an extra entry. If you want it, then must you contact us by email. Attention, then could it be that we demand some cost from you, for our service.
All the data above and it's protocols, we are using to provided for all users just his own data and save the values into our database. Our goal is it to provided the values to show and displayed for you without to managed your own server. The only thing is it, for your cheap cost we managed your data collect for grid optimization and database-cost, but without relation to the single user. The user-private-data are just for this user!
System-Overview