<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Henri Bergius - Desktop</title>
    <description>Latest posts in category 'desktop'</description>
    <link>https://bergie.iki.fi</link>
    <language>en</language>
    <lastBuildDate>Sat, 05 Sep 2026 08:10:26 +0000</lastBuildDate>
    
    <item>
      
      <title>I changed my license</title>
      <description>&lt;p&gt;In the last 28 years of publishing software, I’ve had three distinct eras of software licensing. All of my recent stuff is available under the European Union Public License 1.2, and I thought to explain why.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://midgard-project.org/&quot;&gt;Midgard&lt;/a&gt; was all LGPLv2. This was a simpler time, and there weren’t that many free software licenses around. Since Midgard was a web framework, using a weak copyleft license felt like the right thing to do. The example website shipping with Midgard was X11 licensed.&lt;/p&gt;

&lt;p&gt;When I started working more &lt;a href=&quot;https://bergie.iki.fi/blog/the_universal_runtime/&quot;&gt;seriously with JavaScript&lt;/a&gt; around 2011, I switched to the MIT license. This was a “do whatever you like, just don’t sue me” sort of a simple affair favored by the NPM package ecosystem. Easy interoperability, no hooks attached.&lt;/p&gt;

&lt;p&gt;After we closed &lt;a href=&quot;https://bergie.iki.fi/blog/flowhub-ug/&quot;&gt;Flowhub&lt;/a&gt;, there were a few years of hiatus where I published almost no software. Either because it wasn’t feasible due to my work situation, or because I was busy with the boat.&lt;/p&gt;
&lt;h2 id=&quot;enter-eupl&quot;&gt;Enter EUPL&lt;/h2&gt;

&lt;p&gt;This year I decided to switch my “default license” to &lt;a href=&quot;https://interoperable-europe.ec.europa.eu/collection/eupl&quot;&gt;EUPL-1.2&lt;/a&gt;. This is an OSI-approved free software license created and published by the European Union. And it is quite a divergence from the licenses I’ve used in the past. EUPL is a strong copyleft license that closes the “SaaS loophole” by requiring reciprocal licensing regardless of how the software is distributed.&lt;/p&gt;

&lt;p&gt;Over the years it has been clear that we in the “open source” camp (as opposed to the “free software” camp) were wrong all along. We won the debate, and gained little for users or developers. All that our efforts did was to make it easier for big corporations build things more cheaply and for billionaires to become trillionaires.&lt;/p&gt;

&lt;p&gt;And so it is time to stop messing about with permissive licenses. If corporations don’t want to use our software under our terms, they are free to spend the effort or tokens to build their own.&lt;/p&gt;

&lt;p&gt;The fact that EUPL has legally valid official &lt;a href=&quot;https://interoperable-europe.ec.europa.eu/collection/eupl/eupl-text-eupl-12&quot;&gt;translations to 23 languages&lt;/a&gt; also doesn’t hurt in a world where most of software is built and used in the wider world outside of the Valley.&lt;/p&gt;

&lt;p&gt;Here are some things I’ve already published under EUPL:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://reticulum.js.org/&quot;&gt;reticulum-js&lt;/a&gt;: JavaScript implementation of the Reticulum mesh networking protocol&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/bergie/dacar&quot;&gt;dacar&lt;/a&gt;: decentralized authorization system built on Reticulum&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/meri-imperiumi/signalk-energy-predictor&quot;&gt;signalk-energy-predictor&lt;/a&gt;: prediction system for boats powered by renewable energy&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.npmjs.com/package/@meri-imperiumi/signalk-offshore-blogging&quot;&gt;offshore-blogging-system&lt;/a&gt;: tool for publishing blog posts and downloading weather data over InReach satellite text messages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition the new rewrite of &lt;a href=&quot;https://github.com/noflo/noflo-ui/tree/next&quot;&gt;NoFlo Development Environment&lt;/a&gt; is being made under EUPL. &lt;a href=&quot;https://noflojs.org/&quot;&gt;NoFlo&lt;/a&gt; itself will remain MIT-licensed, as it is a pre-existing project with plenty of 3rd party contributions.&lt;/p&gt;
</description>
      <pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Feupl%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/eupl/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/eupl/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Reticulum is interesting</title>
      <description>&lt;p&gt;It all started innocently enough: sometime last summer, I ran into the blog post &lt;a href=&quot;https://bowshock.nl/irc/&quot;&gt;Start your own Internet Resiliency Club&lt;/a&gt; on Hacker News.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;…communicate with each other across a few kilometers without any centralized infrastructure using cheap, low-power, unlicensed LoRa radios and open source Meshtastic text messaging software.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The idea of a local, infrastructure-free communications mesh sounded useful, especially as we were about to &lt;a href=&quot;https://lille-oe.de/2026/&quot;&gt;sail into the Pacific&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;meshtastic&quot;&gt;Meshtastic&lt;/h2&gt;

&lt;p&gt;While conflicts and natural disasters are hopefully far away, on the smaller atolls there is no cellular network. With &lt;a href=&quot;https://meshtastic.org/&quot;&gt;Meshtastic&lt;/a&gt; we could communicate over LoRa.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/meshtastic-bequia.png&quot; alt=&quot;Using Meshtastic on a boat&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Over the hurricane season, the &lt;a href=&quot;https://blog.noforeignland.com/off-grid-boat-communications-with-meshtastic/&quot;&gt;Meshtastic setup became quite extensive&lt;/a&gt;. Our boat has a Meshtastic node, plus a mast-mounted solar repeater. We both have Meshtastic cards that we carry with us. With these we can communicate with text messages over quite a long distance. And we get telemetry and alerts from the boat.&lt;/p&gt;

&lt;p&gt;In Cartagena, Colombia we could hear the boat pretty much across the city. And since some of our buddy boats also run Meshtastic, we’ve even had conversations while offshore.&lt;/p&gt;

&lt;p&gt;While the existing Meshtastic setup is serving us well, there is always room for improvement and new ideas.&lt;/p&gt;

&lt;h2 id=&quot;reticulum&quot;&gt;Reticulum&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://reticulum.network&quot;&gt;Reticulum&lt;/a&gt; is a project that seeks to take this to a whole new level. It is a whole decentralized networking stack that allows anything from instant messaging and voice calls to full-on SSH sessions to be carried over a multitude of different interfaces. You can transport Reticulum over LoRa, Bluetooth, and also over regular TCP/IP networks. And if authorities didn’t take a dim view on encryption in ham radio, it would also work over our HF radio. With store-and-forward mechanisms it can deal with intermittent connectivity.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Because your identity is portable, your connectivity can be fluid. You can be sitting at a desk connected to a fiber backbone one moment, and walking through a field connected only to a long-range LoRa mesh the next. To the rest of the network, nothing has changed. Your friends do not need to update your contact info. The messages they send do not bounce back. The network senses the shift in the medium and reroutes the flow of data automatically.&lt;br /&gt;
You are no longer a stationary node in a fixed grid. You are a wanderer in a fluid medium.&lt;br /&gt;
- &lt;a href=&quot;https://reticulum.network/manual/zen.html&quot;&gt;The Zen of Reticulum&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As it stands now, Reticulum is still quite an early system with rudimentary and tech-heavy user interfaces. But that seems to be about to change: the &lt;a href=&quot;https://columba.network/&quot;&gt;Columba app&lt;/a&gt; for Android seems about as user-friendly as Meshtastic or something like Signal. There’s a lot of potential in that once it reaches a stable version.&lt;/p&gt;

&lt;h2 id=&quot;distributed-development-over-reticulum&quot;&gt;Distributed development over Reticulum&lt;/h2&gt;

&lt;p&gt;In the meanwhile, there is one aspect of Reticulum we developers can benefit from immediately: &lt;a href=&quot;https://reticulum.network/manual/distributed.html&quot;&gt;Distributed development&lt;/a&gt;. With it, any rngit node running on Reticulum can be your “GitHub”. Git history, issue tracking, release distribution is already there.&lt;/p&gt;

&lt;p&gt;I recently switched my various programming projects over. We have rngit running on the boat NAS, and VPS running a mirror behind more consistent connectivity. And for now I also mirror the work periodically to GitHub for backwards compatibility.&lt;/p&gt;

&lt;h2 id=&quot;reticulum-for-software&quot;&gt;Reticulum for software&lt;/h2&gt;

&lt;p&gt;What I think is worthwhile to explore is having machines interface with Reticulum. Just like we can tell our boat to switch lights on via a Meshtastic message, we should be able to do the same with Reticulum. And maybe there should be a NomadNet “site” for the boat showing status of the various systems.&lt;/p&gt;

&lt;p&gt;Going further, maybe boats could share chart data, depth soundings, weather information with each other over this. The promise of VDES, but built from the grassroots perspective.&lt;/p&gt;

&lt;p&gt;And maybe things like &lt;a href=&quot;https://noflojs.org&quot;&gt;NoFlo&lt;/a&gt; should be able to communicate over Reticulum? Reticulum implementations exist for multiple programming languages, but for this we’d need a JavaScript port.&lt;/p&gt;

&lt;p&gt;There’s still a lot to study and to think about. Watch this space. Last time I noted that &lt;a href=&quot;https://bergie.iki.fi/blog/flow-based-programming-is-interesting/&quot;&gt;something is interesting&lt;/a&gt;, it took me to a ten year rabbit hole.&lt;/p&gt;
</description>
      <pubDate>Sat, 04 Jul 2026 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Freticulum-is-interesting%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/reticulum-is-interesting/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/reticulum-is-interesting/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Development dependencies considered harmful</title>
      <description>&lt;p&gt;Time is a precious resource for open source maintainers, especially if you aren’t doing it as part of paid work. The constant churn of changing development tools steals a huge chunk of that time.&lt;/p&gt;

&lt;p&gt;For example, I’m running &lt;a href=&quot;https://noflojs.org&quot;&gt;NoFlo&lt;/a&gt; on a daily basis, but do changes to the library itself quite rarely. There were nearly six years between releases recently.&lt;/p&gt;

&lt;p&gt;The other day I wanted to add some functionality, and ran immediately to a huge set of issues with the development tooling we use. Basically everything we rely on is deprecated and has a huge set of security issues. Just to show some:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Karma&lt;/em&gt;, which we use to run browser tests &lt;a href=&quot;https://github.com/karma-runner/karma#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes&quot;&gt;is deprecated since 2023&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;eslint&lt;/em&gt; has made a huge backwards incompatible release, and the AirBnB rules we use &lt;a href=&quot;https://github.com/airbnb/javascript/issues/2961&quot;&gt;haven’t been carried over&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On top of these our test runner, the assertion library, coverage checker, etc all have major releases out. Not upgrading means having a growing list of security warnings on every install. At worse they may affect the security of your development machine and CI environment.&lt;br /&gt;
Now, to be fair, many of these projects do provide recommendations for the path forward.&lt;br /&gt;
And yet, upgrading means spending hours or even days just shoveling. And you just wanted to add a feature or fix a bug.&lt;/p&gt;

&lt;p&gt;In the modern world you could probably direct an AI agent to fix these things. But even then, wouldn’t those precious tokens be better used for the actual work you wanted to do? And when updating the development tooling past breaking changes, who knows what sort of subtle changes in behavior there are? Somebody still needs to have an overall understanding on how things work.&lt;/p&gt;

&lt;p&gt;This constant churn is a good example of &lt;a href=&quot;https://therealitydrift.substack.com/p/reality-drift-in-everyday-life&quot;&gt;reality drift&lt;/a&gt;, things just needing more constant attention and maintenance.&lt;/p&gt;

&lt;h3 id=&quot;batteries-included&quot;&gt;Batteries included&lt;/h3&gt;

&lt;p&gt;So, what’s the solution? Some sort of digital minimalism. Maybe it is best to accept less tooling and automation, and rely on things that come with your platform.&lt;/p&gt;

&lt;p&gt;Node.js now has a &lt;a href=&quot;https://nodejs.org/learn/test-runner/using-test-runner&quot;&gt;built-in test runner&lt;/a&gt;. This removes a couple of development dependencies.&lt;/p&gt;

&lt;p&gt;With Deno you could go even further and rely on their &lt;a href=&quot;https://docs.deno.com/runtime/reference/cli/lint/&quot;&gt;built-in linter&lt;/a&gt; and &lt;a href=&quot;https://docs.deno.com/runtime/reference/cli/fmt/&quot;&gt;formatter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Skipping any build steps seems like a reasonably safe bet. Just write standard JavaScript &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules&quot;&gt;using modules&lt;/a&gt;, and it’ll run everywhere as-is for the foreseeable future.&lt;br /&gt;
If you want type safety, &lt;a href=&quot;https://thathtml.blog/2025/12/nuances-of-typing-with-jsdoc/&quot;&gt;use JsDoc to add types&lt;/a&gt; to the JavaScript code directly.&lt;/p&gt;

&lt;p&gt;For browser applications, rely on the platform. &lt;a href=&quot;https://jakelazaroff.com/words/web-components-will-outlive-your-javascript-framework/&quot;&gt;Web Components are good&lt;/a&gt; now. &lt;a href=&quot;https://www.bryanbraun.com/2020/10/23/es-modules-in-production-my-experience-so-far/&quot;&gt;ES Modules work&lt;/a&gt;,  and instead of minification you can let the server compress your files.
Any dependencies you have can likely be &lt;a href=&quot;https://www.bryanbraun.com/2021/08/27/a-minimalist-development-workflow-using-es-modules-and-esinstall/&quot;&gt;built once into vendor files&lt;/a&gt; and kept in git.&lt;/p&gt;

&lt;p&gt;Every dependency comes with a huge maintenance burden. Try to have as few as possible. &lt;a href=&quot;https://blog.jim-nielsen.com/2020/cheating-entropy-with-native-web-tech/&quot;&gt;Cheat entropy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This seems like the way to build software that can endure and be maintainable for the years to come.&lt;/p&gt;

&lt;p&gt;I know I will be going on a merry little &lt;a href=&quot;https://konmari.com/about-the-konmari-method/&quot;&gt;konmari adventure&lt;/a&gt; with the dependencies of my main projects.&lt;/p&gt;

&lt;h3 id=&quot;postscript&quot;&gt;Postscript&lt;/h3&gt;

&lt;p&gt;As a matter of fact, I started writing this blog post much earlier. But then I first had to &lt;a href=&quot;https://talk.jekyllrb.com/t/android-termux-installation-jekyll/1280/4&quot;&gt;patch Jekyll&lt;/a&gt; so that my phone could render a preview of it. And then when I uploaded the cover image to S3, it turned out some AWS policies had expired and new images couldn’t be rescaled by my serverless worker. At that point I gave up and decided to row to the beach instead.&lt;/p&gt;
</description>
      <pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fdependency-hell%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/dependency-hell/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/dependency-hell/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Flow-Based Programming, a way for AI and humans to develop together</title>
      <description>&lt;p&gt;I think by now everybody reading this will have seen how the new generation of &lt;a href=&quot;https://en.wikipedia.org/wiki/Large_language_model&quot;&gt;Large Language Models&lt;/a&gt; like ChatGPT are able to produce &lt;a href=&quot;https://tylerglaiel.substack.com/p/can-gpt-4-actually-write-code&quot;&gt;somewhat useful code&lt;/a&gt;. Like any advance in software development—from IDEs to high-level languages—this has generated some discussion on the future employment prospects in our field.&lt;/p&gt;

&lt;p&gt;This made me think about how these new tools could fit the world of &lt;a href=&quot;https://en.wikipedia.org/wiki/Flow-based_programming&quot;&gt;Flow-Based Programming&lt;/a&gt;, a software development technique I’ve been involved with for quite a while. In Flow-Based Programming these is a very strict boundary between reusable “library code” (called &lt;em&gt;Components&lt;/em&gt;) and the “application logic” (called the &lt;em&gt;Graph&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;Here’s what the late &lt;a href=&quot;https://jpaulm.github.io&quot;&gt;J. Paul Morrison&lt;/a&gt; wrote on the subject in his seminal work, &lt;em&gt;Flow-Based Programming: A New Approach to Application Development&lt;/em&gt; (2010):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Just as in the preparation and consumption of food there are the two roles of cook and diner, in FBP application development there are two distinct roles: the component builder and the component user or application designer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;…The application designer builds applications using already existing components, or where satisfactory ones do not exist s/he will specify a new component, and then see about getting it built.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Remembering that passage made me wonder, could I get one of the LLMs to produce useful &lt;a href=&quot;https://noflojs.org&quot;&gt;NoFlo&lt;/a&gt; components? Armed with &lt;a href=&quot;https://www.bing.com/new&quot;&gt;New Bing&lt;/a&gt;, I set out to explore.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/b8c302b0-c698-11ed-8b42-09bd596b6d87Robot%20software.png&quot; alt=&quot;AI and humans working together&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The first attempt was specifying a pretty simple component:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/new-bing-noflo-component.png&quot; alt=&quot;New Bing writing a component&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That actually looks quite reasonable! I also tried asking New Bing to make the component less verbose, as well as generating TypeScript and CoffeeScript variants of the same. All seemed to produce workable things! Sure, there might be some tidying to do, but this could remove a lot of the tedium of component creation.&lt;/p&gt;

&lt;p&gt;In addition to this trivial math component I was able to generate some that to call external REST APIs etc. Bing was even able to switch between HTTP libraries as requested.&lt;/p&gt;

&lt;p&gt;What was even cooler was that it actually &lt;em&gt;suggested&lt;/em&gt; to ask it how to &lt;em&gt;test the component&lt;/em&gt;. Doing as I was told, the result was quite astonishing:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/new-bing-fbp-spec.png&quot; alt=&quot;New Bing writing fbp-spec tests&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That’s &lt;a href=&quot;https://github.com/flowbased/fbp-spec&quot;&gt;fbp-spec&lt;/a&gt;! The declarative testing tool we came up with! Definitely the nicest way to test NoFlo (or any other FBP framework) components.&lt;/p&gt;

&lt;p&gt;Based on my results, you’ll definitely want to check the generated components and tests before running them. But what you get out is not bad at all.&lt;/p&gt;

&lt;p&gt;I of course also tried to get Bing to produce NoFlo graphs for me. This is where it stumbled quite a bit. Interestingly the results were better in the &lt;a href=&quot;https://github.com/flowbased/fbp#language-for-flow-based-programming&quot;&gt;fbp language&lt;/a&gt; than in the JSON graph format. But maybe that even more enforces that the &lt;em&gt;sweet spot would be AI writing components and a human creating the graphs that run those&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/28a14660-c698-11ed-8b42-09bd596b6d87Robot%20software.png&quot; alt=&quot;AI and humans working together&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As I’m not working at the moment, I don’t have a current use case for this way of collaborating. But I believe this could be a huge productivity booster for any (and especially Flow-Based) application development, and expect to try it in whatever my next gig ends up being.&lt;/p&gt;

&lt;p&gt;&lt;small&gt;Illustrations: MidJourney, from prompt &lt;em&gt;Robot software developer working with a software architect. Floating flowcharts in the background&lt;/em&gt;&lt;/small&gt;&lt;/p&gt;
</description>
      <pubDate>Mon, 20 Mar 2023 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Ffbp-ai-human-collaboration%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/fbp-ai-human-collaboration/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/fbp-ai-human-collaboration/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Managing a developer shell with Docker</title>
      <description>&lt;p&gt;When I’m not in &lt;a href=&quot;https://flowhub.io/ide/&quot;&gt;Flowhub-land&lt;/a&gt;, I’m used to developing software in a quite customized command line based development environment. Like for many, the cornerstones of this for me are &lt;a href=&quot;https://www.vim.org&quot;&gt;vim&lt;/a&gt; and &lt;a href=&quot;https://github.com/tmux/tmux/wiki&quot;&gt;tmux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As customization increases, it becomes important to have a way to manage that and distribute it across the different computers. For years, I’ve used a &lt;a href=&quot;https://github.com/bergie/dotfiles&quot;&gt;dotfiles repository&lt;/a&gt; on GitHub together with &lt;a href=&quot;https://www.gnu.org/software/stow/&quot;&gt;GNU Stow&lt;/a&gt; for this.&lt;/p&gt;

&lt;p&gt;However, this still means I have to install all the software and tools before I can have my environment up and running.&lt;/p&gt;

&lt;h2 id=&quot;using-docker&quot;&gt;Using Docker&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.docker.com&quot;&gt;Docker&lt;/a&gt; is a tool for building and running software in a containerized fashion. Recently &lt;a href=&quot;https://github.com/tiagodeoliveira&quot;&gt;Tiago&lt;/a&gt; gave me the inspiration to use Docker not only for distributing production software, but also for actually running my development environment.&lt;/p&gt;

&lt;p&gt;Taking ideas from &lt;a href=&quot;https://github.com/tiagodeoliveira/docker-shell&quot;&gt;his setup&lt;/a&gt;, I built upon my existing dotfiles and built a &lt;a href=&quot;https://hub.docker.com/r/bergie/shell/&quot;&gt;reusable developer shell container&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With this, I only need Docker installed on a machine, and then I’m two commands away from having my normal development environment:&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;docker volume create workstation
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;docker run &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; ~/Projects:/projects &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; workstation:/root &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; ~/.ssh:/keys &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; workstation &lt;span class=&quot;nt&quot;&gt;--rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; bergie/shell
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here’s how it looks in action:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/800x/vim-developer-shell-docker.png&quot; alt=&quot;Working on NoFlo inside Docker shell&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once I update my Docker setup (for example to install or upgrade some tool), I can get the latest version on a machine with:&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;docker pull bergie/shell
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;At least in theory this should give me a fully identical working environment regardless of the host machine. Linux VPS, a MacBook, or a Windows machine should all be able to run this. And soon, this should also work out of the box &lt;a href=&quot;https://chromeunboxed.com/news/chromebook-containers-virtual-machine-crostini-google-io&quot;&gt;on Chromebooks&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;setting-this-up&quot;&gt;Setting this up&lt;/h2&gt;

&lt;p&gt;The basics are pretty simple. I already had a repository for my dotfiles, so I only needed to write &lt;a href=&quot;https://github.com/bergie/dotfiles/blob/master/Dockerfile&quot;&gt;a Dockerfile&lt;/a&gt; to install and set up all my software.&lt;/p&gt;

&lt;p&gt;To make things even easier, I &lt;a href=&quot;https://github.com/bergie/dotfiles/blob/master/.travis.yml&quot;&gt;configured Travis&lt;/a&gt; so that every time I push some change to the dotfiles repository, it will create and publish a new container image.&lt;/p&gt;

&lt;h2 id=&quot;further-development-ideas&quot;&gt;Further development ideas&lt;/h2&gt;

&lt;p&gt;So far this setup seems to work pretty well. However, here are some ideas for further improvements:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;ARM build&lt;/strong&gt;: Sometimes I need to work on Raspberry Pis. It might be nice to cross-compile an ARM version of the same setup&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Key management&lt;/strong&gt;: Currently I create new SSH keys for each host machine, and then upload them to the relevant places. With this setup I could use a USB stick, or maybe even a &lt;a href=&quot;https://www.yubico.com/products/yubikey-hardware/&quot;&gt;Yubikey&lt;/a&gt; to manage them&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Application authentication&lt;/strong&gt;: Since the Docker image is public, it doesn’t come with any secrets built in. This means I still need to authenticate with tools like NPM and Travis. It might be interesting to manage these together with my SSH keys&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;SSH host&lt;/strong&gt;: with some tweaking it might be possible to run the same container on cloud services. Then I’d need a way to get my SSH public keys there and start an SSH server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have ideas on how to best implement the above, please &lt;a href=&quot;mailto:henri.bergius@iki.fi&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 19 Apr 2018 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fdocker-developer-shell%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/docker-developer-shell/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/docker-developer-shell/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Building an IoT dashboard with NASA Open MCT</title>
      <description>&lt;p&gt;One important aspect of any Internet of Things setup is being able to collect and visualize data for analysis. Seeing trends in sensor readings over time can be useful for identifying problems, and for coming up with new ways to use the data.&lt;/p&gt;

&lt;p&gt;We wanted an easy solution for this for the &lt;a href=&quot;https://c-base.org&quot;&gt;c-base&lt;/a&gt; IoT setup. Since the &lt;a href=&quot;https://en.wikipedia.org/wiki/C-base#Mythological_self-image_of_the_c-base&quot;&gt;c-base backstory&lt;/a&gt; is that of a crashed space station, using space technology for this made sense.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-openmct.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-openmct-small.png&quot; alt=&quot;OpenMCT view on c-base&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://nasa.github.io/openmct/&quot;&gt;NASA Open MCT&lt;/a&gt; is a framework for building web-based mission control tools and dashboards that they’ve released as open source. It is intended for bringing together tools and both historical and real-time data, as can be seen in their &lt;a href=&quot;https://openmct-demo.herokuapp.com/&quot;&gt;Mars Science Laboratory dashboard demo&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;c-beam-telemetry-server&quot;&gt;c-beam telemetry server&lt;/h2&gt;

&lt;p&gt;As a dashboard framework, Open MCT doesn’t really come with batteries included. You get a bunch of widgets and library functionality, but out of the box there is no integration with data sources.&lt;/p&gt;

&lt;p&gt;However, they do provide a &lt;a href=&quot;https://github.com/nasa/openmct-tutorial&quot;&gt;tutorial project&lt;/a&gt; for integrating data sources. We started with that, and built the &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server&quot;&gt;cbeam-telemetry-server&lt;/a&gt; project which gives a very easy way to integrate Open MCT with an existing IoT setup.&lt;/p&gt;

&lt;p&gt;With the c-beam telemetry server we combine Open MCT with the &lt;a href=&quot;https://www.influxdata.com/&quot;&gt;InfluxDB&lt;/a&gt; timeseries database and the &lt;a href=&quot;http://mqtt.org/&quot;&gt;MQTT&lt;/a&gt; messaging bus. This gives a “turnkey” setup for persisting and visualizing IoT information.&lt;/p&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;/h2&gt;

&lt;p&gt;The first step is to install the c-beam telemetry server. If you want to do a manual setup, first install a MQTT broker, InfluxDB and Node.js. Optionally you can also install CouchDB for sharing custom dashboard layouts between users.&lt;/p&gt;

&lt;p&gt;Then just clone the c-beam telemetry server repo:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git clone https://github.com/c-base/cbeam-telemetry-server.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Install the dependencies and build Open MCT with:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you should be able to start the service with:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;npm start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;running-with-docker&quot;&gt;Running with Docker&lt;/h3&gt;

&lt;p&gt;There is also an easier way to get going: we provide pre-built Docker images of the c-beam telemetry server for both &lt;a href=&quot;https://hub.docker.com/r/cbase/cbeam-telemetry-server/&quot;&gt;x86&lt;/a&gt; and &lt;a href=&quot;https://hub.docker.com/r/cbase/raspberrypi3-cbeam-telemetry-server/&quot;&gt;ARM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are also docker-compose configuration files for both environments. To install and start the whole service with all its dependencies, grab the &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server/blob/master/docker-compose.yml&quot;&gt;docker-compose.yml file&lt;/a&gt; (or the &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server/blob/master/docker-compose-raspberrypi3.yml&quot;&gt;Raspberry Pi 3 version&lt;/a&gt;) and start with:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;docker-compose up &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We’re building these images as part of our continuous integration pipeline (&lt;a href=&quot;https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/&quot;&gt;ARM build with this recipe&lt;/a&gt;), so they should always be reasonably up-to-date.&lt;/p&gt;

&lt;h3 id=&quot;configuring-your-data&quot;&gt;Configuring your data&lt;/h3&gt;

&lt;p&gt;The next step is to create a JavaScript &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server/tree/master/config&quot;&gt;configuration file&lt;/a&gt; for your Open MCT. This is where you need to provide a “dictionary” listing all data you want your dashboard to track.&lt;/p&gt;

&lt;p&gt;Data sets are configured like the following (configuring a temperature reading tracked for the 2nd floor):&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;floor2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Dictionary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;2nd floor&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;floor2&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;floor2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addMeasurement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;temperature&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;floor2_temperature&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;units&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;degrees&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;topic&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;bitraf/temperature/1&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can have multiple dictionaries in the same Open MCT installation, allowing you to group related data sets. Each measurement needs to have a name and a unit.&lt;/p&gt;

&lt;h3 id=&quot;getting-data-in&quot;&gt;Getting data in&lt;/h3&gt;

&lt;p&gt;In the example above we also supply a MQTT topic to read the measurement from. Now sending data to the dashboard is as easy as writing numbers to that MQTT topic. On command-line that would be done with:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mosquitto_pub &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; bitraf/temperature/1 &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; 27.3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you were running the telemetry server when you sent that message, you should’ve seen it appear in the appropriate dashboard.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-temperature-graph.jpeg&quot; alt=&quot;Bitraf temperature graph with Open MCT&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are MQTT libraries available for most programming languages, making it easy to connect existing systems with this dashboard.&lt;/p&gt;

&lt;p&gt;The telemetry server is also compatible with our &lt;a href=&quot;https://msgflo.org/&quot;&gt;MsgFlo framework&lt;/a&gt;, meaning that you can also configure the connections between your data sources and Open MCT visually in &lt;a href=&quot;https://flowhub.io&quot;&gt;Flowhub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This makes it possible to utilize the existing MsgFlo libraries for implementing data sources. For example, with &lt;a href=&quot;https://github.com/msgflo/msgflo-arduino&quot;&gt;msgflo-arduino&lt;/a&gt; you can transmit sensor data from Tiva-C or NodeMcu microcontrollers to the dashboard.&lt;/p&gt;

&lt;h3 id=&quot;status-and-how-you-can-help&quot;&gt;Status and how you can help&lt;/h3&gt;

&lt;p&gt;The c-beam telemetry server is currently in production use in a couple of hackerspaces, and seems to run quite happily.&lt;/p&gt;

&lt;p&gt;We’d love to get feedback from other deployments!&lt;/p&gt;

&lt;p&gt;If you’d like to help with the project, here are couple of areas that would be great:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Adding tests to the project&lt;/li&gt;
  &lt;li&gt;Implementing &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server/issues/54&quot;&gt;downsampling of historical data&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Figuring out ways to control IoT devices via the dashboard (so, to write to MQTT instead of just reading)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please file issues or make pull requests &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server&quot;&gt;to the repository&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 05 Oct 2017 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fnasa-openmct-iot-dashboard%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/nasa-openmct-iot-dashboard/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/nasa-openmct-iot-dashboard/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Flowhub IoT hack weekend at c-base: buttons, sensors, the Big Switch</title>
      <description>&lt;p&gt;Last weekend we held the &lt;a href=&quot;https://logbuch.c-base.org/archives/2647&quot;&gt;c-base IoT hack weekend&lt;/a&gt;, focused on the &lt;a href=&quot;https://flowhub.io/iot/&quot;&gt;Flowhub IoT&lt;/a&gt; platform. This was continuation from the &lt;a href=&quot;https://bergie.iki.fi/blog/flowhub-iot-workshop-bitraf/&quot;&gt;workshop we organized at the Bitraf makerspace&lt;/a&gt; a week earlier. Same tools and technologies, but slightly different focus areas.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://c-base.org/&quot;&gt;c-base&lt;/a&gt; is one of the world’s oldest hackerspaces and a crashed space station under Berlin. It is also one of the earliest users of &lt;a href=&quot;https://msgflo.org/&quot;&gt;MsgFlo&lt;/a&gt; with quite a lot of devices connected via MQTT.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-after.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-after-small.jpg&quot; alt=&quot;Hack weekend debriefing&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;hack-weekend&quot;&gt;Hack weekend&lt;/h2&gt;

&lt;p&gt;Just like &lt;a href=&quot;https://bergie.iki.fi/blog/flowhub-iot-workshop-bitraf/&quot;&gt;at Bitraf&lt;/a&gt;, the workshop aimed to add new IoT capabilities to c-base, as well as to increase the number of members who know how to make the station’s setup do new things. For this, we used three primary tools:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/msgflo/msgflo-arduino&quot;&gt;msgflo-arduino&lt;/a&gt; and ESP8266 microcontrollers for connected devices&lt;/li&gt;
  &lt;li&gt;Raspberry Pis and &lt;a href=&quot;https://www.ansible.com/&quot;&gt;Ansible&lt;/a&gt; for info screens&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://flowhub.io/&quot;&gt;Flowhub IDE&lt;/a&gt; and &lt;a href=&quot;https://github.com/msgflo/msgflo-python&quot;&gt;msgflo-python&lt;/a&gt; for “business logic”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-neuland.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-neuland-small.jpg&quot; alt=&quot;Internet of Things&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The workshop started in Friday evening after a lecture on &lt;a href=&quot;https://en.wikipedia.org/wiki/Nuclear_pulse_propulsion&quot;&gt;nuclear pulse propulsion&lt;/a&gt; ended in the main hall. We continued all the way to late Sunday evening with some sleep breaks in between. There is something about c-base that makes you want to work there at night.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-volume-test.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-volume-test-small.jpg&quot; alt=&quot;Testing a humidity sensor&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By Sunday evening, we had built and deployed 15 connected IoT devices, with five additional ones pretty far in development. You can find the source code in the &lt;a href=&quot;https://github.com/c-base/c-flo/tree/master/devices&quot;&gt;c-flo repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-ideas.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-ideas-small.jpg&quot; alt=&quot;Idea wall&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;sensor-boxes&quot;&gt;Sensor boxes&lt;/h2&gt;

&lt;p&gt;Quite a lot of c-base was already instrumented when we started the workshop. We had details on electricity consumption, internet traffic, and more. But one thing we didn’t have was information on the physical environment at the station. To solve this, we decided to build a set of sensor boxes that we could deploy in different areas of the hackerspace.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-sensors.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-sensors-small.jpg&quot; alt=&quot;Building sensors&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The capabilities shared by all the sensor boxes we deployed were:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Temperature&lt;/li&gt;
  &lt;li&gt;Humidity&lt;/li&gt;
  &lt;li&gt;Motion (via passive infrared)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For some areas of interest we provided some additional sensors:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Sound level (for the workshop)&lt;/li&gt;
  &lt;li&gt;Light level (for c-lab)&lt;/li&gt;
  &lt;li&gt;Carbon dioxide&lt;/li&gt;
  &lt;li&gt;Door open/closed&lt;/li&gt;
  &lt;li&gt;Gravity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-workshopsensor-parts.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-workshopsensor-parts-small.jpg&quot; alt=&quot;Workshop sensor on a breadboard&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We found a set of nice little electrical boxes that provided a convenient housing for these sensor boxes. This way we were able to mount them in proper places quickly. This should also protect them from dust and other elements to some degree.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-weltenbausensor.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-weltenbausensor-small.jpg&quot; alt=&quot;Installed weltenbaulab sensor&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-big-switch&quot;&gt;The Big Switch&lt;/h2&gt;

&lt;p&gt;The lights of the c-base main hall are controllable via MsgFlo, and we have a system called &lt;a href=&quot;https://github.com/c-base/farbgeber&quot;&gt;farbgeber&lt;/a&gt; to produce pleasing color schemes for any given time.&lt;/p&gt;

&lt;p&gt;However, when there are events we need to enable manual control of all lights and sound. To make this “MsgFlo vs. IP lounge” control question  clearer, we built a Big Switch to decide which controls the lights:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-bigswitch.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-bigswitch-small.jpg&quot; alt=&quot;Big Switch in action&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The switch is an old electric mains switch from an office building. It makes a satisfying sound when you turn it, and is big enough that you can see which way the setting is from across the room.&lt;/p&gt;

&lt;p&gt;To complement the Big Switch we also added a “c-boom” button to trigger the disco mode in the main hall:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-c-boom-button.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-c-boom-button-small.jpg&quot; alt=&quot;c-boom button&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;info-screens&quot;&gt;Info screens&lt;/h2&gt;

&lt;p&gt;One part of the IoT setup was to make statistics and announcements about c-base visible in different areas of the station. We did this by rolling out a set of displays with Raspberry Pi 3s connected to the MsgFlo MQTT environment.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-infoscreen-install.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-infoscreen-install-small.jpg&quot; alt=&quot;Info screens ready for installing&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The announcements shown on the screens range from mission critical information like station power consumption or whether the bar is open, to more fictional ones like the &lt;a href=&quot;https://github.com/c-base/station-announcer&quot;&gt;NoFlo-powered space station announcements&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-c-leuse.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-c-leuse-small.jpg&quot; alt=&quot;Air lock&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We also built an Android version of the info display software, which enabled deploying screens using some old donated tablets.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-tablet.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-tablet-small.jpg&quot; alt=&quot;Info screen tablet&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h2&gt;

&lt;p&gt;This was another successful workshop. Participants got to do new things, and we got lots of new IoT infrastructure installed around c-base. The Flowhub graph is definitely starting to look populated:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-graph.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-graph-small.png&quot; alt=&quot;c-base is a graph&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We also deployed &lt;a href=&quot;https://nasa.github.io/openmct/&quot;&gt;NASA OpenMCT&lt;/a&gt; so that we get a nice overview on the station status. Our telemetry server provides MsgFlo participants that receive data via MQTT, store it in InfluxDB, and then visualize it on the dashboard:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-openmct.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/c-base-iot-openmct-small.png&quot; alt=&quot;OpenMCT view on c-base&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the c-base IoT software is available &lt;a href=&quot;https://github.com/c-base&quot;&gt;on Github&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/c-base/c-flo&quot;&gt;c-flo&lt;/a&gt; — the MsgFlo setup for c-base&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server&quot;&gt;cbeam-telemetry-server&lt;/a&gt; — the OpenMCT setup for c-base&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/c-base/mqttwebview&quot;&gt;mqttwebview&lt;/a&gt; — Linux info screen implementation&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/c-base/c-beam-viewer&quot;&gt;c-beam-viewer&lt;/a&gt; — Android info screen implementation&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;If you’d like to have a similar IoT workshop at your company, we’re happy to organize one. &lt;a href=&quot;https://flowhub.io/about/&quot;&gt;Get in touch&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;
</description>
      <pubDate>Tue, 11 Jul 2017 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fflowhub-iot-workshop-c-base%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/flowhub-iot-workshop-c-base/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/flowhub-iot-workshop-c-base/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Flowhub IoT workshop at Bitraf: sensors, access control, and more</title>
      <description>&lt;p&gt;I just got back to Berlin from the &lt;a href=&quot;https://www.meetup.com/bitraf/events/240605453/&quot;&gt;Bitraf IoT hackathon&lt;/a&gt; we organized in Oslo, Norway. This hackathon was the first of &lt;a href=&quot;https://bergie.iki.fi/blog/msgflo-workshops-cbase-bitraf/&quot;&gt;two IoT workshops&lt;/a&gt; around MsgFlo and &lt;a href=&quot;https://flowhub.io/iot/&quot;&gt;Flowhub IoT&lt;/a&gt;. The second &lt;a href=&quot;ttps://logbuch.c-base.org/archives/2647&quot;&gt;will be held&lt;/a&gt; at c-base in Berlin this coming weekend.&lt;/p&gt;

&lt;h2 id=&quot;bitraf-and-the-existing-iot-setup&quot;&gt;Bitraf and the existing IoT setup&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://bitraf.no/&quot;&gt;Bitraf&lt;/a&gt; is a large non-profit &lt;a href=&quot;https://www.makerspaces.com/what-is-a-makerspace/&quot;&gt;makerspace&lt;/a&gt; in the center of Oslo. It provides co-working facilities, as well as labs and a large selection of computer controlled tools for building things. Members have 24/7 access to the space, and are provided with everything needed for CNC milling, laser cutting, 3D-printing and more.&lt;/p&gt;

&lt;p&gt;The space uses the &lt;a href=&quot;https://flowhub.io/iot/&quot;&gt;Flowhub IoT&lt;/a&gt; stack of &lt;a href=&quot;https://msgflo.org/&quot;&gt;MsgFlo&lt;/a&gt; and &lt;a href=&quot;https://mosquitto.org/&quot;&gt;Mosquitto&lt;/a&gt; for business-critical things like the door locks that members can open with their smartphone.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-button.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-button-small.jpg&quot; alt=&quot;Bitraf lock system&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to access control, they also had various environmental sensors available on the MQTT network.&lt;/p&gt;

&lt;p&gt;With the workshop, our aim was to utilize these existing things more, as well as to add new IoT capabilities. And of course to increase the number of Bitraf members with the knowledge to work with the MsgFlo IoT setup.&lt;/p&gt;

&lt;h2 id=&quot;preparations&quot;&gt;Preparations&lt;/h2&gt;

&lt;p&gt;Being a makerspace, Bitraf already had everything needed for the physical side of the workshop — tons of sensors, WiFi-enabled microcontrollers, tools for building cases and mounting solutions. So the workshop preparations mostly focused on the software side of things.&lt;/p&gt;

&lt;p&gt;The primary tools for the workshop were:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/bitraf/bitraf-iot#running-with-docker&quot;&gt;Docker setup of Bitraf IoT&lt;/a&gt;, making running the whole IoT environment locally as easy as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker-compose up&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/msgflo/msgflo-arduino&quot;&gt;msgflo-arduino&lt;/a&gt;, a library for making ESP8266 devices work as MsgFlo participants&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To help visualize the data coming from the sensors people were building, I integrated the &lt;a href=&quot;https://nasa.github.io/openmct/&quot;&gt;NASA OpenMCT&lt;/a&gt; dashboard with MsgFlo and &lt;a href=&quot;https://www.influxdata.com/&quot;&gt;InfluxDB&lt;/a&gt; time series database. This setup is available at the &lt;a href=&quot;https://github.com/c-base/cbeam-telemetry-server&quot;&gt;cbeam-telemetry-server&lt;/a&gt; project.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-openmct.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-openmct-small.png&quot; alt=&quot;OpenMCT at Bitraf&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gave us a way to send data from any interesting sensors in the IoT network to a dashboard and visualize it. Down the line the persisted data can also be interesting for further analysis or machine learning.&lt;/p&gt;

&lt;h2 id=&quot;kick-off-session&quot;&gt;Kick-off session&lt;/h2&gt;

&lt;p&gt;We started the workshop with a quick intro session about Flowhub, MsgFlo, and MQTT development. There is unfortunately no video, but &lt;a href=&quot;https://docs.google.com/presentation/d/1Xo7RxPTOOcgJpVc4rl-xuzwxtStpDWwdun4fCYCcbV8/edit?usp=sharing&quot;&gt;the slides are available&lt;/a&gt;:&lt;/p&gt;

&lt;iframe src=&quot;https://docs.google.com/presentation/d/1Xo7RxPTOOcgJpVc4rl-xuzwxtStpDWwdun4fCYCcbV8/embed?start=false&amp;amp;loop=false&amp;amp;delayms=3000&quot; frameborder=&quot;0&quot; width=&quot;960&quot; height=&quot;569&quot; allowfullscreen=&quot;true&quot; mozallowfullscreen=&quot;true&quot; webkitallowfullscreen=&quot;true&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;After the intro, we did a round of all attendees to see what skills people already had, and what they were interested in learning. Then we started collecting ideas what to work on.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-idea-wall.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-idea-wall-small.jpg&quot; alt=&quot;Bitraf IoT ideas&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;People picked their ideas, and the project work started.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-idea-wall-session.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-idea-wall-session-small.jpg&quot; alt=&quot;Idea session at Bitraf IoT&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’d like to highlight couple of the projects.&lt;/p&gt;

&lt;h2 id=&quot;new-sensors-for-the-makerspace&quot;&gt;New sensors for the makerspace&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-workshop.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-workshop-small.jpg&quot; alt=&quot;Teams at work&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building new sensors was a major part of the workshop. There were several projects, all built on top of &lt;a href=&quot;https://github.com/msgflo/msgflo-arduino&quot;&gt;msgflo-arduino&lt;/a&gt; and the ESP8266 microcontroller:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Motion sensor for tracking whether there are people in the laser cutting lab&lt;/li&gt;
  &lt;li&gt;Sensor for tracking which windows are open or closed: &lt;a href=&quot;https://github.com/Poohma/IOT_Window_Hall_sensors&quot;&gt;https://github.com/Poohma/IOT_Window_Hall_sensors&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Sensor for tracking whether a given machine is currently running or not: &lt;a href=&quot;https://github.com/slunke/onoffsensor&quot;&gt;https://github.com/slunke/onoffsensor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-sensors.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-sensors-small.jpg&quot; alt=&quot;Working on a motion sensor&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There was also a project to automatically open and close windows, but this one didn’t get completed over the weekend. You can follow the progress in the &lt;a href=&quot;https://github.com/apetrynet/altF4&quot;&gt;altF4 GitHub repo&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;tool-locking&quot;&gt;Tool locking&lt;/h2&gt;

&lt;p&gt;All hackerspaces have the problem that people borrow tools and then don’t return them when finished. This means that the next person needing the tool will have to spend time searching for it.&lt;/p&gt;

&lt;p&gt;To solve this, the team designed a system that enabled tools to be locked to a wall, with a web interface where members can “check out” a tool they want to use. This way the system constantly knows what tools are in their right places, and which tools are in use, and by who.&lt;/p&gt;

&lt;p&gt;You can see the tool lock system in action in &lt;a href=&quot;https://youtu.be/3u51ZDOo7UQ&quot;&gt;this demo video&lt;/a&gt;:&lt;/p&gt;

&lt;iframe width=&quot;853&quot; height=&quot;480&quot; src=&quot;https://www.youtube.com/embed/3u51ZDOo7UQ&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Source code and schematics: &lt;a href=&quot;https://github.com/einsmein/bitraf-thelock&quot;&gt;https://github.com/einsmein/bitraf-thelock&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;after-the-hackathon&quot;&gt;After the hackathon&lt;/h2&gt;

&lt;p&gt;Before my flight out, we sat down with &lt;a href=&quot;http://www.jonnor.com/&quot;&gt;Jon&lt;/a&gt; to review how things went. In general, I think it is clear the event was a success — people got to learn and try new things, and all projects except one were completed during the two days.&lt;/p&gt;

&lt;p&gt;Our unofficial goal was to double the number of nodes in the Bitraf Flowhub graph, and I think we succeeded in this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-flowhub-network.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/bitraf-flowhub-network-small.png&quot; alt=&quot;Bitraf as a graph&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are &lt;a href=&quot;https://www.meetup.com/bitraf/events/240605453/#event-comments-section&quot;&gt;couple of comments&lt;/a&gt; from the attendees:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Really fun and informative. The development pipeline also seems complete. Made it a lot easier for beginner to get started.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;this was a very fantastic hackathon! Lots of interesting things to learn, very enthusiastic participants, great stewardship and we actually got quite a few projects finished. Well done everbody.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In general the development tools we provided worked well. Everybody was able to run the full Flowhub IoT environment on their own machines using the &lt;a href=&quot;https://github.com/bitraf/bitraf-iot#running-with-docker&quot;&gt;Docker setup we provided&lt;/a&gt;. And apart from a couple of corner cases, &lt;a href=&quot;https://github.com/msgflo/msgflo-arduino&quot;&gt;msgflo-arduino&lt;/a&gt; was easy to get going on the NodeMCUs.&lt;/p&gt;

&lt;p&gt;With these two, everybody could easily wire up some sensors and see their data in both Flowhub and the OpenMCT dashboard. From the local setup going to production was just a matter of switching the MQTT broker configuration.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;If you’d like to have a similar IoT workshop at your company, we’re happy to organize one. &lt;a href=&quot;https://flowhub.io/about/&quot;&gt;Get in touch&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;
</description>
      <pubDate>Tue, 04 Jul 2017 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fflowhub-iot-workshop-bitraf%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/flowhub-iot-workshop-bitraf/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/flowhub-iot-workshop-bitraf/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Two hackathons in a week: thoughts on NoFlo and MsgFlo</title>
      <description>&lt;p&gt;Last week I participated in two hackathons, events where a group of strangers would form a team for two or three days and build a product prototype. In the end all teams pitch their prototypes, and the best ones would be given some prizes.&lt;/p&gt;

&lt;p&gt;Hackathons are typically organized to get feedback from developers on some new API or platform. Sometimes they’re also organized as a recruitment opportunity.&lt;/p&gt;

&lt;p&gt;Apart from the free beer and camaraderie, I like going to hackathons since they’re a great way to battle test the &lt;a href=&quot;https://flowhub.io/&quot;&gt;developer tools&lt;/a&gt; I build. The time from idea to having to have a running prototype is short, people are used to different ways of working and different toolkits.&lt;/p&gt;

&lt;p&gt;If our tools and &lt;a href=&quot;https://en.wikipedia.org/wiki/Flow-based_programming&quot;&gt;flow-based programming&lt;/a&gt; work as intended, they should be ideal for these kind of situations.&lt;/p&gt;

&lt;h2 id=&quot;minds--machines-hackathon-and-electrocute&quot;&gt;Minds + Machines hackathon and Electrocute&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://mindsmachinesberlin.devpost.com/&quot;&gt;Minds + Machines hackathon&lt;/a&gt; was held on a boat and focused on decarbonizing power and manufacturing industries. The main platform to work with was &lt;a href=&quot;https://www.ge.com/digital/predix&quot;&gt;Predix&lt;/a&gt;, GE’s PaaS service.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_team.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_team_small.jpg&quot; alt=&quot;Team Electrocute&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our project was &lt;strong&gt;&lt;a href=&quot;https://devpost.com/software/electrocute-a9guqr&quot;&gt;Electrocute&lt;/a&gt;&lt;/strong&gt;, a machine learning system for forecasting power consumption in a changing climate.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;1.5°C is the global warming target set by the Paris Agreement. How will this affect energy consumption? What kind of generator assets should utilities deploy to meet these targets? When and how much renevable energy can be utilized?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;The changing climate poses many questions to utilities. With Electrocute’s forecasting suite power companies can have accurate answers, on-demand.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_map.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_map_small.png&quot; alt=&quot;Electrocute forecasts&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The system was built with a &lt;a href=&quot;https://noflojs.org/&quot;&gt;NoFlo&lt;/a&gt; web API server talking over &lt;a href=&quot;https://msgflo.org/&quot;&gt;MsgFlo&lt;/a&gt; with a Python machine learning backend. We also built a frontend where users could see the energy usage forecasts on a heatmap.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_noflo.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/minds_machines_noflo_small.png&quot; alt=&quot;NoFlo-Xpress in action&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately we didn’t win this one.&lt;/p&gt;

&lt;h2 id=&quot;recoding-aviation-and-skillport&quot;&gt;Recoding Aviation and Skillport&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.recodingaviation.com/&quot;&gt;Recoding Aviation&lt;/a&gt; was held at &lt;a href=&quot;https://www.hubraum.com/&quot;&gt;hub:raum&lt;/a&gt; and focused on improving the air travel experience through usage of open APIs offered by the various participating airports.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_team.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_team_small.jpg&quot; alt=&quot;Team Skillport&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://platform.recodingaviation.com/#/projects/594437673d055b0004c17f5a&quot;&gt;Skillport&lt;/a&gt;&lt;/strong&gt; was our project to make long layovers more bearable by connecting people who’re stuck at the airport at the same time.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Long layovers suck. But there is ONE thing amazing about them: You are surrounded by highly skilled people with interesting stories from all over the world. It sometimes happens that you meet someone randomly - we all have a story like that. But usually we are too shy and lazy to communicate and see how we could create a valuable interaction. You never know if the other person feels the same.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;We built a mobile app that turns airports into a networking, cultural exchange and knowledge sharing hub. Users tell each other through the app that they are available to meet and what value they can bring to an interaction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The app connected with a J2EE API service that then communicated over MsgFlo with NoFlo microservices doing all the interactions with social and airport APIs. We also did some data enrichment in NoFlo to make smart recommendations on meeting venues.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_msgflo.png&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_msgflo_small.png&quot; alt=&quot;MsgFlo in action&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time our project went well with the judges and we were selected as the winner of the &lt;em&gt;Life in between airports&lt;/em&gt; challenge. I’m looking forward to the helicopter ride over Berlin!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_winners.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/recoding_aviation_winners_small.jpg&quot; alt=&quot;Category winners&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Skillport also won a space at &lt;a href=&quot;https://www.hubraum.com/&quot;&gt;hub:raum&lt;/a&gt;, so this might not be the last you’ll hear of the project…&lt;/p&gt;

&lt;h2 id=&quot;lessons-learned&quot;&gt;Lessons learned&lt;/h2&gt;

&lt;h3 id=&quot;benefits-of-a-message-queue-architecture&quot;&gt;Benefits of a message queue architecture&lt;/h3&gt;

&lt;p&gt;I’ve written before on &lt;a href=&quot;https://bergie.iki.fi/blog/forget-http-microservices/&quot;&gt;why to use message queues for microservices&lt;/a&gt;, but that post focused more on the benefits for real-life production usage.&lt;/p&gt;

&lt;p&gt;The problems and tasks for a system architecture in a hackathon are different. Since the time is short, you want to enable people to work in parallel as much as possible without stepping on each other’s toes. Since people in the team come from different backgrounds, you want to enable a heterogeneous, polyglot architecture where each developer can use the tools they’re most productive with.&lt;/p&gt;

&lt;p&gt;MsgFlo is by its nature very suitable for this. Components can be written in any language that supports the message queue used, and we have convenience libraries for many of them. The &lt;a href=&quot;https://msgflo.org/docs/communications/index.html&quot;&gt;discovery mechanism&lt;/a&gt; makes new microservices appear on the Flowhub graph as soon as they start, enabling services to be wired together quickly.&lt;/p&gt;

&lt;h3 id=&quot;mock-early-mock-often&quot;&gt;Mock early, mock often&lt;/h3&gt;

&lt;p&gt;Mocks are a useful way to provide a microservice to the other team members even before the real implementation is ready.&lt;/p&gt;

&lt;p&gt;For example in the GE Predix hackathon, we knew the machine learning team would need quite a bit of time to build their model. Until that point we ran their microservice with a simple &lt;a href=&quot;http://github.com/msgflo/msgflo-python&quot;&gt;msgflo-python&lt;/a&gt; component that just gave &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;random()&lt;/code&gt; as the forecast.&lt;/p&gt;

&lt;p&gt;This way everybody else was able to work with the real interface from the get-go. When the learning model was ready we just replaced that Python service, and everything was live.&lt;/p&gt;

&lt;p&gt;Mocks can be useful also in situations where you have a misbehaving third-party API.&lt;/p&gt;

&lt;h3 id=&quot;dont-forget-tests&quot;&gt;Don’t forget tests&lt;/h3&gt;

&lt;p&gt;While shooting for a full test coverage is probably not realistic within the time constraints of a hackathon, it still makes sense to have at least some “happy path” tests. When you’re working with multiple developers each building a different parts of the service, interface tests serve a dual purpose:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;They show the other team members how to use your service&lt;/li&gt;
  &lt;li&gt;They verify that your service actually does what it is supposed to&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you’re using a continuous integration tool like &lt;a href=&quot;https://travis-ci.org/&quot;&gt;Travis&lt;/a&gt;, the tests will help you catch any breakages quickly, and also ensure the services work on a clean installation.&lt;/p&gt;

&lt;p&gt;For a message queue architecture, &lt;a href=&quot;https://github.com/flowbased/fbp-spec&quot;&gt;fbp-spec&lt;/a&gt; is a great tool for writing and running these interface tests.&lt;/p&gt;

&lt;h3 id=&quot;talk-with-the-api-providers&quot;&gt;Talk with the API providers&lt;/h3&gt;

&lt;p&gt;The reason API and platform providers organize these events is to get feedback. As a developer that works with tons of different APIs, this is a great opportunity to make sure your ideas for improvement are heard.&lt;/p&gt;

&lt;p&gt;On the flip side, this usually also means the APIs are in a pretty early stage, and you may be the first one using them in a real-world project. When the inevitable bugs arise, it is a good to have a channel of communications open with the API provider on site so you can get them resolved or worked around quickly.&lt;/p&gt;

&lt;h3 id=&quot;room-for-improvement&quot;&gt;Room for improvement&lt;/h3&gt;

&lt;p&gt;The downside of the NoFlo and MsgFlo stack is that there is still quite a bit of a learning curve. &lt;a href=&quot;https://noflojs.org/documentation/&quot;&gt;NoFlo documentation&lt;/a&gt; is now in a reasonable place, but with &lt;a href=&quot;https://flowhub.io/&quot;&gt;Flowhub&lt;/a&gt; and MsgFlo we have tons of work ahead on improving the onboarding experience.&lt;/p&gt;

&lt;p&gt;Right now it is easy to work with if somebody sets it up properly first, but getting there is a bit tricky. Fixing this will be crucial for enabling others to benefit from these tools as well.&lt;/p&gt;
</description>
      <pubDate>Mon, 19 Jun 2017 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fmsgflo-noflo-in-hackathons%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/msgflo-noflo-in-hackathons/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/msgflo-noflo-in-hackathons/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
    <item>
      
      <title>Atreus: Building a custom ergonomic keyboard</title>
      <description>&lt;p&gt;As mentioned in my &lt;a href=&quot;https://bergie.iki.fi/blog/working-on-android-2017/&quot;&gt;Working on Android post&lt;/a&gt;, I’ve been using a mechanical keyboard for a couple of years now. Now that I work &lt;a href=&quot;https://bergie.iki.fi/blog/flowhub-ug/&quot;&gt;on Flowhub&lt;/a&gt; from home, it was a good time to re-evaluate the whole work setup. As far as regular keyboards go, the MiniLa was nice, but I wanted something more compact and ergonomic.&lt;/p&gt;

&lt;h2 id=&quot;the-atreus-keyboard&quot;&gt;The Atreus keyboard&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/ready-2.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/ready-2-small.jpg&quot; alt=&quot;My new Atreus&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Atreus is a 40% ergonomic mechanical keyboard designed by &lt;a href=&quot;https://technomancy.us/&quot;&gt;Phil Hagelberg&lt;/a&gt;. It is an &lt;a href=&quot;https://github.com/technomancy/atreus&quot;&gt;open hardware design&lt;/a&gt;, but he also &lt;a href=&quot;https://atreus.technomancy.us/&quot;&gt;sells kits&lt;/a&gt; for easier construction. From the kit introduction:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The Atreus is a small mechanical keyboard that is based around the shape of the human hand. It combines the comfort of a split ergonomic keyboard with the crisp key action of mechanical switches, all while fitting into a tiny profile.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My use case was also quite travel-oriented. I wanted a small keyboard that would enable me to work with it also on the road. There are many other small-ish DIY keyboard designs like &lt;a href=&quot;https://olkb.com/planck/&quot;&gt;Planck&lt;/a&gt; and &lt;a href=&quot;http://www.40percent.club/2016/11/gherkin.html&quot;&gt;Gherkin&lt;/a&gt; available, but Atreus had the advantage of better ergonomics. I really liked the design of the &lt;a href=&quot;https://www.ergodox.io&quot;&gt;Ergodox&lt;/a&gt; keyboard, and Atreus essentially is &lt;a href=&quot;https://technomancy.us/173&quot;&gt;that made mobile&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I found the split halves and relatively large size (which are fantastic for stationary use at a desk) make me reluctant to use it on the lap, at a coffee shop, or on the couch, so that’s the primary use case I’ve targeted with the Atreus. It still has most of the other characteristics that make the Ergodox stand out, like mechanical Cherry switches, staggered columns instead of rows, heavy usage of the thumbs, and a hackable microcontroller with flexible firmware, but it’s dramatically smaller and lighter&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I had the opportunity to try a kit-built Atreus in the &lt;a href=&quot;https://www.meetup.com/Berlin-Mechanical-Keyboards-Input-Devices-Meetup/&quot;&gt;Berlin Mechanical Keyboard meetup&lt;/a&gt;, and it felt nice. It was time to start the project.&lt;/p&gt;

&lt;h2 id=&quot;sourcing-the-parts&quot;&gt;Sourcing the parts&lt;/h2&gt;

&lt;p&gt;When building an Atreus the first decision is whether to go with the kit or &lt;a href=&quot;http://imgur.com/a/qcgdF&quot;&gt;hand-wire it yourself&lt;/a&gt;. Building from a kit is certainly easier, but since I’m a member of &lt;a href=&quot;https://c-base.org/&quot;&gt;a hackerspace&lt;/a&gt;, doing a hand-wired build seemed like the way to go.&lt;/p&gt;

&lt;p&gt;To build a custom keyboard, you need:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Switches: in my case 37 Cherry MX blues and 5 Cherry MX blacks&lt;/li&gt;
  &lt;li&gt;Diodes: one 1N4148 per switch&lt;/li&gt;
  &lt;li&gt;Microcontroller: a Arduino Pro Micro on my keyboard&lt;/li&gt;
  &lt;li&gt;Keycaps: started with recycled ones and later upgraded to DSA blanks&lt;/li&gt;
  &lt;li&gt;Case: got a set of laset-cut steel plates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even though Cherry — the maker of the most common mechanical key switches — is a German company, it is quite difficult to get switches in retail here. Luckily a fellow hackerspace member had just dismantled some old mechanical keyboards, and so I was able to get the switches I needed via barter.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/keyswitches.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/keyswitches-small.jpg&quot; alt=&quot;Keyswitches&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Cherry MX blues are tactile clicky switches that feel super-nice to type on, but are quite loud. For modifiers I went with Cherry MX blacks that are linear. This way there is quite a clear difference in feel between keys you typically hold down compared to the ones you just press.&lt;/p&gt;

&lt;p&gt;The diodes and the microcontroller I ordered from Amazon for about 20€ total.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/microcontroller.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/microcontroller-small.jpg&quot; alt=&quot;Arduino Pro Micro&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first I used a set of old keycaps that I got with the switches, but once the keyboard was up and running I upgraded to a very nice set of blank DSA-profile keycaps that I ordered &lt;a href=&quot;https://www.aliexpress.com/store/2230037&quot;&gt;from AliExpress&lt;/a&gt; for 30€. That set came with enough keycaps that I’ll have myself covered if I ever build a second Atreus.&lt;/p&gt;

&lt;p&gt;All put together, I think the parts ended up costing me around 100€ total.&lt;/p&gt;

&lt;h2 id=&quot;preparations&quot;&gt;Preparations&lt;/h2&gt;

&lt;p&gt;When I received all the parts, there were some preparation steps to be made. Since the key switches were 2nd hand, I had to start by dismantling them and removing old diodes that had been left inside some of them.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/keyswitches-prep.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/keyswitches-prep-small.jpg&quot; alt=&quot;Opening the key switches&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The keycaps I had gotten with the switches were super grimy, and so I ended up sending them to the washing machine. After that you could see that they were not new, but at least they were clean.&lt;/p&gt;

&lt;p&gt;With the steel mounting plate there had been a slight misunderstading, and the plates I received were a few millimeters thicker than needed, so the switches wouldn’t “click” in place. While this could’ve been worked around with hot glue, we ended up filing the mounting holes down to the right thickness.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/filing-plate-1.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/filing-plate-1-small.jpg&quot; alt=&quot;Filing the plate&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/filing-plate-2.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/filing-plate-2-small.jpg&quot; alt=&quot;Little bit of help&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;wiring-the-keyboard&quot;&gt;Wiring the keyboard&lt;/h2&gt;

&lt;p&gt;Once the mounting plate was in the right shape, I clicked the switches in and it was time to solder.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/switches-mounted.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/switches-mounted-small.jpg&quot; alt=&quot;All switches in place&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hand-wiring keyboards is not that tricky. You have to attach a diode to each keyswitch, and then connect each row together via the diodes.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-1.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-1-small.jpg&quot; alt=&quot;Connecting diodes&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-2.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-2-small.jpg&quot; alt=&quot;First row ready&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The two thumb keys are wired to be on the same column, but different rows.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-3.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/diode-rows-3-small.jpg&quot; alt=&quot;All rows ready diodes&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then each column is connected together via the other pin on the switches.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/columns.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/columns-small.jpg&quot; alt=&quot;Soldering columns&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how the matrix looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/wiring-ready.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/wiring-ready-small.jpg&quot; alt=&quot;Completed matrix&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After these are done, connect a wire from each column, and each row to a I/O pin on the microcontroller.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/soldering.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/soldering-small.jpg&quot; alt=&quot;Adding column wires&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you haven’t done it earlier, this is a good stage to test all connections with a multimeter!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/soldering-microcontroller.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/soldering-microcontroller-small.jpg&quot; alt=&quot;Connecting the microcontroller&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;firmware&quot;&gt;Firmware&lt;/h2&gt;

&lt;p&gt;After finishing the wiring, I downloaded the &lt;a href=&quot;https://github.com/qmk/qmk_firmware&quot;&gt;QMK firmware&lt;/a&gt;, changed the &lt;a href=&quot;https://github.com/bergie/qmk_firmware/commit/1902fc2affcd4cb1cbe2225b8c0736f57eca5646&quot;&gt;PIN mapping&lt;/a&gt; for how my Atreus is wired up, switched the layout to &lt;a href=&quot;https://colemak.com/&quot;&gt;Colemak&lt;/a&gt;, and the keyboard was ready to go.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/ready-1.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/ready-1-small.jpg&quot; alt=&quot;Atreus in use&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t mind the key labels in the picture above. These are the second-hand keycaps I started with. Since then I’ve switched to &lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/ready-2.jpg&quot;&gt;blank ones&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;usb-c&quot;&gt;USB-C&lt;/h2&gt;

&lt;p&gt;The default Atreus design has the USB cable connected directly to the microcontroller, meaning that you’ll have to open the case to change the cable. To mitigate that I wanted to add a USB breakout board to the project, and this being 2017, it felt right to go with &lt;a href=&quot;https://en.wikipedia.org/wiki/USB-C&quot;&gt;USB-C&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-breakout.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-breakout-small.jpg&quot; alt=&quot;USB-C breakouts&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found some cheap USB-C breakout boards from AliExpress. Once they arrived, it was time to figure out how the spec works. Since USB-C is quite new, there are very few resources available on how to use it with microcontrollers. These tutorials were quite helpful:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.scorpia.co.uk/2016/03/17/using-usb-type-c-on-hobyist-projects/&quot;&gt;Using USB-C on hobbyist projects&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.embedded.com/electronics-blogs/benson-s-blocks/4442214/USB-Type-C-in-a-Micro-B-world&quot;&gt;USB Type C in a Micro-B world&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is how we ended up wiring the breakout board. After these you only have four wires to connect to the microcontroller: ground, power, and the positive and negative data pins.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-breakout-wired.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-breakout-wired-small.jpg&quot; alt=&quot;USB-C breakout with wiring&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://sgotti.me/post/atreus-keyboard-build-log/&quot;&gt;This Atreus build log&lt;/a&gt; was useful for figuring out where to connect the USB wires on the Pro Micro. Once all was done, I had a custom, USB-C keyboard!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-ready.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/usb-ready-small.jpg&quot; alt=&quot;USB-C keyboard&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;next-steps&quot;&gt;Next steps&lt;/h2&gt;

&lt;p&gt;Now I have the Atreus working nicely on my new standing desk. Learning Colemak is a bit painful, but the keyboard itself feels super nice!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/standing-desk.jpg&quot;&gt;&lt;img src=&quot;https://d2vqpl3tx84ay5.cloudfront.net/atreus-build/standing-desk-small.jpg&quot; alt=&quot;New standing desk&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, I’d still like to CNC mill a proper wooden case for the keyboard. I may update this post once that happens.&lt;/p&gt;

&lt;p&gt;I’m also considering to order an &lt;a href=&quot;https://atreus.technomancy.us/&quot;&gt;Atreus kit&lt;/a&gt; so I’d have a second, always packed for travel keyboard. The kit comes with a PCB, which might work better at airport security checks than the hand-wired build.&lt;/p&gt;

&lt;p&gt;Another thing that is quite tempting is to make a custom firmware with &lt;a href=&quot;http://microflo.org/&quot;&gt;MicroFlo&lt;/a&gt;. I have no complaints on how QMK works, but it’d be super-cool to use our &lt;a href=&quot;https://flowhub.io/&quot;&gt;visual programming tool&lt;/a&gt; to tweak the keyboard live.&lt;/p&gt;

&lt;p&gt;Big thanks to &lt;a href=&quot;http://github.com/technomancy&quot;&gt;Technomancy&lt;/a&gt; for the Atreus design, and to XenGi for all the help during the build!&lt;/p&gt;
</description>
      <pubDate>Thu, 20 Apr 2017 00:00:00 +0000</pubDate>
      <atom:link rel="payment" href="https://flattr.com/submit/auto?url=https%3A%2F%2Fbergie.iki.fi%2Fblog%2Fatreus-build-log%2F&amp;user_id=bergie" type="text/html" />
      <link>https://bergie.iki.fi/blog/atreus-build-log/</link>
      <guid isPermaLink="true">https://bergie.iki.fi/blog/atreus-build-log/</guid>
      <author>henri.bergius@iki.fi (Henri Bergius)</author>
    </item>
    
  </channel>
</rss>
