{"id":706,"date":"2023-06-02T15:51:49","date_gmt":"2023-06-02T14:51:49","guid":{"rendered":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/?p=706"},"modified":"2023-06-17T10:12:49","modified_gmt":"2023-06-17T09:12:49","slug":"updating-emonpi-to-continuous-monitoring","status":"publish","type":"post","link":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/updating-emonpi-to-continuous-monitoring\/","title":{"rendered":"Updating EmonPi to Continuous Monitoring"},"content":{"rendered":"<p>Continuous monitoring with the Open Energy Monitor EmonPi hardare us now possible (since Feb 2023), see: <a href=\"https:\/\/docs.openenergymonitor.org\/emonpi\/firmware.html\">https:\/\/docs.openenergymonitor.org\/emonpi\/firmware.html<\/a>. This gives a more accurate measurement of power than sampling at time intervals.<\/p>\n<p>Unfortunately, the process is incompletely documented there and the forum contains several threads which contain errors, distractions, and diversions alongside the information to make the firmware update work. I certainly had to spend time disentangling things to arrive at what is actually a simple procedure, although the forum was a source of some trepidation. Also: do not be tempted into the compilation process described on that firmware web page.<\/p>\n<p><em>NB: what follows is based on my EmonPi setup. I believe some details will be different for EmonTX + EmonBase setup.<\/em><\/p>\n<p>First, ensure that your system is up to date using <strong>Setup &gt; Admin &gt; Update: Full Update<\/strong>. This does not change the firmware, but will change what you see available in the Update Firmware Only section. Once updated, you can select options in the drop-down lists in the Update Firmware Only. My hardware is an emonPi and I opted for the &#8220;RFM68 LowPowerLabs&#8221; radio format (as recommended). Upon hitting the &#8220;Update Firmware&#8221; button, various messages will appear in the log.<\/p>\n<p>Once it has completed, you will see that there are no updates in <strong>Setup &gt; Inputs<\/strong> or <strong>Setup &gt; EmonHub<\/strong>. This is because the baud rate and message format have changed. In <strong>Setup &gt; EmonHub<\/strong>, use the &#8220;Edit config&#8221; button to fix this. Changes to two sections are required.<\/p>\n<p>Under &#8220;[interfacers]&#8221; will be an entry which seems to have gone under different names at different times and\/or different hardware configurations. If you have an emonPi, look for the section which contains &#8220;com_baud = 38400&#8221;, &#8220;pubchannels = ToEmonCMS&#8221;, and &#8220;baseid = 5&#8221;. Mine is identified as [[RFM2Pi]]. If you do not have an emonPi then a different baseid will apply. I only changed the com_baud from 38400 to 115200. Leave the rest alone!<\/p>\n<p>Scroll down and find, under &#8220;[nodes]&#8221;, a section &#8220;[[5]]&#8221; (matches the baseid above). Leave the &#8220;nodename&#8221; entry as it is but modify the lines under &#8220;[[[rx]]]&#8221; to read:<\/p>\n<blockquote><p>names = Msg, power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulse1count,pulse2count,E1,E2<br \/>\ndatacodes = L, h, h, h, h, h, h, h, h, h, h, L, L, l, l<br \/>\nscales = 1, 1,1,1, 0.01, 0.01,0.01,0.01,0.01,0.01,0.01, 1, 1, 1,1<br \/>\nunits = n,W,W,W, V, C,C,C,C,C,C, p, p, Wh,Wh<\/p><\/blockquote>\n<p>Note that the scales line can be used to adjust the power values and Vrms which the emonPi records to accomodate systematic errors due to component tolerances; the text quoted above assumes that this calibration has not been done.<\/p>\n<p>I found that simply saving the config and then using the &#8220;View log&#8221; button showed this worked. Some people state that EmonHub should be restarted, but I did not find this was needed.<\/p>\n<p>Make a final check that things are working by visiting <strong>Setup &gt; Inputs<\/strong> and looking at graphs, visualisation, your app etc. At this point, you might note that there are now two new attributes in the input data: E1 and E2. Unfortunately (again, argh!), the meaning of these (vs the pre-existing power1 and power2) is not properly documented and mentions in the forums are often roundly uninformative.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuous monitoring with the Open Energy Monitor EmonPi hardare us now possible (since Feb 2023), see: https:\/\/docs.openenergymonitor.org\/emonpi\/firmware.html. This gives a&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,1],"tags":[],"class_list":["post-706","post","type-post","status-publish","format-standard","hentry","category-open-energy-monitor","category-uncategorized","post-archive"],"_links":{"self":[{"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":3,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/posts\/706\/revisions\/709"}],"wp:attachment":[{"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hilltop-cottage.info\/blogs\/adam\/wp-json\/wp\/v2\/tags?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}