]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index 7a8cafd943c334a2614964c4698558ad22bc27bf..770ab027861126a25dd79f970b5aa7e5a85767e2 100644 (file)
 
 
     
+    <div class="entry">
+      <div class="title"><a href="https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html">LinuxCNC MQTT publisher component</a></div>
+      <div class="date"> 8th January 2023</div>
+      <div class="body"><p>I watched <a href="https://yewtu.be/watch?v=jmKUV3aNLjk">a 2015
+video from Andreas Schiffler</a> the other day, where he set up
+<a href="https://linuxcnc.org/">LinuxCNC</a> to send status
+information to the MQTT broker IBM Bluemix.  As I also use MQTT for
+graphing, it occured to me that a generic MQTT LinuxCNC component
+would be useful and I set out to implement it.  Today I got the first
+draft limping along and submitted as
+<a href="https://github.com/LinuxCNC/linuxcnc/pull/2253">a patch to the
+LinuxCNC project</a>.</p>
+
+<p>The simple part was setting up the MQTT publishing code in Python.
+I already have set up other parts submitting data to my Mosquito MQTT
+broker, so I could reuse that code.  Writing a LinuxCNC component in
+Python as new to me, but using existing examples in the code
+repository and the extensive documentation, this was fairly straight
+forward.  The hardest part was creating a automated test for the
+component to ensure it was working.  Testing it in a simulated
+LinuxCNC machine proved very useful, as I discovered features I needed
+that I had not thought of yet, and adjusted the code quite a bit to
+make it easier to test without a operational MQTT broker
+available.</p>
+
+<p>The draft is ready and working, but I am unsure which LinuxCNC HAL
+pins I should collect and publish by default (in other words, the
+default set of information pieces published), and how to get the
+machine name from the LinuxCNC INI file.  The latter is a minor
+detail, but I expect it would be useful in a setup with several
+machines available.  I am hoping for feedback from the experienced
+LinuxCNC developers and users, to make the component even better
+before it can go into the mainland LinuxCNC code base.</p>
+
+<p>Since I started on the MQTT component, I came across
+<a href="https://yewtu.be/watch?v=Bqa2grG0XtA">another video from Kent
+VanderVelden where he combine LinuxCNC with a set of screen glasses
+controlled by a Raspberry Pi</a>, and it occured to me that it would
+be useful for such use cases if LinuxCNC also provided a REST API for
+querying its status.  I hope to start on such component once the MQTT
+component is working well.</p>
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+</div>
+      <div class="tags">
+        
+        
+        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="https://people.skolelinux.org/pere/blog/tags/linuxcnc">linuxcnc</a>, <a href="https://people.skolelinux.org/pere/blog/tags/robot">robot</a>. 
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title"><a href="https://people.skolelinux.org/pere/blog/ONVIF_IP_camera_management_tool_finally_in_Debian.html">ONVIF IP camera management tool finally in Debian</a></div>
       <div class="date">24th December 2022</div>
@@ -220,7 +276,7 @@ and Y to move accurately and reliably.  But while climbing up this
 rather steep learning curve, I discovered that some motor control
 systems are able to tune their PID controllers.  I got the impression
 from the documentation that LinuxCNC were not.  This proved to be not
-true</p>
+true.</p>
 
 <p>The LinuxCNC
 <a href="http://linuxcnc.org/docs/html/man/man9/pid.9.html">pid
@@ -385,7 +441,7 @@ activities, please send Bitcoin donations to my address
       <div class="tags">
         
         
-        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="https://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="https://people.skolelinux.org/pere/blog/tags/robot">robot</a>. 
+        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="https://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="https://people.skolelinux.org/pere/blog/tags/linuxcnc">linuxcnc</a>, <a href="https://people.skolelinux.org/pere/blog/tags/robot">robot</a>. 
         
         
       </div>
@@ -495,7 +551,7 @@ activities, please send Bitcoin donations to my address
       <div class="tags">
         
         
-        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="https://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="https://people.skolelinux.org/pere/blog/tags/robot">robot</a>. 
+        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="https://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="https://people.skolelinux.org/pere/blog/tags/linuxcnc">linuxcnc</a>, <a href="https://people.skolelinux.org/pere/blog/tags/robot">robot</a>. 
         
         
       </div>
@@ -690,56 +746,6 @@ Merk, betaling med bitcoin er ikke anonymt. :)</p>
     </div>
     <div class="padding"></div>
     
-    <div class="entry">
-      <div class="title"><a href="https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html">Publish Hargassner wood chip boiler state to MQTT</a></div>
-      <div class="date">12th March 2022</div>
-      <div class="body"><p>Recently I had a look at a
-<a href="https://www.hargassner.at/">Hargassner</a>
-<a href="https://www.hargassner.at/en/products/wood-chip-boiler.html">wood
-chip boiler</a>, and what kind of free software can be used to monitor
-and control it.  The boiler can be connected to some cloud service via
-what the producer call an Internet Gateway, which seem to be a
-computer connecting to the boiler and passing the information gathered
-to the cloud.  I discovered the boiler controller got an IP address on
-the local network and listen on TCP port 23 to provide status
-information as a text line of numbers.  It also provide a HTTP server
-listening on port 80, but I have not yet figured out what it can do
-beside return an error code.</p>
-
-<p>If I am to believe various free software implementations talking to
-such boiler, the interpretation of the line of numbers differ between
-type of boiler and software version on the boiler.  By comparing the
-list of numbers on the front panel of the boiler with the numbers
-returned via TCP, I have been able to figure out several of the
-numbers, but there are a lot left to understand.  I've located several
-temperature measurements and hours running values, as well as oxygen
-measurements and counters.</p>
-
-I decided to write a simple parser in Python for the values I figured
-out so far, and a simple MQTT injector publishing both the interpreted
-and the unknown values on a MQTT bus to make collecting and graphing
-simpler.  The end result is available from the
-<a href="https://gitlab.com/petterreinholdtsen/hargassner2mqtt">hargassner2mqtt
-project page</a> on gitlab.  I very much welcome patches extending the
-parser to understand more values, boiler types and software versions.
-I do not really expect very few free software developers got their
-hands on such unit to experiment, but it would be fun if others too find
-this project useful.</p>
-
-<p>As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
-</div>
-      <div class="tags">
-        
-        
-        Tags: <a href="https://people.skolelinux.org/pere/blog/tags/english">english</a>. 
-        
-        
-      </div>
-    </div>
-    <div class="padding"></div>
-    
     <p style="text-align: right;"><a href="index.rss"><img src="https://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
     <div id="sidebar">
       
@@ -748,6 +754,13 @@ activities, please send Bitcoin donations to my address
 <h2>Archive</h2>
 <ul>
 
+<li>2023
+<ul>
+
+<li><a href="https://people.skolelinux.org/pere/blog/archive/2023/01/">January (1)</a></li>
+
+</ul></li>
+
 <li>2022
 <ul>
 
@@ -1160,7 +1173,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
 
- <li><a href="https://people.skolelinux.org/pere/blog/tags/debian">debian (184)</a></li>
+ <li><a href="https://people.skolelinux.org/pere/blog/tags/debian">debian (185)</a></li>
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (159)</a></li>
 
@@ -1174,7 +1187,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="https://people.skolelinux.org/pere/blog/tags/english">english (440)</a></li>
+ <li><a href="https://people.skolelinux.org/pere/blog/tags/english">english (441)</a></li>
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
 
@@ -1202,6 +1215,8 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
 
+ <li><a href="https://people.skolelinux.org/pere/blog/tags/linuxcnc">linuxcnc (4)</a></li>
+
  <li><a href="https://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
@@ -1236,7 +1251,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
 
- <li><a href="https://people.skolelinux.org/pere/blog/tags/robot">robot (16)</a></li>
+ <li><a href="https://people.skolelinux.org/pere/blog/tags/robot">robot (17)</a></li>
 
  <li><a href="https://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>