{"id":523,"date":"2022-12-29T23:33:56","date_gmt":"2022-12-29T22:33:56","guid":{"rendered":"https:\/\/techblog.vindvejr.dk\/?p=523"},"modified":"2022-12-30T10:46:43","modified_gmt":"2022-12-30T09:46:43","slug":"meter-readings-from-kamstrup-omnimeter-with-pow-k","status":"publish","type":"post","link":"https:\/\/techblog.vindvejr.dk\/?p=523","title":{"rendered":"Meter readings from Kamstrup Omnimeter with Pow-K+"},"content":{"rendered":"\n<p>Today I finally received my <a rel=\"noreferrer noopener\" href=\"https:\/\/amsleser.no\/hjem\/1-pow-k-kamstrup.html\" target=\"_blank\">Pow-K+<\/a> HAN port reader which I ordered before Christmas as a gift to myself. Also before Christmas, I prepared for this project by sending an e-mail to N1 (my power grid company) requesting the needed encryption keys. Shortly after, I received my GPK 60 and GPK 61 keys and information that they had activated the HAN port on my power meter.<\/p>\n\n\n\n<p>The waiting time was hard, but worth it. I have been very excited about this product, and now I need to share why.<\/p>\n\n\n\n<p>Inside the envelope I found my board:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"994\" src=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-1024x994.jpg\" alt=\"\" class=\"wp-image-525\" srcset=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-1024x994.jpg 1024w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-300x291.jpg 300w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-768x745.jpg 768w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-1536x1491.jpg 1536w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1-309x300.jpg 309w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-front-1.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Front<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1019\" src=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-1024x1019.jpg\" alt=\"\" class=\"wp-image-526\" srcset=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-1024x1019.jpg 1024w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-300x300.jpg 300w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-150x150.jpg 150w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-768x764.jpg 768w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-1536x1528.jpg 1536w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back-302x300.jpg 302w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-back.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Back<\/figcaption><\/figure>\n\n\n\n<p>I immediately realized that I must have made a mistake when I placed my order, since I didn&#8217;t have anything to hold or cover this board. Luckily, the STL file for the 3D model is freely available. So I asked a friend for help, who happens to be quite proficient and well-equipped when it comes to 3D printing. So a few hours later I could pick up a nice holder for the board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation<\/h2>\n\n\n\n<p>In the meantime I had also received confirmation that this board doesn&#8217;t need power from an external source, so can simply be plugged in. Like this (the cable on the picture is not related to this module):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"1024\" src=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed-760x1024.jpg\" alt=\"\" class=\"wp-image-527\" srcset=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed-760x1024.jpg 760w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed-223x300.jpg 223w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed-768x1035.jpg 768w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/pow-k-installed.jpg 800w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><figcaption class=\"wp-element-caption\">HAN module installed<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration<\/h2>\n\n\n\n<p>And now the impressive part &#8211; the configuration. Through the big hole seen on the picture a small button is accessible. After holding it for a few seconds, the module created its own access point, and I could connect to it and make the initial Wi-Fi configuration from my phone (remembering 192.168.4.1 which I had read in the documentation earlier). So I configured my IoT SSID and nothing more, since I planned to assign a static IP from my DHCP server later when knowing its MAC address.<\/p>\n\n\n\n<p>After restarting from this initial configuration, it connected to my Wi-Fi and I could now go to my PC and finish the configuration (and also restart it after configuring a fixed IP address on my router). This required only very few steps, like entering the GPK 60 key as &#8220;Encryption key&#8221; and the GPK 61 key as &#8220;Authentication key&#8221;. I also had to select parity, which for Denmark is 8N1. Already at this point I was able to see some useful live data on the main webpage. Literally it was fully working and showing data within a few minutes from plugging it in for the first time.<\/p>\n\n\n\n<p>Now it was time to configure MQTT so I could integrate the meter with my home automation and start logging values in my database. So I went to the MQTT configuration page and entered the hostname of my MQTT broker, a publish topic (I chose &#8220;omnimeter&#8221;) and &#8220;Raw values (minimal)&#8221; as payload. That&#8217;s it. On my openHAB server, which is also hosting mosquitto, I could then have a peek at the published data:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\nmosquitto_sub -h localhost -t omnipower\/# -d\n<\/pre><\/div>\n\n\n<p>So with a few more minutes of configuration in openHAB, I started to receive the data I have been so eager to get access to. Like this &#8211; from log perspective:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2022-12-29 22:59:52.667 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_RSSI' changed from -61 dBm to -62 dBm\n2022-12-29 23:00:02.716 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Phase3_Voltage' changed from 238 V to 237 V\n2022-12-29 23:00:02.730 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Active' changed from 540 W to 563 W\n2022-12-29 23:00:07.901 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Accumulated' changed from 14510.99 kWh to 14511.57 kWh\n2022-12-29 23:00:07.928 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Active' changed from 563 W to 499 W\n2022-12-29 23:00:14.096 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Active' changed from 499 W to 569 W\n2022-12-29 23:00:22.610 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Omnipower_Active' changed from 569 W to 520 W\n<\/pre>\n\n\n\n<p>For now, no graphs, just integration. And a sitemap as seen from the openHAB Android app:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"989\" src=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap-1024x989.png\" alt=\"\" class=\"wp-image-528\" srcset=\"https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap-1024x989.png 1024w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap-300x290.png 300w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap-768x742.png 768w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap-311x300.png 311w, https:\/\/techblog.vindvejr.dk\/wp-content\/uploads\/2022\/12\/sitemap.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Sitemap<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>I&#8217;m very impressed by this product because it just works, and without any issues when installing and configuring it. Meter configuration, Wi-Fi configuration and even MQTT just worked without any hassle or problems. Thank you Egil Opsahl and Gunnar Skjold for making this possible, and I can only give my warm recommendation of this product.<\/p>\n\n\n\n<p>Oh, I forgot to mention that Pow-K+ will receive data every 10 seconds and can be purchased for approximately a third of the price of a SmartMe HAN module which has a cloud dependency (basically making it an inferior product). And it&#8217;s Open Source!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I finally received my Pow-K+ HAN port reader which I ordered before Christmas as a gift to myself. Also before Christmas, I prepared for this project by sending an e-mail to N1 (my power grid company) requesting the needed &hellip; <a href=\"https:\/\/techblog.vindvejr.dk\/?p=523\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,13],"tags":[],"class_list":["post-523","post","type-post","status-publish","format-standard","hentry","category-iot","category-openhab"],"_links":{"self":[{"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=523"}],"version-history":[{"count":2,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":530,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions\/530"}],"wp:attachment":[{"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techblog.vindvejr.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}