baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, … REST API curl examples – Smart Meter for KAMSTRUP DK-8660 – EV solar charging – PV Überschussladen

For API documentation see and/or

Current energy usage (update every minute for free *or* every second for a small subscription fee or a one time payment, see …. also updates each second while running smart-me mobile app or website live data):

curl -s --user "username:password" -H "Accept: application/json" ""

example output:




means 2623.0 Watt, i.e. 1-0:1.7.0*255 is what you are looking for (see Obis Codes). You can use jq to parse it, e.g.

curl -s --user "username:password" -H "Accept: application/json" "" | jq -r '.Values[] | select(.Obis == "1-0:1.7.0*255") | .Value'


for 2623 Watt …

Interesting Obis Codes:

1-0:1.7.0*255 Active Power Total (W)
1-0:32.7.0*255 Voltage Phase L1 (V)
1-0:52.7.0*255 Voltage Phase L2 (V)
1-0:72.7.0*255 Voltage Phase L3 (V)
1-0:11.7.0*255 Current Total (A)
1-0:31.7.0*255 Current Phase L1 (A)
1-0:51.7.0*255 Current Phase L2 (A)
1-0:71.7.0*255 Current Phase L3 (A)

Counter totals (updated once per minute):

curl -s --user "username:password" -H "Accept: application/json" ""

or simply:

curl -s --user "username:password" -H "Accept: application/json" "$(date --iso-8601=ns | cut -d ',' -f 1)Z"

username:password are your credentials, and a1b1c1d1-abcd-1234-abcd-a1b2c3d4e5f6 is the GUID of your smart meter. You can obtain it by inspecting the network traffic in their web view.

This is what website is doing for their live view (needs login and /tmp/smart-me/cookies.txt set accordingly):

curl --cookie /tmp/smart-me/cookies.txt '' \
-H 'authority:' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98"' \
-H 'accept: application/xml, text/xml, */*; q=0.01' \
-H 'dnt: 1' \
-H 'x-requested-with: XMLHttpRequest' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer:' \
-H 'accept-language: de-DE,de;q=0.9,en;q=0.8,en-US;q=0.7,nl;q=0.6,da;q=0.5,fr;q=0.4,nb;q=0.3,es;q=0.2,it;q=0.1,lb;q=0.1' \
--compressed \

which would return:

Another alternative is creating a public link inside smart-me clientarea which creates html iframe for your meter, which itself is updating via repeated calls to which will return XML that looks like this:

Comments are currently closed.