<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on falkp.no/blog</title>
    <link>/blog/posts/</link>
    <description>falkp.no/blog (Posts)</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
      

      
    

    
    <lastBuildDate>Sat, 19 Sep 2026 00:00:00 +0200</lastBuildDate>
    
    <atom:link href="/blog/posts/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Migrated to Hugo</title>
      <link>/blog/posts/my-first-post/</link>
      <pubDate>Sat, 19 Sep 2026 00:00:00 +0200</pubDate>
      
      <guid>/blog/posts/my-first-post/</guid>
      <description>&lt;p&gt;Blog migrated to Hugo. Let me know if you find missing or bad content. Earlier generator, tinkerer, was deprecated a long time ago.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Bad battery choice</title>
      <link>/blog/posts/bad_battery_choice/</link>
      <pubDate>Sat, 21 May 2022 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/bad_battery_choice/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://shelly.cloud/&#34;&gt;Shelly&lt;/a&gt; sells a smarthome sensor called &lt;a href=&#34;https://shelly.cloud/products/shelly-door-window-2-smart-home-automation-sensor/&#34;&gt;Door/Window2&lt;/a&gt;. It works well, use wifi, is very configurable and can be used &lt;a href=&#34;https://everythingsmarthome.co.uk/5-reasons-your-smart-home-should-be-local/&#34;&gt;locally, without cloud&lt;/a&gt;. Unfortunately they&amp;rsquo;ve chosen a weird, expensive battery option, CR123A. It can cost around 70 NOK (~10 USD), and does not exist as a rechargable option. And you need two of them! So what do you do if you only have one left?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;batterycover.png&#34; alt=&#34;Battery, ESP and cover&#34;&gt;&lt;/p&gt;
&lt;p&gt;Use a single, abundant 18650 instead!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;18650.png&#34; alt=&#34;Battery, ESP and cover&#34;&gt;&lt;/p&gt;
&lt;p&gt;It fits almost perfectly, has higher capacity and can be found in any discarded electronics. They are always rechargable, and most have an included protection circuit.&lt;/p&gt;
&lt;p&gt;The CR123A is 3 V, so two gives 6 V. A standard lithium-ion is 3.7 V (2.7-4.2 actually), but this still works. The ESP8266, which the sensor is based on, can in theory run on 1.7-3.6V.&lt;/p&gt;
&lt;p&gt;Unfortunately the cover is just a bit too narrow for them. May need to design a new one suitable for 3D printing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;badfit.png&#34; alt=&#34;Battery, ESP and cover&#34;&gt;&lt;/p&gt;
&lt;p&gt;Edit: Never mind, someone beat me to it! &lt;a href=&#34;https://www.thingiverse.com/thing:5278675&#34;&gt;Shelly DW2 18650 Case&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Solar panel to DC heater</title>
      <link>/blog/posts/solar_panel_to_dc_heater/</link>
      <pubDate>Mon, 16 May 2022 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/solar_panel_to_dc_heater/</guid>
      <description>&lt;p&gt;In Norway electricity is the most popular form of heating for households at 96% (&lt;a href=&#34;https://publikasjoner.nve.no/rapport/2014/rapport2014_85.pdf&#34;&gt;source&lt;/a&gt;). Pure 230V AC is a very high-level energy, and we don&amp;rsquo;t really need that precision for heating.&lt;/p&gt;
&lt;p&gt;This is a project to see if easy, not-perfect, locally generated energy can be used to lower the heating bill.&lt;/p&gt;
&lt;p&gt;Disclamer: this is mostly for fun. A more economic aproach would be insulation, heat pump, put on a sweater, etc.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;outside.png&#34; alt=&#34;outside&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-plan&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-plan&#34;&gt;
        #
    &lt;/a&gt;
    The plan
&lt;/div&gt;
&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;             ┌──────────────────┐
             │                  │
             │                  │
   ┌─────┐   │  ┌──────────┐    │
   │     │   │  │          │    │
   │ PV  ├───┼──┤ Heater   │    │
   │     │   │  │          │    │
   └─────┘   │  └──────────┘    │
             └──────────────────┘
                  House
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A solar panel, with no controller or inverter, and a heater. Dumping heat in a basement that needs heating all year round.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-problem&#34;&gt;
        #
    &lt;/a&gt;
    The problem
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Solar panels have an optimal voltage, where they produce most power, and this changes based on light conditions. A proper controller (&lt;a href=&#34;https://en.wikipedia.org/wiki/Maximum_power_point_tracking&#34;&gt;MPPT&lt;/a&gt;) is expensive, so I want to see if I can do without.&lt;/p&gt;
&lt;h2 id=&#34;hardware&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware&#34;&gt;
        #
    &lt;/a&gt;
    Hardware
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Specs of my first setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.sparelys.no/solcellepanel-180watt-all-black-mono&#34;&gt;180 Watt panel&lt;/a&gt; (the most power I could get in a normal 12 Volt range)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.aliexpress.com/item/1005001315418433.html&#34;&gt;100 Watt heater with fan&lt;/a&gt; (I&amp;rsquo;ve ordered a 180 W model too)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/ESP8266&#34;&gt;ESP8266&lt;/a&gt; for statistics (with &lt;a href=&#34;https://esphome.io/components/sensor/dht.html&#34;&gt;dht22&lt;/a&gt;, &lt;a href=&#34;https://esphome.io/components/sensor/ads1115.html&#34;&gt;ads1115&lt;/a&gt;, &lt;a href=&#34;http://www.hotmcu.com/wiki/ACS712_Current_Sensor&#34;&gt;acs712&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;setup&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#setup&#34;&gt;
        #
    &lt;/a&gt;
    Setup
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;outside.png&#34; alt=&#34;outside&#34;&gt;&lt;/p&gt;
&lt;p&gt;The panel, wall mounted in a very sub-optimal location (shadows from people, walls).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;sensors.png&#34; alt=&#34;sensors&#34;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Panel connections in&lt;/li&gt;
&lt;li&gt;Current sensor&lt;/li&gt;
&lt;li&gt;Relay to switch off&lt;/li&gt;
&lt;li&gt;Connections out to load&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;heater.png&#34; alt=&#34;heater&#34;&gt;&lt;/p&gt;
&lt;p&gt;The heater with fan. It&amp;rsquo;s tiny. The heater is a &lt;a href=&#34;https://en.wikipedia.org/wiki/Self-regulating_heater&#34;&gt;PTC&lt;/a&gt;, so I don&amp;rsquo;t think it will pose a threat if the fan dies. In front of it is a white temperature sensor, to see that we actually produce heat.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;breadboard.png&#34; alt=&#34;breadboard&#34;&gt;&lt;/p&gt;
&lt;p&gt;A micro controller, with an external ADC. The micro controller generates graphs and control the relay. The resistors by the ADC are a voltage divider, to scale down the ~23 Volts the panel can deliver to a safe 5 Volts the ADC can measure.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;potential.png&#34; alt=&#34;Potential&#34;&gt;&lt;/p&gt;
&lt;p&gt;Unloaded the panel will be at ~22 V. With this load one can see that the output is only good when the potential keeps between 12-14 V. I have no way of controlling the voltage, except for changing to a smaller load (less effective heater).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;effect.png&#34; alt=&#34;Effect&#34;&gt;&lt;/p&gt;
&lt;p&gt;Graph of power output. Totally this gave around 600 Wh on a mostly sunny day.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;temperatures.png&#34; alt=&#34;Temperatures&#34;&gt;&lt;/p&gt;
&lt;p&gt;Green line is the temperature sensor next to the heater. Measuring right next to the fan, I&amp;rsquo;ve seen it at ~60 °C, but this one is placed a bit away. The orange line is a temperature sensor elsewhere in the room. The room seems to rise about 2 °C during a day. The gray field is cloudyness in percent.&lt;/p&gt;
&lt;h2 id=&#34;conclution&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#conclution&#34;&gt;
        #
    &lt;/a&gt;
    Conclution
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;So far this seems to generate heat as it should, but it will have to run for a pretty long time to earn back the ~1700 NOK I paid for the panel. I will test with different heaters to see if I find something that works better. A posibility is also to have several heater that can be switched on with relays based on the power available. A kind of very crude MPPT.&lt;/p&gt;
&lt;h2 id=&#34;thermal&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#thermal&#34;&gt;
        #
    &lt;/a&gt;
    Thermal
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;hotspot.png&#34; alt=&#34;Hotspots&#34;&gt;&lt;/p&gt;
&lt;p&gt;The panel seems to have some significant hotspots. Normal? Cheap panel?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;relay.png&#34; alt=&#34;Relay&#34;&gt;&lt;/p&gt;
&lt;p&gt;The relay is producing heat, but waste heat isn&amp;rsquo;t a problem in this case. =)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;esp.png&#34; alt=&#34;ESP&#34;&gt;&lt;/p&gt;
&lt;p&gt;The relay is pulling more current than a GPIO from the ESP is rated for, so it&amp;rsquo;s voltage regulator is getting very hot. Should probably fix that.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>OpenWRT on Altibox VLAN</title>
      <link>/blog/posts/openwrt_on_altibox_vlan/</link>
      <pubDate>Tue, 12 Apr 2022 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/openwrt_on_altibox_vlan/</guid>
      <description>&lt;p&gt;An ISP in Norway, &lt;a href=&#34;http://altibox.no/&#34;&gt;Altibox&lt;/a&gt;, serves up VLANs for VoIP, IPTV and internet. The included router gives no control or options for LAN management. I only use the internet service, so I replaced it with a generic router running &lt;a href=&#34;http://openwrt.org/&#34;&gt;OpenWRT&lt;/a&gt;. I found no straight forward answer to how to configure it, so here it is.&lt;/p&gt;
&lt;h2 id=&#34;the-situation&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-situation&#34;&gt;
        #
    &lt;/a&gt;
    The situation
&lt;/div&gt;
&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    ,--.
  (      )                 +--------+
 (internet)    -&amp;gt; VLANs -&amp;gt; | router | -&amp;gt; LAN
/__________)               +--------+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;AFAIK the VLANs used are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;100 - VoIP / router remote config&lt;/li&gt;
&lt;li&gt;101 - IPTV&lt;/li&gt;
&lt;li&gt;102 - internet&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;how-to&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#how-to&#34;&gt;
        #
    &lt;/a&gt;
    How-to
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;These are the settings you need to change in OpenWRT.&lt;/p&gt;
&lt;p&gt;Switch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;change vlan 2 to 102&lt;/li&gt;
&lt;li&gt;change wan on vlan 102 to tagged&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Save and apply&lt;/p&gt;
&lt;p&gt;Interface:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;edit wan&lt;/li&gt;
&lt;li&gt;change device from eth0.2 to eth0.102&lt;/li&gt;
&lt;li&gt;repeat for wan6&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Save and apply&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>BlueDo - Bluetooth proximity automation</title>
      <link>/blog/posts/bluedo/</link>
      <pubDate>Sat, 28 Aug 2021 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/bluedo/</guid>
      <description>&lt;p&gt;Lock your desktop, mute music or run any other command when leaving your PC. There are dozens of apps like this. This one just aims to make it beautiful, modern and easy.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;bluedo.png&#34; alt=&#34;logo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/Thor77/Blueproximity&#34;&gt;Blueproximity&lt;/a&gt; was a program to do this, but it never worked great for me, and has since rottened. This project was inspired, but I trid making it Gnome-ish. That means simple, limited options, but does the job.&lt;/p&gt;
&lt;p&gt;The idea is to monitor bluetooth reception from a paired device (i.e. a phone), and perform actions based on signal quality. In an office this works good for locking / unlocking your session when you&amp;rsquo;re away.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;bluedo1.png&#34; alt=&#34;bluedo screenshot&#34;&gt;&lt;/p&gt;
&lt;p&gt;Easy install from pip. See more screenshots and read instructions at &lt;a href=&#34;https://github.com/ways/bluedo&#34;&gt;gitlab&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Check Commander - Curses interface for Checkmk</title>
      <link>/blog/posts/check_commander_curses_interface_for_checkmk/</link>
      <pubDate>Sat, 24 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/check_commander_curses_interface_for_checkmk/</guid>
      <description>&lt;p&gt;A curses interface for &lt;a href=&#34;https://checkmk.com/&#34;&gt;checkmk&lt;/a&gt;. I named it Checkmk Commander, but Check Commander is easier to say.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;chkcomlogo.png&#34; alt=&#34;logo&#34;&gt;&lt;/p&gt;
&lt;p&gt;I use Checkmk daily. A few common tasks are acknowledging, downtiming and reinventorizing hosts and services. In the web UI this takes lots of clicks and time. So I wrote this client to optimize my workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;chkcom.png&#34; alt=&#34;check commander screenshot&#34;&gt;&lt;/p&gt;
&lt;p&gt;Example workflow in web UI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A new service has been detected on host1, thus I have to reinventorize it.&lt;/li&gt;
&lt;li&gt;Click on host name.&lt;/li&gt;
&lt;li&gt;Click WATO&lt;/li&gt;
&lt;li&gt;Click services&lt;/li&gt;
&lt;li&gt;Click &amp;ldquo;fix all missing/vanished&amp;rdquo;, wait.&lt;/li&gt;
&lt;li&gt;Click &amp;ldquo;1 change&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Click &amp;ldquo;Activate affected&amp;rdquo;, wait.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same in Check Commander:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A new service has been detected on host1, thus I have to reinventorize it.&lt;/li&gt;
&lt;li&gt;Navigate up/down to target the host&lt;/li&gt;
&lt;li&gt;Hit &amp;ldquo;r&amp;rdquo; and enter to confirm. Reinventorize happens in background, and one does not have to wait for it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are hotkeys for opening web pages (or run other commands) linked with the selected host. I use &amp;ldquo;w&amp;rdquo; to open the host&amp;rsquo;s wiki page, &amp;ldquo;b&amp;rdquo; to open the checkmk web UI in browser and &amp;ldquo;t&amp;rdquo; for opening a new terminal with ssh to the host.&lt;/p&gt;
&lt;p&gt;Since this is in curses, one can also run it in tmux or on a terminal server. Browser commands can then open in elinks, w3c, or other suitable CLI software.&lt;/p&gt;
&lt;p&gt;Easy install from pip. See screenshots and read more at &lt;a href=&#34;https://gitlab.com/larsfp/checkmk-commander&#34;&gt;gitlab&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Checkmk Plugins, part 1</title>
      <link>/blog/posts/checkmk_plugins/</link>
      <pubDate>Sat, 11 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/checkmk_plugins/</guid>
      <description>&lt;p&gt;Some of my &lt;a href=&#34;https://checkmk.com/&#34;&gt;checkmk&lt;/a&gt; plugins, Webchecks, Blacklist and SQL Dump. Easy deployments.&lt;/p&gt;
&lt;h2 id=&#34;blacklist&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#blacklist&#34;&gt;
        #
    &lt;/a&gt;
    Blacklist
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;If you have a server which is sending mail, drop this check in place. It will check the host it&amp;rsquo;s running from against a bunch of blacklists. No configuration needed.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gitlab.com/larsfp/checkmk-blacklist&#34;&gt;checkmk-blacklist&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;blacklist.png&#34; alt=&#34;One positive&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;webchecks&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#webchecks&#34;&gt;
        #
    &lt;/a&gt;
    Webchecks
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Easy and expansive check of web services. It will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Follow redirects&lt;/li&gt;
&lt;li&gt;Check (configurable) status code&lt;/li&gt;
&lt;li&gt;If ssl, check cert and chain. Check remaining time.&lt;/li&gt;
&lt;li&gt;Configurable string check.&lt;/li&gt;
&lt;li&gt;If URL contains dev, stage or such, complain if the site isn&amp;rsquo;t robots-blocked. Else, complain if the site &lt;em&gt;is&lt;/em&gt; robots-blocked.&lt;/li&gt;
&lt;li&gt;Find URLs to check from apache or nginx config.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://gitlab.com/larsfp/checkmk-WebChecks&#34;&gt;checkmk-webchecks&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;webchecks-ok.png&#34; alt=&#34;Webchecks&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;sql-dumps&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#sql-dumps&#34;&gt;
        #
    &lt;/a&gt;
    SQL dumps
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;This one is of less general use, and is published more as an example for further development. It&amp;rsquo;s written for an inhouse SQL dumper, somewhat similar to &lt;a href=&#34;https://github.com/sixhop/AutoMySQLBackup&#34;&gt;automysqlbackup&lt;/a&gt;. It will check for a running database server, and if found check for recent database dumps.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gitlab.com/larsfp/checkmk-stasissqldump&#34;&gt;checkmk-stasissqldump&lt;/a&gt;:&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Argos, GNOME Shell extensions</title>
      <link>/blog/posts/argos_gnome_shell_extensions/</link>
      <pubDate>Wed, 01 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/argos_gnome_shell_extensions/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/p-e-w/argos&#34;&gt;Argos&lt;/a&gt; is a free GNOME version of &lt;a href=&#34;https://github.com/matryer/bitbar&#34;&gt;BitBar&lt;/a&gt;. Both lets you run any script to create an icon in the panel (or Mac OS X Menu Bar). You can see lots of plugins here: &lt;a href=&#34;https://getbitbar.com/&#34;&gt;BitBar plugins&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;renegade-host.png&#34; alt=&#34;One renegade host&#34;&gt;&lt;/p&gt;
&lt;p&gt;This screenshot shows the hosts file, opened from the argos extension. The extension is shown as a notebook icon with the number of unknown entries.&lt;/p&gt;
&lt;p&gt;It complains on forgotten entries in your &lt;code&gt;/etc/hosts&lt;/code&gt; file. See &lt;a href=&#34;https://gitlab.com/larsfp/argos-hosts&#34;&gt;Argos-hosts&lt;/a&gt; for more info.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Graphing X Aircontrol from Trox Technik</title>
      <link>/blog/posts/graphing_x_aircontrol_from_trox_technik/</link>
      <pubDate>Wed, 01 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/graphing_x_aircontrol_from_trox_technik/</guid>
      <description>&lt;p&gt;Modern buildings have advanced HVAC systems, but they keep the data for themselves. Let&amp;rsquo;s fight that. =)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;graphs.png&#34; alt=&#34;Temperature, CO2, airflow.&#34;&gt;&lt;/p&gt;
&lt;p&gt;I got access to an X Aircontrol from Trox Technik, ZoneMaster HVAC system. It has a web server, so I started playing to see what data could be extracted.&lt;/p&gt;
&lt;p&gt;I ended up with this script &lt;a href=&#34;https://gitlab.com/larsfp/xaircontrol&#34;&gt;xaircontrol&lt;/a&gt;, which can send data to &lt;a href=&#34;https://grafana.com/&#34;&gt;Grafana&lt;/a&gt; via &lt;a href=&#34;https://collectd.org/&#34;&gt;Collectd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve used it to make some sweet floorplans.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;floorplan.png&#34; alt=&#34;Floorplan&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Non-invasive graphing of energy usage</title>
      <link>/blog/posts/non_invasive_graphing_of_energy_usage/</link>
      <pubDate>Wed, 01 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/non_invasive_graphing_of_energy_usage/</guid>
      <description>&lt;p&gt;&amp;ldquo;If you can&amp;rsquo;t measure it, you can&amp;rsquo;t improve it.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Reducing energy usage is hard if you can&amp;rsquo;t see it. Here&amp;rsquo;s a cheap way to graph home or office energy usage.&lt;/p&gt;
&lt;p&gt;By reading data from the energy meter, one can get super accurate, real-time usage data.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;energy.png&#34; alt=&#34;Energy graph&#34;&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A smart home controller, &lt;a href=&#34;https://www.home-assistant.io/&#34;&gt;Home Assistant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A graphing system, &lt;a href=&#34;https://grafana.com/&#34;&gt;Grafana&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A micro controller, &lt;a href=&#34;https://en.wikipedia.org/wiki/ESP8266&#34;&gt;esp8266&lt;/a&gt;, ~$5&lt;/li&gt;
&lt;li&gt;An &lt;a href=&#34;https://en.wikipedia.org/wiki/Photoresistor&#34;&gt;LDR sensor&lt;/a&gt;, $1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You need some familiarity with all of the above to set this up.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my energy meter:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;installation.jpg&#34; alt=&#34;Energy meter&#34;&gt;&lt;/p&gt;
&lt;p&gt;It doesn&amp;rsquo;t matter which one you have, as long as it has a LED that blinks each X kWh used. I&amp;rsquo;ve written software for the esp8266 in &lt;a href=&#34;http://micropython.org/&#34;&gt;MicroPython&lt;/a&gt;, called &lt;a href=&#34;https://gitlab.com/larsfp/esp_energy_meter&#34;&gt;esp_energy_meter&lt;/a&gt;, that measures the time between each blink. It works great, and I&amp;rsquo;ve had it running for several locations for years. See the gitlab repo for more info on setup.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;hass.png&#34; alt=&#34;In home assistant&#34;&gt;&lt;/p&gt;
&lt;p&gt;When you have this set up, you can combine it with real-time energy prices to get full control of your energy usage. And then it&amp;rsquo;s time to adjust your usage based on pricing. =)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>VEML7700 in ESPHome</title>
      <link>/blog/posts/veml7700_in_esphome/</link>
      <pubDate>Sat, 29 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/veml7700_in_esphome/</guid>
      <description>&lt;p&gt;I have a &lt;a href=&#34;https://www.adafruit.com/product/4162&#34;&gt;VEML7700&lt;/a&gt; digital light level sensor, which is not supported by &lt;a href=&#34;https://esphome.io/&#34;&gt;ESPHome&lt;/a&gt;, but can be used as a custom i2c component. This is how:&lt;/p&gt;
&lt;h2 id=&#34;espnodeyaml&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#espnodeyaml&#34;&gt;
        #
    &lt;/a&gt;
    espnode.yaml
&lt;/div&gt;
&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;esphome&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;includes&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    - veml7700_custom_sensor.h
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;libraries&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    - &lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;https://github.com/adafruit/Adafruit_VEML7700&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;sensor&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#ff6ac1&#34;&gt;platform&lt;/span&gt;: custom
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ff6ac1&#34;&gt;lambda&lt;/span&gt;: |-&lt;span style=&#34;color:#5af78e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    auto veml7700 = new VEML7700CustomSensor();
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    App.register_component(veml7700);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    return {veml7700, veml7700-&amp;gt;lux_sensor, veml7700-&amp;gt;white_sensor, veml7700-&amp;gt;als_sensor};
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    sensors:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    - name: &amp;#34;VEML7700 Light&amp;#34; # Required dummy sensor
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    - name: &amp;#34;VEML770 Lux&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        unit_of_measurement: Lux
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        accuracy_decimals: 0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    - name: &amp;#34;VEML770 White&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        unit_of_measurement: raw
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        accuracy_decimals: 0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;    - name: &amp;#34;VEML770 ALS&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        unit_of_measurement: raw
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;        accuracy_decimals: 0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;veml7700_custom_sensorh&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#veml7700_custom_sensorh&#34;&gt;
        #
    &lt;/a&gt;
    veml7700_custom_sensor.h
&lt;/div&gt;
&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#78787e&#34;&gt;&amp;#34;esphome.h&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#78787e&#34;&gt;&amp;#34;Adafruit_VEML7700.h&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;// Requires this lib installed: $ platformio lib --global install &amp;#34;Adafruit BusIO&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;// based on https://github.com/adafruit/Adafruit_VEML7700/blob/master/examples/veml7700_test/veml7700_test.ino
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;class &lt;span style=&#34;color:#ff5c57&#34;&gt;VEML7700CustomSensor&lt;/span&gt; : public PollingComponent, public Sensor {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;public&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Adafruit_VEML7700 veml &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;Adafruit_VEML7700&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;*&lt;/span&gt;lux_sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; new &lt;span style=&#34;color:#57c7ff&#34;&gt;Sensor&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;*&lt;/span&gt;white_sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; new &lt;span style=&#34;color:#57c7ff&#34;&gt;Sensor&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;*&lt;/span&gt;als_sensor &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; new &lt;span style=&#34;color:#57c7ff&#34;&gt;Sensor&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57c7ff&#34;&gt;VEML7700CustomSensor&lt;/span&gt;() &lt;span style=&#34;color:#ff6ac1&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;PollingComponent&lt;/span&gt;(&lt;span style=&#34;color:#ff9f43&#34;&gt;15000&lt;/span&gt;) {}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#9aedfe&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;setup&lt;/span&gt;() override {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Wire.&lt;span style=&#34;color:#57c7ff&#34;&gt;begin&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;begin&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;setGain&lt;/span&gt;(VEML7700_GAIN_1);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;setIntegrationTime&lt;/span&gt;(VEML7700_IT_800MS);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#78787e&#34;&gt;// veml.powerSaveEnable(true);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#78787e&#34;&gt;// veml.setPowerSaveMode(VEML7700_POWERSAVE_MODE4);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#78787e&#34;&gt;// veml.setLowThreshold(10000);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#78787e&#34;&gt;// veml.setHighThreshold(20000);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#78787e&#34;&gt;// veml.interruptEnable(true);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#9aedfe&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;update&lt;/span&gt;() override {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#9aedfe&#34;&gt;float&lt;/span&gt; lux &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;readLux&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#9aedfe&#34;&gt;float&lt;/span&gt; white &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;readWhite&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#9aedfe&#34;&gt;float&lt;/span&gt; als &lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt; veml.&lt;span style=&#34;color:#57c7ff&#34;&gt;readALS&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#57c7ff&#34;&gt;ESP_LOGD&lt;/span&gt;(&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;VEML7700&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;The value of sensor lux is: %.0f&amp;#34;&lt;/span&gt;, lux);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#57c7ff&#34;&gt;ESP_LOGD&lt;/span&gt;(&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;VEML7700&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;The value of sensor white is: %.0f&amp;#34;&lt;/span&gt;, white);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#57c7ff&#34;&gt;ESP_LOGD&lt;/span&gt;(&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;VEML7700&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;The value of sensor ALS is: %.0f&amp;#34;&lt;/span&gt;, als);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    lux_sensor&lt;span style=&#34;color:#ff6ac1&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#57c7ff&#34;&gt;publish_state&lt;/span&gt;(lux);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    white_sensor&lt;span style=&#34;color:#ff6ac1&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#57c7ff&#34;&gt;publish_state&lt;/span&gt;(white);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    als_sensor&lt;span style=&#34;color:#ff6ac1&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#57c7ff&#34;&gt;publish_state&lt;/span&gt;(als);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;};
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Nordlux lamp. Incompetence or planned obsolescence?</title>
      <link>/blog/posts/nordlux_crap/</link>
      <pubDate>Sat, 01 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/nordlux_crap/</guid>
      <description>&lt;p&gt;I got this lamp from Nordlux, model 6315. It came with unreplacable LEDs, meaning you have to throw it away when they run out. Apparently the LEDs are rated for 30.000 hours, but will they last that long?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.bauhaus.dk/nordlux-plafond-kiel-led-o28-5-cm&#34;&gt;Nordlux at Bauhaus&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;overview.jpg&#34; alt=&#34;Overview&#34;&gt;&lt;/p&gt;
&lt;p&gt;After a few years of normal use it died. I could hear the relay turning on and off, but there was no light. I followed the power all the way, and there seemed to be no problem with the transformer, relay or wires. I tried checking the voltage drop over a LED, and that gave a slight glow in all the other LEDs. So it seems the LEDs are connected in series! Meaning that &lt;strong&gt;if any of the 24 LEDs die, you have to throw away the whole lamp&lt;/strong&gt;. I&amp;rsquo;m unsure wether this is incompetence or planned obsolescence. What are the odds of all LEDs lasting a long time?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;brokenled.jpg&#34; alt=&#34;Broken LED&#34;&gt;&lt;/p&gt;
&lt;p&gt;The broken LED is apparent with a small mark on it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;bridgedled.jpg&#34; alt=&#34;Briged LED&#34;&gt;&lt;/p&gt;
&lt;p&gt;The lamp works again if the broken LED is shorted. This &amp;ldquo;repair&amp;rdquo; is only for testing. I do not suggest using a lamp in this state.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>ZFS on laptop with encrypted /home</title>
      <link>/blog/posts/zfs_encrypted_home/</link>
      <pubDate>Sun, 22 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/zfs_encrypted_home/</guid>
      <description>&lt;p&gt;With Ubuntu 19.10 it&amp;rsquo;s simple to get a workstation with boot and root on ZFS. But what&amp;rsquo;s missing from the install is encryption. This is how I did it.&lt;/p&gt;
&lt;p&gt;I suggest you first have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;basic zfs knowledge&lt;/li&gt;
&lt;li&gt;good linux knowledge&lt;/li&gt;
&lt;li&gt;no important data on the target system&lt;/li&gt;
&lt;li&gt;more than 4 GB RAM&lt;/li&gt;
&lt;li&gt;SSD or better&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;how-to&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#how-to&#34;&gt;
        #
    &lt;/a&gt;
    How-to
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install Ubuntu as normal, but choose &amp;ldquo;use ZFS&amp;rdquo;. It&amp;rsquo;s marked as experimental, but that&amp;rsquo;s because how Ubuntu uses it may change in later releases. The code it self is solid.&lt;/li&gt;
&lt;li&gt;After install is done, you&amp;rsquo;re left with a bpool and an rpool. I will only focus on encrypting /home/&lt;user&gt;. I&amp;rsquo;ll use username john in this example.&lt;/li&gt;
&lt;li&gt;Your layout will look something like this:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ zfs list -r rpool
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME                                               USED  AVAIL     REFER  MOUNTPOINT
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool                                              165G   293G       96K  /
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT                                        18,8G   293G       96K  none
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3                          18,8G   293G     3,92G  /
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/usr                      1,06M   293G       96K  /usr
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/usr/local                 992K   293G      144K  /usr/local
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var                      13,4G   293G       96K  /var
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/games                 320K   293G       96K  /var/games
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/lib                  4,36G   293G     3,72G  /var/lib
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/lib/AccountServices   320K   293G       96K  /var/lib/AccountServices
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/lib/NetworkManager   3,67M   293G      208K  /var/lib/NetworkManager
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/lib/apt              87,0M   293G     74,9M  /var/lib/apt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/lib/dpkg             87,4M   293G     41,2M  /var/lib/dpkg
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/log                   574M   293G      170M  /var/log
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/mail                 2,25M   293G      104K  /var/mail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/snap                 8,46G   293G     8,46G  /var/snap
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/spool                10,4M   293G     3,51M  /var/spool
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/ROOT/ubuntu_oyzpo3/var/www                   320K   293G       96K  /var/www
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/USERDATA                                     141G   293G       96K  /
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/USERDATA/john_75qybu                         140G   293G      126G  /home/john
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/USERDATA/root_75qybu                        1,07G   293G     1,07G  /root
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We want to replace &lt;code&gt;rpool/USERDATA/john_75qybu&lt;/code&gt; with a new, encrypted file system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create another temporary user, smith, and log out of john and in as smith.&lt;/li&gt;
&lt;li&gt;Set filesystem name in a variable, so you can copy/paste the rest: &lt;code&gt;$oldfs=&amp;quot;rpool/USERDATA/john_75qybu&amp;quot;; $newfs=&amp;quot;rpool/USERDATA/john_crypt&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Unmount: &lt;code&gt;sudo zfs umount $oldfs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reset mountpoint: &lt;code&gt;sudo zfs set mountpoint=none $oldfs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create a new, encrypted file system for your main user: &lt;code&gt;sudo zfs create -o encryption=on -o keyformat=passphrase $newfs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set mountpoint: &lt;code&gt;sudo zfs set mountpoint=/home/john $newfs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Mount: &lt;code&gt;sudo zfs mount -a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If you get complaints on missing key, run: &lt;code&gt;sudo zfs load-key -a&lt;/code&gt; and then mount again.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you had any data on the unencrypted home dir, you can mount it anywhere else (&lt;code&gt;zfs set mountpoint=/mnt ...&lt;/code&gt;), and copy data.&lt;/p&gt;
&lt;p&gt;Last thing you need to do is enable key loading at boot.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create the file &lt;code&gt;/etc/systemd/system/zfskey-tank@.service&lt;/code&gt; as:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;[&lt;/span&gt;Unit&lt;span style=&#34;color:#ff6ac1&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;Description&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;Load %I encryption keys
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;Before&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;systemd-user-sessions.service
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;Before&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;zfs-mount.service
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;After&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;zfs-import.target
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;[&lt;/span&gt;Service&lt;span style=&#34;color:#ff6ac1&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;Type&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;oneshot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;RemainAfterExit&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;ExecStart&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;/usr/bin/bash -c &lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#39;systemd-ask-password &amp;#34;Encrypted ZFS password for %I&amp;#34; --no-tty  | zfs load-key -a&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;[&lt;/span&gt;Install&lt;span style=&#34;color:#ff6ac1&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;WantedBy&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;zfs-mount.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that I&amp;rsquo;ve changed the suggested example from Arch Wiki which ended in &lt;code&gt;zfs load-key %I&lt;/code&gt; to &lt;code&gt;zfs load-key -a&lt;/code&gt;. That way all encrypted filesystems will be mounted.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;And enable: &lt;code&gt;$ sudo systemctl enable zfskey-tank@john_crypt&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Reboot and check that everything works. If you have trouble logging in, you can log in as smith and check what fails. Unlocking, mounting or access rights. It will look the same in a zfs list, but you should see a difference if you run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo zfs get encryption rpool/USERDATA/john_crypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME                         PROPERTY    VALUE        SOURCE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rpool/USERDATA/john_crypt  encryption  aes-256-ccm  -
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If everything works, you can move along to setting up snapshots or other fancy zfs stuff. =)&lt;/p&gt;
&lt;h2 id=&#34;resources&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#resources&#34;&gt;
        #
    &lt;/a&gt;
    Resources
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://wiki.archlinux.org/index.php/ZFS&#34;&gt;Arch wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Ninjabox</title>
      <link>/blog/posts/ninjabox/</link>
      <pubDate>Fri, 23 Nov 2018 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/ninjabox/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Untrickable laser alarm, with an easy-to-knock-out fusebox.&lt;/p&gt;
&lt;p&gt;A tribute to (the alarms in) &lt;a href=&#34;https://en.wikipedia.org/wiki/Mark_of_the_Ninja&#34;&gt;Mark of the Ninja&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;fusebox.jpg&#34; alt=&#34;Fusebox&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;In the game you have to sneak into buildings with high tech alarms. Some of the laser traps can be deactivated by knocking out the fuse box with a dart.&lt;/p&gt;
&lt;p&gt;So I made a laser alarm with a fusebox that can be knocked out. This is mainly to keep kids occupied, and motivated to practice throwing.&lt;/p&gt;
&lt;h2 id=&#34;features&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#features&#34;&gt;
        #
    &lt;/a&gt;
    Features
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Glowing ⚡ with simple animations and color changes (start-up, alarm, sparks)&lt;/li&gt;
&lt;li&gt;Laser triggered alarm, which can&amp;rsquo;t be fooled by using a separate laser or flash light. This is done by pulsing the laser and making sure photo resistor is relatively dark when laser is off.&lt;/li&gt;
&lt;li&gt;Motion activated &amp;ldquo;play dead&amp;rdquo; (throw somehting on the fuse box, and it will black out for 10 seconds).&lt;/li&gt;
&lt;li&gt;Play sounds for alarm, sparks, start-up&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;demo&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#demo&#34;&gt;
        #
    &lt;/a&gt;
    Demo
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;demo.jpg&#34; alt=&#34;Demo setup&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://falkp.no/blog/_static/knockout.m4v&#34;&gt;Knocking out the alarm&lt;/a&gt; (~3MB).&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://falkp.no/blog/_static/foolalarm.m4v&#34;&gt;Attempting to fool the alarm&lt;/a&gt; (~2MB).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;inside.jpg&#34; alt=&#34;Inside&#34;&gt;&lt;/p&gt;
&lt;p&gt;Not shown here: speaker and tiltsensor.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;https://gitlab.com/larsfp/ninjabox&#34;&gt;gitlab&lt;/a&gt; for build instructions and code.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Car-logger - part 3</title>
      <link>/blog/posts/car_logger_part_3/</link>
      <pubDate>Fri, 25 May 2018 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/car_logger_part_3/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;A self-hosted, real-time, inexpensive open source car tracker built with &lt;a href=&#34;https://www.raspberrypi.org/&#34;&gt;Raspberry Pi&lt;/a&gt; Zero W, &lt;a href=&#34;https://nextcloud.com/&#34;&gt;Nextcloud&lt;/a&gt;, and optionally &lt;a href=&#34;https://www.home-assistant.io/&#34;&gt;Home Assistant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;plan.jpg&#34; alt=&#34;Plan&#34;&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve had a few earlier tries at car position logging, read those first if you&amp;rsquo;re interested: &lt;a href=&#34;https://0p.no/2014/09/29/car_logger2.html&#34;&gt;Car logger 2&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Goal: logging and sharing location of my non-connected car, for practicality and fun.&lt;/p&gt;
&lt;p&gt;Earlier tries was using a phone, but that had problems. No Android phone will switch back on if it runs out of power without manual intervention.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#prerequisites&#34;&gt;
        #
    &lt;/a&gt;
    Prerequisites
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I needed power from the car, but want it to cut off when the ignition is off. My 12 V outlets didn&amp;rsquo;t. So I used a &lt;a href=&#34;http://www.biltema.no/no/Bil---MC/Bil-tilbehor/Bilelektrisk/Sikring/Flatsikringsholder-med-uttak-2-stk-2000035590/&#34;&gt;fuse holder with outlet&lt;/a&gt; to accomplish this. To that I attached a 12 to 5 V converter.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;fuses.jpg&#34; alt=&#34;Fuse box in car&#34;&gt;&lt;/p&gt;
&lt;p&gt;Also I chose to go without any battery or UPS, so the Pi has to deal with unclean shutdown every time. For this I run the SD card read-only using &lt;a href=&#34;https://github.com/ways/rpi-readonly&#34;&gt;rpi-readonly&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;hardware&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware&#34;&gt;
        #
    &lt;/a&gt;
    Hardware
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I had little experience with Arduino at the time of start, but lots with Pi, so I used a Pi Zero. Mainly for it&amp;rsquo;s low power consumption.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;prototype01.jpg&#34; alt=&#34;Pi, usb hub, gsm modem in an old harddisk cabinet&#34;&gt;&lt;/p&gt;
&lt;p&gt;I first tried &lt;a href=&#34;https://www.amazon.com/Diymall-G-mouse-Glonass-Raspberry-Aviation/dp/B00NWEEWW8/ref=sr_1_2?ie=UTF8&amp;amp;qid=1527193287&amp;amp;sr=8-2&amp;amp;keywords=gps+dongle&amp;amp;dpID=319Yen02YIL&amp;amp;preST=_SY300_QL70_&amp;amp;dpSrc=srch&#34;&gt;Diymall-G-mouse-Glonass&lt;/a&gt; GPS dongle, but reception was very bad, so switched to &lt;a href=&#34;https://www.ebay.com/itm/BN-808-USB-GPS-Antenna-Receiver-Glonass-Dual-Module-Gmouse-For-Car-Laptop-PC-NEW/263511681859?hash=item3d5a852b43:g:vdkAAOSwbF1aRfrF&#34;&gt;BN-808-USB-GPS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For uplink I used a cheap 3G USB modem &lt;a href=&#34;http://www.dx.com/p/Tolkien-Portable-Mini-USB-3G-WiFi-Router-Mobile-Device-Hotspot-Unlocked-Wireless-Modem-Network-Doggle-with-SIMTF-Card-Slot--usb-router-only-916496537&#34;&gt;Tolkien-Portable&lt;/a&gt; and a data-twin SIM card.&lt;/p&gt;
&lt;h2 id=&#34;backend&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#backend&#34;&gt;
        #
    &lt;/a&gt;
    Backend
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I started writing a backend in 2014, &lt;a href=&#34;https://github.com/ways/BigBrotherGPSweb&#34;&gt;BigBrotherGPSweb&lt;/a&gt;, but didn&amp;rsquo;t get very far. Fortunately someone has filled my need. &lt;a href=&#34;https://nextcloud.com/&#34;&gt;Nextcloud&lt;/a&gt;, a self-hosted dropbox alternative, has a plugin called &lt;a href=&#34;https://apps.nextcloud.com/apps/phonetrack&#34;&gt;PhoneTrack&lt;/a&gt;. It has nice features like public sharing, users, filters, etc. and use Openstreetmap. SSL for transport encryption.&lt;/p&gt;
&lt;p&gt;For home automation I use Home Assistant, so I also wanted the data there as well.&lt;/p&gt;
&lt;p&gt;Map in Nextcloud/PhoneTrack:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;map.jpg&#34; alt=&#34;Map&#34;&gt;&lt;/p&gt;
&lt;p&gt;Status in Home Assistant:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;hass.png&#34; alt=&#34;Home assistant&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;software&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software&#34;&gt;
        #
    &lt;/a&gt;
    Software
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I found no premade solution to use &lt;a href=&#34;https://en.wikipedia.org/wiki/Wi-Fi_positioning_system&#34;&gt;wifi triangulation&lt;/a&gt; in python, so I wrote &lt;a href=&#34;https://github.com/ways/wifindme&#34;&gt;wifindme&lt;/a&gt; (available from pip, python 2 and 3). It can use Mozilla, radiocells.org or, with small changes, Google. Use what has best coverage where you need it.&lt;/p&gt;
&lt;p&gt;For the actual reporting I wrote &lt;a href=&#34;https://github.com/ways/locationreporter&#34;&gt;LocationReporter&lt;/a&gt;. It can use wifi triangulation, GPS or both. It will use wifi while the GPS is warming up, and when GPS fails. The results can be sent to both my backends.&lt;/p&gt;
&lt;h2 id=&#34;build&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#build&#34;&gt;
        #
    &lt;/a&gt;
    Build
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve not yet created any kind of case. The tracker lives in a card board box in my car door.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;door.jpg&#34; alt=&#34;Car door&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;internals.jpg&#34; alt=&#34;Internals&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;problems&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#problems&#34;&gt;
        #
    &lt;/a&gt;
    Problems
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;PhoneTrack could be easier to use on a phone.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;improvements&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#improvements&#34;&gt;
        #
    &lt;/a&gt;
    Improvements
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The setup should be moved to the trunk, out of sight.&lt;/li&gt;
&lt;li&gt;I really should get a case and mount the parts properly.&lt;/li&gt;
&lt;li&gt;The Pi Zero has bluetooth, so I could fetch data from OBD and upload it. Unfortunately my cars OBD doesn&amp;rsquo;t supply very interesting info (no battery voltage, fuel consumption, fuel status).&lt;/li&gt;
&lt;li&gt;Should be enough to send data to either Nextcloud or Home Assistant, not both.&lt;/li&gt;
&lt;li&gt;A switch for private mode or you-don&amp;rsquo;t-have-to-post-every-ten-seconds mode could be nice.&lt;/li&gt;
&lt;li&gt;Radiocells.org let&amp;rsquo;s you download the data set for local use. Local wifi lookup is very fast, so this would make wifi triangulation faster, and less data used and leaked.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;conclusions&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#conclusions&#34;&gt;
        #
    &lt;/a&gt;
    Conclusions
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m happy with the results. It&amp;rsquo;s been running for months now without problems. And it&amp;rsquo;s good sharing our position real-time on long drives.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Volumio based radio with NFC</title>
      <link>/blog/posts/volumio_nfc_build/</link>
      <pubDate>Tue, 19 Dec 2017 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/volumio_nfc_build/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://volumio.org&#34;&gt;Volumio&lt;/a&gt; based internet radio, controlled by &lt;a href=&#34;https://en.wikipedia.org/wiki/Near-field_communication&#34;&gt;NFC&lt;/a&gt;, built in an old speaker.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;speaker1.jpg&#34; alt=&#34;Complete speaker&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Inspired by the extreemly good looking &lt;a href=&#34;http://blog.zenona.com/&#34;&gt;Spotify Box&lt;/a&gt; and QR based systems like &lt;a href=&#34;http://tilman.de/projekte/audiosphere/&#34;&gt;Audiosphere&lt;/a&gt;, I wanted to make something similar for my kids. I&amp;rsquo;ve earlier built a few radios based on small, cheap bluetooth speakers like music angel, but wanted something with better sound this time.&lt;/p&gt;
&lt;h2 id=&#34;prototype&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#prototype&#34;&gt;
        #
    &lt;/a&gt;
    Prototype
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;QR are fast and cheap, so I made a quick prototype. It turned out they are unreliable when there&amp;rsquo;s no display to give feedback on how the camera sees them. Both lighting and focus was a problem.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;qr1.jpg&#34; alt=&#34;QR reader&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;qr2.jpg&#34; alt=&#34;QR view&#34;&gt;&lt;/p&gt;
&lt;p&gt;Next up, NFC. I decided on a PN532 NFC reader, simply because I had one around. They&amp;rsquo;re about $8 / 70 NOK on ebay. It communicates via i2c, and there&amp;rsquo;s a python library for it. I decided to make it easy for myself and allow for any kind of NFC tag I could get hold of, so the plan was to read and use what ever data or ID the tags contain, and make a list to match IDs and URLs.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;nfcreader1.jpg&#34; alt=&#34;NFC reader&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;volumio&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#volumio&#34;&gt;
        #
    &lt;/a&gt;
    Volumio
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://volumio.org&#34;&gt;Volumio&lt;/a&gt; is a general music player for small devices like the &lt;a href=&#34;http://raspberrypi.org/&#34;&gt;Pi&lt;/a&gt;. Due to &lt;a href=&#34;https://www.mopidy.com/&#34;&gt;Mopidy&lt;/a&gt; it supports playing music from lots of sources. The two I&amp;rsquo;m interessted in are internet radios and Spotify, but this will work for anything Mopidy can play.&lt;/p&gt;
&lt;p&gt;Volumio also has &lt;a href=&#34;https://volumio.org/forum/volumio-plugins-collection-t6251.html&#34;&gt;plugins&lt;/a&gt; for other stuff, like mono output, being a Spotify Connect speaker and button controls connected via GPIO like I will use here.&lt;/p&gt;
&lt;h2 id=&#34;setup&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#setup&#34;&gt;
        #
    &lt;/a&gt;
    Setup
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;As mentioned in the &lt;a href=&#34;https://github.com/ways/volumio-nfc&#34;&gt;readme&lt;/a&gt;, there are a few steps to install NFC support. You have to &lt;a href=&#34;https://volumio.github.io/docs/User_Manual/SSH.html&#34;&gt;enable SSH&lt;/a&gt; first. Then install packages, check that the i2c connection to the reader is working, enable services.&lt;/p&gt;
&lt;p&gt;Reading a tag looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ ./readnfc.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Reading tag list readnfc.list
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff9f43&#34;&gt;6&lt;/span&gt; tags in store. Ready to read.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Card data: bytearray&lt;span style=&#34;color:#ff6ac1&#34;&gt;(&lt;/span&gt;b&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#39;K\x01\x01\x00D\x00\x07\x04!T\xcao?\x81&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;)&lt;/span&gt; / 4b010100440007042154ca6f3f81
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Stoping any music currently playing
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Play audio feedback.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;webradio http://nrk-mms-live.telenorcdn.net:80/nrk_radio_alltid_nyheter_aac_h
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Play selected &lt;span style=&#34;color:#ff5c57&#34;&gt;source&lt;/span&gt; webradio http://nrk-mms-live.telenorcdn.net:80/nrk_radio_alltid_nyheter_aac_h
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then you add that tag to your list, readnfc.list, in the same directory. There are lots of examples for radios and spotify playlists in it already. Restart the service and you should be done.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://falkp.no/blog/_static/demo.m4v&#34;&gt;See demo video&lt;/a&gt; (~4MB).&lt;/p&gt;
&lt;h2 id=&#34;hardware&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware&#34;&gt;
        #
    &lt;/a&gt;
    Hardware
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;For sound I connected a &lt;a href=&#34;https://www.ebay.com/itm/Mini-USB-2-0-3D-Virtual-480Mbps-External-7-1-Channel-Audio-Sound-Card-Adapter/162432421351?epid=11004887919&amp;amp;hash=item25d1ba0de7:g:~JQAAOSwWxNYyV1A&#34;&gt;cheap USB soundcard&lt;/a&gt; (first hit on ebay), via a &lt;a href=&#34;https://www.ebay.com/itm/Ground-Loop-Noise-Filter-Isolator-3-5mm-Cable-For-Home-Stereo-Car-Audio-GW/282776792501?hash=item41d6cf6db5:g:9fQAAOSwhsBaN1Pj&#34;&gt;ground loop filter&lt;/a&gt; to a &lt;a href=&#34;https://www.adafruit.com/product/1752&#34;&gt;Class D amplifier&lt;/a&gt;, to the terminals of the speaker.&lt;/p&gt;
&lt;p&gt;A 1k potmeter for volume, and two push-buttons for play/pause and next.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;hardware1.jpg&#34; alt=&#34;Hardware&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;hardware2.jpg&#34; alt=&#34;Hardware&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;tags&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#tags&#34;&gt;
        #
    &lt;/a&gt;
    Tags
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Any tags works, but they need to look attractive, so I created some business card sized pictures to hold them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;tags1.jpg&#34; alt=&#34;Assorted tags&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;tags2.jpg&#34; alt=&#34;Tags&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;tags3.jpg&#34; alt=&#34;A sheet of tags&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;tags4.jpg&#34; alt=&#34;Scanning tag&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>So Hell has frozen over...</title>
      <link>/blog/posts/so_hell_has_frozen_over/</link>
      <pubDate>Wed, 09 Nov 2016 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/so_hell_has_frozen_over/</guid>
      <description>&lt;p&gt;So here we are, Hell really has frozen over&amp;hellip;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ finger hell@graph.no
           -= Meteogram for norway/nord-trøndelag/stjørdal/hell
 &amp;#39;C                                                                   Rain (mm)
  0
 -1
 -2      ^^^^^^
 -3   ^^^      ^^^
 -4=--            ^^^^^^
 -5                     ^^^^^^^^^^^^^^^                     ^^^^^^^^^
 -6                                    ------------=--=--^^^
 -7
 -8
 -9
    11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06 07 08 Hour

     E  E  E  E  E  E SE  E  E  E  E  E  E  E  E  E  E SE SE SE SE SE Wind dir.
     2  2  3  4  3  2  2  2  3  3  3  4  4  3  3  3  3  3  3  3  4  3 Wind(mps)

 Legend left axis:   - Sunny   ^ Scattered   = Clouded   =V= Thunder   # Fog
 Legend right axis:  | Rain    ! Sleet       * Snow
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>RadiOS part 2</title>
      <link>/blog/posts/radios_part_2/</link>
      <pubDate>Wed, 17 Aug 2016 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/radios_part_2/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;http://0p.no/2014/05/09/radios_part_1.html&#34;&gt;RadiOS part 1&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I started making a prototype to figure out if I could &amp;ldquo;sense&amp;rdquo; both selections with GPIO pins, while the designer started modeling and rendering suggestions for the physical design. The solution chosen was to first set all volume control pins to high, and check which channel control points registered as on, then reverse (control points high, check volumes).&lt;/p&gt;
&lt;h2 id=&#34;sound&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#sound&#34;&gt;
        #
    &lt;/a&gt;
    Sound
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;For sound we tore down a &lt;a href=&#34;http://musicangel.no/speakers/&#34;&gt;Music Angel&lt;/a&gt; portable speaker. It gave us two speakers, an amplifier running on 5V and a battery which we threw away. The built in soundcard gave horrible sound under certain conditions, so a cheap USB soundcard was used instead.&lt;/p&gt;
&lt;h2 id=&#34;case&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#case&#34;&gt;
        #
    &lt;/a&gt;
    Case
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;We wanted to try both a 3D-printed version and a &lt;a href=&#34;https://en.wikipedia.org/wiki/CNC_wood_router&#34;&gt;CNC&amp;rsquo;ed&lt;/a&gt; one. A print at &lt;a href=&#34;http://shapeways.com&#34;&gt;Shapeways&lt;/a&gt; would cost us ~$200, plus shiping and tax. We got one printed localy for ~$80. It&amp;rsquo;s has yet to be used. A local CNC person wanted ~$270. The case we&amp;rsquo;ve used in the final build is hand made of wood.&lt;/p&gt;
&lt;h3 id=&#34;plastic-case&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#plastic-case&#34;&gt;
        ##
    &lt;/a&gt;
    Plastic case
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;11.JPG&#34; alt=&#34;rendering back&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;12.JPG&#34; alt=&#34;rendering inside&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;13.JPG&#34; alt=&#34;rendering empty&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;14.JPG&#34; alt=&#34;rendering outside&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;plastic.png&#34; alt=&#34;actual case&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;renderings-of-other-variations&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#renderings-of-other-variations&#34;&gt;
        ##
    &lt;/a&gt;
    Renderings of other variations
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;17.JPG&#34; alt=&#34;rendering ceramic&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;15.JPG&#34; alt=&#34;rendering standing&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;prototype&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#prototype&#34;&gt;
        #
    &lt;/a&gt;
    Prototype
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;rpi_gpio.jpg&#34; alt=&#34;GPIO connected.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;testing.png&#34; alt=&#34;testing&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;build-1&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#build-1&#34;&gt;
        #
    &lt;/a&gt;
    Build 1
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;We chose to paint the front in black board paint, to allow easy change of channel labels and a personal touch.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;blank.png&#34; alt=&#34;blank front&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;shelf.png&#34; alt=&#34;finished model on shelf&#34;&gt;&lt;/p&gt;
&lt;p&gt;Other builds may have a white board front, or be something very different.&lt;/p&gt;
&lt;h2 id=&#34;conclution-so-far&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#conclution-so-far&#34;&gt;
        #
    &lt;/a&gt;
    Conclution so far
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s an interessting UI, and people want to touch it. However programming the channels and first time setup is hard. Also the Pi or musicbox is very slow to start streaming. This kind of breaks the fun of it.&lt;/p&gt;
&lt;p&gt;To be continued&amp;hellip;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Using finger service the wrong way</title>
      <link>/blog/posts/using_finger_service_the_wrong_way/</link>
      <pubDate>Tue, 31 May 2016 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/using_finger_service_the_wrong_way/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re doing this, you&amp;rsquo;re doing it wrong&amp;hellip;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2016-05-31 10:19:45.493314 Client 92.x.x.192 hamburg, germany/hamburg/hamburg
2016-05-31 10:19:48.443380 Client 74.x.x.189 greensboro, united_states/north_carolina/greensboro
2016-05-31 10:19:56.733260 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.745653 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.759656 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.819283 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:20:16.287744 Client 5.x.x.13 kaiserslautern, germany/rhineland-palatinate/kaiserslautern
2016-05-31 10:20:35.182942 Client 85.x.x.140 katowice, poland/silesia/katowice
2016-05-31 10:20:47.029550 Client 193.x.x.226 oslo, norway/oslo/oslo/oslo
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Lots of people use the finger service &lt;strong&gt;@graph.no&lt;/strong&gt; in an automated way. That&amp;rsquo;s quite alright, it&amp;rsquo;s what it&amp;rsquo;s there for. As an example:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;sd_full.jpg&#34; alt=&#34;@graph.no used in an automated way at the Computer Science department at the KIT Karlsruhe&#34;&gt;&lt;/p&gt;
&lt;p&gt;But if you&amp;rsquo;re asking for the same data five times a second (until you get blocked by my firewall for a minute), you have to check your code. The data is at best changing every ~30 minutes.&lt;/p&gt;
&lt;p&gt;A likely scenario is putting it in &lt;strong&gt;screen&lt;/strong&gt;/&lt;strong&gt;tmux&lt;/strong&gt; status line. If you do that, you need to change how often your terminal multiplexer is updating the status line. A better way is to have a cron script fetching the data, and storing it in i.e. &lt;code&gt;/tmp/weather&lt;/code&gt; every 30-60 minutes, and then have your status line read from that.&lt;/p&gt;
&lt;p&gt;Another scenario could be people running it in &lt;strong&gt;watch&lt;/strong&gt;, which by default updates every two seconds. Also wrong. Please use -n 600 more.&lt;/p&gt;
&lt;p&gt;If you fetch the data, and &lt;strong&gt;grep&lt;/strong&gt; out what you need, then fetch the data once, and &lt;strong&gt;grep&lt;/strong&gt; all you like. Don&amp;rsquo;t fetch for each &lt;strong&gt;grep&lt;/strong&gt;. An example of this can be seen in the client &lt;a href=&#34;https://github.com/ways/pyyrascii/blob/master/graph.sh&#34;&gt;graph.sh&lt;/a&gt;, which fetches the data, &lt;strong&gt;sed&lt;/strong&gt; a lot and present it using unicode weather symbols and colors.&lt;/p&gt;
&lt;p&gt;Feel free to contact me if you need scripts/examples or have questions.&lt;/p&gt;
&lt;p&gt;Also, don&amp;rsquo;t feel ashamed, beaverton, you&amp;rsquo;re not alone in hammering me. I just don&amp;rsquo;t have any way to contact users. I still love you all. =)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Weather via finger, an update</title>
      <link>/blog/posts/weather_via_finger_an_update/</link>
      <pubDate>Tue, 31 May 2016 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/weather_via_finger_an_update/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I meant to write this post in February, but never had the time.&lt;/p&gt;
&lt;p&gt;Something exploded at Tuesday 2016-02-16.&lt;/p&gt;
&lt;p&gt;I created the finger weather service in 2012, and announced it at Reddit. It got some mentions in Norwegian blogs, and i gathered a few regular users. See old stats in previous post.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m no fan of social media, and try to stay away. But apparently someone recently noticed the service and tweeted about it. Then blogs. Since I have regularly received &amp;ldquo;thank you&amp;rdquo; mails due to one of the random messages at the bottom (Mail a &amp;ldquo;thank you&amp;rdquo; to &lt;a href=&#34;mailto:finger@falkp.no&#34;&gt;finger@falkp.no&lt;/a&gt; if you like the service.).&lt;/p&gt;
&lt;p&gt;It not only overwhelmed me, but the service was having trouble keeping up. The code was my first Python project of some size, is not 3.0, and has not been revisited since. It contains lots of unrelated cruft (news, time, date, coffee) which was the start of a terminal screensaver and is certainly not optimized for lots of clients.&lt;/p&gt;
&lt;p&gt;After a few freezes, one which caused a night of downtime, I enabled rate limiting (ufw limit), which blocks &amp;gt; 4 subsequent requests from one IP within 30 seconds. The data is cached for 20 minutes anyway (a requirement from the data source), so there&amp;rsquo;s no use in hammering.&lt;/p&gt;
&lt;p&gt;Lot&amp;rsquo;s of tweets thanked the Meteorological Institute for this: &lt;em&gt;&amp;ldquo;Norwegian Meteorological Institute provides CLI weather reports.&amp;rdquo;&lt;/em&gt;. While I&amp;rsquo;m thankful to them for their open data, they do not have any further involvement in this service.&lt;/p&gt;
&lt;h2 id=&#34;common-questions-ive-received&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#common-questions-ive-received&#34;&gt;
        #
    &lt;/a&gt;
    Common questions I&amp;rsquo;ve received
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;fahrenheit-and-us-zip-codes&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#fahrenheit-and-us-zip-codes&#34;&gt;
        ##
    &lt;/a&gt;
    Fahrenheit and u.s. zip codes
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Sorry, won&amp;rsquo;t happen. Not because I don&amp;rsquo;t want to, but because I don&amp;rsquo;t have time. I will accept pull requests on github. Zip codes may be hard.&lt;/p&gt;
&lt;h3 id=&#34;cant-find-my-city&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#cant-find-my-city&#34;&gt;
        ##
    &lt;/a&gt;
    Can&amp;rsquo;t find my city
&lt;/div&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Search for it on &lt;a href=&#34;http://yr.no&#34;&gt;http://yr.no&lt;/a&gt;. If it&amp;rsquo;s not there, you won&amp;rsquo;t find it.&lt;/li&gt;
&lt;li&gt;Remove any spaces, attempt to cut off part of the name. Searching is done via MySQLs LIKE operator. I.e. this support request:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;I would like to query the weather in Frankfurt am Main, data from here:
http://www.yr.no/stad/Tyskland/Hessen/Frankfurt_am_Main/varsel.xml

All of these Queries give me the weather for Frankfurt/Oder

finger frankfurt@graph.no
finger frankfurtmain@graph.no
finger frankfurt_am_main@graph.no
finger 2925533@graph.no
finger &amp;#34;frankfurt am main&amp;#34;@graph.no
finger &amp;#34;frankfurt main&amp;#34;@graph.no
finger frankfurt_main@graph.no
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The solution here was to use frankfurtam. The full name will also work, frankfurtammain.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Some cities will simply not be reachable due to the poor look-up method in use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If I ever get time, I&amp;rsquo;d like to rewrite how one locates cities, but I&amp;rsquo;m guessing it won&amp;rsquo;t happen.&lt;/p&gt;
&lt;h3 id=&#34;data-doesnt-match-yrno--why-isnt-my-weather-hourly&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#data-doesnt-match-yrno--why-isnt-my-weather-hourly&#34;&gt;
        ##
    &lt;/a&gt;
    Data doesn&amp;rsquo;t match yr.no / why isn&amp;rsquo;t my weather hourly
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Yr.no supplies data for most of the world, but international treaties keep them from supplying hourly for any place outside their own model (meaning outside of scandinavia). So in scandinavia you&amp;rsquo;ll see something like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ finger oslo@graph.no|grep Hour
22 23 00 01 02 03 04_05_06_07_08_09_10_11_12_13_14_15_16_17_18_19 Hour
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;while in other places it will look like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;finger wellington@graph.no|grep Hour
_09_12_15 18 21 00 03 06_09_12_15 18 21 00 03 06 Hour
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I&amp;rsquo;ve asked them about it, and their hoping for a change to this policy for the countries which are members of &lt;a href=&#34;http://www.ecmwf.int/&#34;&gt;ECMWF&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Your own Ruter.no realtime monitor</title>
      <link>/blog/posts/your_own_ruter_no_realtime_monitor/</link>
      <pubDate>Mon, 23 May 2016 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/your_own_ruter_no_realtime_monitor/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;By request, a quick how-to on setting up your own realtime monitor for &lt;a href=&#34;http://ruter.no&#34;&gt;ruter.no&lt;/a&gt;, Oslos public transit.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;mon.png&#34; alt=&#34;Ruter realtime example&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;as-simple-as-possible&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#as-simple-as-possible&#34;&gt;
        #
    &lt;/a&gt;
    As simple as possible
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Get an old laptop&lt;/li&gt;
&lt;li&gt;Set it to start a web browser at boot&lt;/li&gt;
&lt;li&gt;Make the browser start to i.e. &lt;a href=&#34;http://mon.ruter.no/monitor/3010314/Adamstuen/2190090&#34;&gt;http://mon.ruter.no/monitor/3010314/Adamstuen/2190090&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Done!&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Ruter has an &lt;a href=&#34;https://ruter.no/labs/&#34;&gt;API&lt;/a&gt;, so you can go crazy and implement your own client easily, like I&amp;rsquo;ve done with &lt;a href=&#34;https://github.com/ways/rutercli&#34;&gt;rutercli&lt;/a&gt;. But there&amp;rsquo;s a much simpler solution. They&amp;rsquo;ve got a website in the same style as their public monitors, mon.ruter.no. You can start with the link above, and find the numbers and names you need from a normal ruter.no search. You&amp;rsquo;ll also find &lt;a href=&#34;http://nsb.no&#34;&gt;NSB&lt;/a&gt; stuff there. See &lt;a href=&#34;https://ruter.no/reiseplanlegger/sanntid/egen-sanntidsskjerm/&#34;&gt;ruter.no/reiseplanlegger/sanntid/egen-sanntidsskjerm&lt;/a&gt; for more info.&lt;/p&gt;
&lt;h2 id=&#34;in-a-white-wooden-frame&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#in-a-white-wooden-frame&#34;&gt;
        #
    &lt;/a&gt;
    In a white wooden frame
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a basic example in a photo frame:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;front.jpg&#34; alt=&#34;Front view&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;back.jpg&#34; alt=&#34;Back view&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;wall.jpg&#34; alt=&#34;On wall&#34;&gt;&lt;/p&gt;
&lt;p&gt;This one is run by a &lt;a href=&#34;http://www.digitalimpuls.no/PC-komponenter/Enkortsdata/Raspberry-Pi/Hovedkort/Raspberry-Pi-Modell-B-512MB-Ram-Oppdatert-versjon-av-Model-B129545-p0000087985&#34;&gt;Raspberry Pi&lt;/a&gt; model B, but any model will do. The screen is from &lt;a href=&#34;http://www.chalk-elec.com/?page_id=1280#!/10-LCD-LVDS-bundle-RaspberryPi/p/39527161/category=3094859&#34;&gt;Chalk-elec&lt;/a&gt;, but any display will do. The frame is a normal photo frame. Then there&amp;rsquo;s some glue and plastics on the back to hold it all together.&lt;/p&gt;
&lt;p&gt;To align two different transits use something like this HTML:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;html&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;TITLE&lt;/span&gt;&amp;gt;Info Screen&amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;TITLE&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;http-equiv&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;refresh&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;content&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;6000&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;charset&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;HEAD&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;body&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;style&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;background-color:#2a2a2a&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;scroll&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;no&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;iframe&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;src&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;http://mon.ruter.no/monitor/2190090/Østerås [T-bane] (Bærum)?rows=4 &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;align&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;left&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;width&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;100%&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;height&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;550&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;scrolling&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;no&amp;#34;&lt;/span&gt;  &lt;span style=&#34;color:#57c7ff&#34;&gt;frameborder&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;iframe&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;iframe&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;src&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;http://mon.ruter.no/monitor/2190090/Østerås [T-bane] (Bærum)?rows=4 &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;align&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;left&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;width&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;100%&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;height&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;550&lt;/span&gt; &lt;span style=&#34;color:#57c7ff&#34;&gt;scrolling&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;no&amp;#34;&lt;/span&gt;  &lt;span style=&#34;color:#57c7ff&#34;&gt;frameborder&lt;/span&gt;&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#5af78e&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;iframe&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#ff6ac1&#34;&gt;HTML&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And to have it start automatically at boot, edit /etc/xdg/lxsession/LXDE/autostart to look like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@xset s off
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@xset -dpms
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@xset s noblank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@unclutter
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My crontab:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@daily /sbin/reboot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@reboot sleep 10; /root/browser.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And /root/browser.sh contains:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#78787e&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;killall midori
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;midori &lt;span style=&#34;color:#5af78e&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --app&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;rutyr.html &lt;span style=&#34;color:#5af78e&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --display&lt;span style=&#34;color:#ff6ac1&#34;&gt;=&lt;/span&gt;:0 &lt;span style=&#34;color:#5af78e&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --execute Fullscreen
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Android with as little closed source as possible - part 2</title>
      <link>/blog/posts/android_with_as_little_closed_source_as_possible2/</link>
      <pubDate>Thu, 26 Feb 2015 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/android_with_as_little_closed_source_as_possible2/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Read part one of &lt;a href=&#34;http://0p.no/2013/11/25/android_with_as_little_closed_source_as_possible.html&#34;&gt;Android with as little closed source as possible&lt;/a&gt;, &lt;a href=&#34;http://0p.no/2013/11/25/life_without_us_cloud_services.html&#34;&gt;Life without US cloud services&lt;/a&gt; and &lt;a href=&#34;http://0p.no/2013/12/31/androids_privacy_invasiveness.html&#34;&gt;Androids privacy invasiveness&lt;/a&gt; if you&amp;rsquo;re wondering why I&amp;rsquo;m doing this.&lt;/p&gt;
&lt;p&gt;This is an update on how to live with a free and open (Android based) phone.&lt;/p&gt;
&lt;p&gt;Some time during 2014 I went all-in, and removed Google Play. My previous article (&lt;a href=&#34;http://0p.no/2013/11/25/android_with_as_little_closed_source_as_possible.html&#34;&gt;Android with as little closed source as possible&lt;/a&gt;) left a list of closed source apps I was still dependent on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Google Maps&lt;/li&gt;
&lt;li&gt;Yatse&lt;/li&gt;
&lt;li&gt;Youtube&lt;/li&gt;
&lt;li&gt;TinyCam monitor free&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When dropping Google Play I had to drop Maps and Youtube. They can&amp;rsquo;t work without. Maps is replaced with &lt;a href=&#34;http://osmand.net&#34;&gt;OsmAnd&lt;/a&gt;, which even can work totally off-line (no data usage, lower battery usage). Youtube can be used via a web browser.&lt;/p&gt;
&lt;p&gt;I still have a folder of proprietary apps on my phone, installed via a &lt;a href=&#34;http://downloader-apk.com/&#34;&gt;APK downloader&lt;/a&gt;. There&amp;rsquo;s even an app to let you know when there are updates: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=apktrack&amp;amp;fdid=fr.kwiatkowski.ApkTrack&#34;&gt;ApkTrack&lt;/a&gt;. These apps are due to services hard to avoid (Spotify/Wimp for music streaming, Ruter for public transportation, NRK for public broadcast TV, Tesla/Airtame/SeekThermal for special hardware). These apps doesn&amp;rsquo;t bother me, and the OS with privacy guard has them locked down.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;proprietary.png&#34; alt=&#34;Proprietary Apps&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;firmware&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#firmware&#34;&gt;
        #
    &lt;/a&gt;
    Firmware
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;There is still no phone with open firmware in sight. Even FirefoxOS comes with binary blobs. But getting rid of the three big ones, &lt;a href=&#34;https://medium.com/backchannel/why-i-m-saying-goodbye-to-apple-google-and-microsoft-78af12071bd&#34;&gt;Apple, Google and Microsoft&lt;/a&gt; is a good thing, no matter what you&amp;rsquo;re running.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>µg - A plugin-based replacement for gapps (updated)</title>
      <link>/blog/posts/nogapps2/</link>
      <pubDate>Sat, 10 Jan 2015 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/nogapps2/</guid>
      <description>&lt;p&gt;This is a follow-up of &lt;a href=&#34;http://0p.no/2014/10/16/nogapps___a_replacement_for_gapps.html&#34;&gt;Nogapps - A replacement for gapps&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://forum.xda-developers.com/showthread.php?t=1715375&#34;&gt;NOGAPPS&lt;/a&gt; project has been renamed to &lt;a href=&#34;http://forum.xda-developers.com/android/apps-games/app-g-unifiednlp-floss-wi-fi-cell-tower-t2991544&#34;&gt;µg&lt;/a&gt;, and the part that interessts me the most, off-line, libre, coarse localization is called µg Unified [Nlp (Network Location Provider)].&lt;/p&gt;
&lt;p&gt;The forum is sparse on usage information, so this aims to be a how-to with screenshots.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#prerequisites&#34;&gt;
        #
    &lt;/a&gt;
    Prerequisites
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A rooted phone&lt;/li&gt;
&lt;li&gt;No Google services installed&lt;/li&gt;
&lt;li&gt;Android [4.4 (KitKat)] - [5.0 (Lollipop)]. If you&amp;rsquo;ve got and older version, see the projects &lt;a href=&#34;https://github.com/microg/android_packages_apps_UnifiedNlp&#34;&gt;github&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;installation&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#installation&#34;&gt;
        #
    &lt;/a&gt;
    Installation
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=com.google.android.gms&#34;&gt;µg UnifiedNlp&lt;/a&gt;. Installing from &lt;a href=&#34;https://f-droid.org/&#34;&gt;f-droid&lt;/a&gt; is the easiest way.&lt;/li&gt;
&lt;li&gt;Now you need providers. Search for nlp in f-droid, and install i.e. &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.gfd.gsmlocation&#34;&gt;GSMLocationNlpBackend&lt;/a&gt;. This will give access to two databases of GSM cell towers and their locations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;nlp.png&#34; alt=&#34;NLP&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#configuration&#34;&gt;
        #
    &lt;/a&gt;
    Configuration
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Find the &amp;ldquo;µg UnifiedNlp&amp;rdquo; app and open it, go to &amp;ldquo;Configure location backends&amp;rdquo;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;unifiedlocation.png&#34; alt=&#34;unifiedlocation&#34;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hit the gear to configure GSM Location Backend.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;gsmlocation.png&#34; alt=&#34;gsmlocation&#34;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mozilla Location Services can be activated right away.&lt;/li&gt;
&lt;li&gt;To activate OpenCellId you need an API key. Head over to &lt;a href=&#34;http://opencellid.org/#action=database.requestForApiKey&#34;&gt;OpenCellId.org&lt;/a&gt; and register.&lt;/li&gt;
&lt;li&gt;Make sure you&amp;rsquo;re on a decent network, preferably WiFi, and hit &amp;ldquo;Generate Database&amp;rdquo;. It will download a few hundred MB, depending on your location. Note that one seems limited to one database dump from OpenCellId per day. Subsequent attempts will fail.&lt;/li&gt;
&lt;li&gt;You also have to make sure your android location settings are set to &amp;ldquo;Powersave&amp;rdquo; (WiFi and GSM) or &amp;ldquo;High precision&amp;rdquo; (GPS + WiFi and GSM).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;positionsettings.png&#34; alt=&#34;positionsettings&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;backend-alternatives&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#backend-alternatives&#34;&gt;
        #
    &lt;/a&gt;
    Backend alternatives
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Currently a search for [Nlp (Network Location Provider)] in f-droid gives,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.microg.nlp.backend.apple&#34;&gt;AppleWifiNlpBackend&lt;/a&gt; - using Apples WiFi database&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.gfd.gsmlocation&#34;&gt;GSMLocationNlpBackend&lt;/a&gt; - using cellid from &lt;a href=&#34;http://opencellid.org/&#34;&gt;OpenCellId&lt;/a&gt; and &lt;a href=&#34;https://wiki.mozilla.org/Mobile/Projects/Geolocation_services&#34;&gt;Mozilla Location Services&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.fitchfamily.android.gsmlocation&#34;&gt;LocalGsmNlpBackend&lt;/a&gt; - Collecting and using cellids seen by phone. Nothing is uploaded or downloaded.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.fitchfamily.android.wifi_backend&#34;&gt;LocalWifiNlpBackend&lt;/a&gt; - Collecting and using wifi seen by phone. Nothing is uploaded or downloaded.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=nlp&amp;amp;fdid=org.microg.nlp.backend.nominatim&#34;&gt;NominatimNlpBackend&lt;/a&gt; - &amp;ldquo;Backend that uses MapQuest&amp;rsquo;s Nominatim service (based on OpenStreeMap) for geocoding.&amp;rdquo;. Not sure what this is for.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There seems to be more Network Location Providers on the way, like &lt;a href=&#34;https://github.com/microg/OpenWlanMapNlpBackend&#34;&gt;OpenWLANMap&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;testing&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#testing&#34;&gt;
        #
    &lt;/a&gt;
    Testing
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Now does this work?&lt;/p&gt;
&lt;p&gt;Using LocalWifiNlpBackend I can find my location without GPS, fast. But this is a very selfish method (not sharing data), and it only works where your phone has been and had GPS signal before.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve had less success with GSMLocationNlpBackend, even though I know my neighborhood is mapped. Will update this if I experience differently.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;noposition.png&#34; alt=&#34;noposition&#34;&gt;&lt;/p&gt;
&lt;p&gt;OpenWLANMap is probably a better bet for proper localization, so hold on for those to arrive!&lt;/p&gt;
&lt;p&gt;Edit: After the update of µg UnifiedNlp (Version 1.2.0 - Added on 2015-01-19), localization works great for me! (And by that I mean the test that failed in the last paragraph).&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>graph.no - Weather forecast via finger</title>
      <link>/blog/posts/graph_no___weather_forecast_via_finger/</link>
      <pubDate>Sat, 13 Dec 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/graph_no___weather_forecast_via_finger/</guid>
      <description>&lt;h2 id=&#34;the-idea&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-idea&#34;&gt;
        #
    &lt;/a&gt;
    The idea
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;http://yr.no&#34;&gt;Yr.no&lt;/a&gt; has a brilliant &lt;a href=&#34;http://www.yr.no/place/Norway/Oslo/Oslo/Oslo/hour_by_hour.html&#34;&gt;hour by hour&lt;/a&gt; view. A simple picture where you get all info you need for planning your next 48 hours.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;meteogram.png&#34; alt=&#34;Yr.no&#34;&gt;&lt;/p&gt;
&lt;p&gt;They also give out all their &lt;a href=&#34;http://om.yr.no/verdata/free-weather-data/&#34;&gt;weather data for free&lt;/a&gt;! Having a special fascination for the command line, I wondered if I could represent the same information in a basic, ASCII, 80x22 terminal.&lt;/p&gt;
&lt;h2 id=&#34;development&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#development&#34;&gt;
        #
    &lt;/a&gt;
    Development
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Earlier I&amp;rsquo;d made my first telnet service for keeping an eye on the status of the office coffee pot (&lt;a href=&#34;http://coffee.graph.no&#34;&gt;coffee.graph.no&lt;/a&gt; / telnet graph.no). After that, I pondered for a while on how to allow for choosing location via such a limited protocol. I did not want to make a service that had to be used by hand, like &lt;a href=&#34;http://www.thelinuxblog.com/quickly-checking-the-weather-with-telnet/&#34;&gt;wunderground&lt;/a&gt;, which I discovered later, but one that could be used in an automated sense.&lt;/p&gt;
&lt;p&gt;I considered running one instance at each port for a subset of the Norwegian postal codes, like 1000, 2000, 3000, etc. Or even for each hundred. I was stopped in pursuing this by two limitations in xinitd: no support for responding to several ports with one config file, and trouble of passing on which port was used to the daemon.&lt;/p&gt;
&lt;p&gt;I also tried to allow for passing an input so that one could run echo &amp;ldquo;oslo&amp;rdquo; | nc graph.no telnet. Can&amp;rsquo;t remember why that didn&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;Then I discovered the &lt;a href=&#34;https://en.wikipedia.org/wiki/Finger_protocol&#34;&gt;finger protocol&lt;/a&gt;. Or rather how it actually worked. It&amp;rsquo;s simply telnet with one input, the user name. Perfect.&lt;/p&gt;
&lt;p&gt;The solution then became a python daemon, listening at the standard finger port, making a call to YR&amp;rsquo;s free API and caching the results. I found a &lt;a href=&#34;https://github.com/ways/pyyrlib&#34;&gt;python lib for using the API&lt;/a&gt;, so I could get right on to presenting the data.&lt;/p&gt;
&lt;p&gt;The first working code gave:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;finger1.jpg&#34; alt=&#34;Graph.no v.1&#34;&gt;&lt;/p&gt;
&lt;p&gt;After a few long nights it became more or less how it is today:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;finger2.png&#34; alt=&#34;Current graph.no&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;press&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#press&#34;&gt;
        #
    &lt;/a&gt;
    Press
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I announced it at &lt;a href=&#34;http://tillegg.yr.no/application/pyyrascii/&#34;&gt;tillegg.yr.no&lt;/a&gt; (first runner up for top rated), and at &lt;a href=&#34;http://www.reddit.com/r/linux/comments/ouday/retro_weather_forecast_finger/&#34;&gt;reddit.com/r/linux&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After that the part owner of YR, &lt;a href=&#34;http://nrk.no&#34;&gt;NRK&lt;/a&gt;, which has a blog discussing new media, the tech behind what they do, etc. called &lt;a href=&#34;http://nrkbeta.no&#34;&gt;NRK Beta&lt;/a&gt;, wrote an article about it: &lt;a href=&#34;http://nrkbeta.no/2012/04/06/old-skool-vaervarsling/&#34;&gt;Old Skool-værvarsling&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also been used in a hackathon for littleprinter, see &lt;a href=&#34;http://twitpic.com/a298vv&#34;&gt;twitpic&lt;/a&gt; and &lt;a href=&#34;http://www.flickr.com/photos/knolleary/7473137758/in/photostream/&#34;&gt;flickr&lt;/a&gt;, and in various screenshot threads in forums.&lt;/p&gt;
&lt;h2 id=&#34;my-use&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#my-use&#34;&gt;
        #
    &lt;/a&gt;
    My use
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I mainly made it for personal use. I have it at home on a monitor above the door and on a monitor at work. There are also options for small, one-liner outputs, which I&amp;rsquo;ve used in tmux/screen status bars.&lt;/p&gt;
&lt;h2 id=&#34;improving-on-tech-from-the-seventies&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#improving-on-tech-from-the-seventies&#34;&gt;
        #
    &lt;/a&gt;
    Improving on tech from the seventies
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I can&amp;rsquo;t use unicode, colors, a larger display, as that would make it incompatible with the original goal of the project. But I&amp;rsquo;m fond of icons, so I made a client. Yes, a client for a finger weather service. It consists of some messy bash code to fetch, present and refresh the forecast using unicode and colors. You can find it in the git repo of the project, called &lt;a href=&#34;https://github.com/ways/pyyrascii/blob/master/graph.sh&#34;&gt;graph.sh&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;finger3.png&#34; alt=&#34;Client graph.sh&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;stats&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#stats&#34;&gt;
        #
    &lt;/a&gt;
    Stats
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I do get that there isn&amp;rsquo;t a big market for this. Especially when it&amp;rsquo;s so hard to use on a phone (with for example &lt;a href=&#34;https://play.google.com/store/apps/details?id=ca.lotuspond.finger&#34;&gt;Unix Finger Client&lt;/a&gt;), and there are such beautiful alternatives as i.e. &lt;a href=&#34;http://forecast.io/&#34;&gt;forecast.io&lt;/a&gt;. Oh, yes, not everyone uses terminals anymore either.&lt;/p&gt;
&lt;p&gt;Still I do seem to have gathered a few loyal followers. I even had to block a user once, for hammering the service at about every second.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an excerpt from my logs the day before I wrote this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Date: 2014-12-12
Total hits today: 377
Unique IPs today: 11
Top 10 users with hitcount:
 230 85.89.x.x
 36 77.179.x.x
 25 176.68.x.x
 24 77.179.x.x
 21 138.246.x.x
 16 176.11.x.x
 12 217.186.x.x
  4 93.93.x.x
  4 176.11.x.x
  3 46.212.x.x

Top 10 locations:
 230 katowice,
  72 dresden,
  24 oslo,
  21 munich,
  14 karlskrona,
   4 4730,
   2 hurdal,
   2 help,
   1 trondheim,
   1 time,
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;give-it-a-try&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#give-it-a-try&#34;&gt;
        #
    &lt;/a&gt;
    Give it a try
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Now it&amp;rsquo;s time for you to try.&lt;/p&gt;
&lt;h3 id=&#34;linux&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#linux&#34;&gt;
        ##
    &lt;/a&gt;
    Linux
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;On Linux you probably have one of these installed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;telnet
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;netcat / nc
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;finger
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If not, it&amp;rsquo;s usually a simple &lt;code&gt;sudo apt-get install finger&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;os-x&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#os-x&#34;&gt;
        ##
    &lt;/a&gt;
    OS X
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Look for the commands above.&lt;/p&gt;
&lt;h3 id=&#34;windows&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#windows&#34;&gt;
        ##
    &lt;/a&gt;
    Windows
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;On Windows 7 you can &lt;a href=&#34;http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx&#34;&gt;activate telnet&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;for-all-oses&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#for-all-oses&#34;&gt;
        ##
    &lt;/a&gt;
    For all OSes
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Try one of the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;finger newyork@graph.no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;echo&lt;/span&gt; newyork | telnet@graph.no finger
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff5c57&#34;&gt;echo&lt;/span&gt; newyork | netcat graph.no finger
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If those won&amp;rsquo;t work, try:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;telnet graph.no &lt;span style=&#34;color:#ff9f43&#34;&gt;79&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And then type &amp;ldquo;newyork&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Have a look at the help section for more info:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;finger @graph.no
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Google knows where you are by default</title>
      <link>/blog/posts/google_knows_where_you_are_by_default/</link>
      <pubDate>Thu, 06 Nov 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/google_knows_where_you_are_by_default/</guid>
      <description>&lt;p&gt;Even if you don&amp;rsquo;t use any Goolge services directly, Google will know a lot about you. For example when using the libre web browser &lt;a href=&#34;https://www.mozilla.org/en-US/firefox/desktop/&#34;&gt;Firefox&lt;/a&gt; from Mozilla. Let me quote from their site: &amp;ldquo;We&amp;rsquo;ve always designed Firefox to protect and respect your private information.&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;geoloc.png&#34; alt=&#34;Geo location example&#34;&gt;&lt;/p&gt;
&lt;p&gt;When using a location service, one get the message &amp;ldquo;Would you like to share your location with &amp;lt;website&amp;gt;?&amp;rdquo; when it should really say &amp;ldquo;Would you like to share your location with Google and &amp;lt;website&amp;gt;?&amp;rdquo;. This is stated if you &amp;ldquo;&lt;a href=&#34;https://www.mozilla.org/en-US/firefox/geolocation/&#34;&gt;Learn more&amp;hellip;&lt;/a&gt;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;This may not supprise you, as Mozilla get &lt;a href=&#34;http://www.zdnet.com/could-mozilla-become-a-branch-of-google-7000023495/&#34;&gt;90 percent of its revenue from Google&lt;/a&gt;, and therefore use lots of Google services out of the box.&lt;/p&gt;
&lt;p&gt;Mozilla started their own &lt;a href=&#34;https://location.services.mozilla.com/&#34;&gt;location service&lt;/a&gt; over a year ago with the &lt;a href=&#34;https://wiki.mozilla.org/Services/Location&#34;&gt;goal&lt;/a&gt; to &amp;ldquo;Improve the privacy aspects of the geolocation service compared to the current market offerings.&amp;rdquo;, which is a good thing. It can be used by following this &lt;a href=&#34;https://mozilla-ichnaea.readthedocs.org/en/latest/usage.html#firefox-desktop&#34;&gt;guide&lt;/a&gt;. My results has been varying.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;notfound.png&#34; alt=&#34;MLS&#34;&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately Mozilla isn&amp;rsquo;t as open as they could be on this. They will not share their database. I recommend using OpenWLANMap instead, as they both are older than Mozilla Location Service and do share the database.&lt;/p&gt;
&lt;p&gt;By installing this &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/openwlanmap-geolocation/&#34;&gt;add-on&lt;/a&gt; you can transparently use &lt;a href=&#34;http://www.openwlanmap.org/?lang=en&#34;&gt;OpenWLANMap&lt;/a&gt; in Firefox instead.&lt;/p&gt;
&lt;p&gt;You can join in collecting data for both services by using &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=openwlan&amp;amp;fdid=org.mozilla.mozstumbler&#34;&gt;Mozilla Stubmler app&lt;/a&gt; or &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=openwlan&amp;amp;fdid=com.vwp.owmap&#34;&gt;OpenWLANMap app&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not aware of any positioning for web browsers that works off-line, like one can on android using &lt;a href=&#34;https://falkp.no/blog/posts/nogapps___a_replacement_for_gapps/&#34;&gt;Nogapps&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Nogapps - A replacement for gapps</title>
      <link>/blog/posts/nogapps___a_replacement_for_gapps/</link>
      <pubDate>Thu, 16 Oct 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/nogapps___a_replacement_for_gapps/</guid>
      <description>&lt;p&gt;I recently discovered nogapps, and it&amp;rsquo;s working great! Here&amp;rsquo;s an intro and how to use it.&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;When installing Android on a phone, one first flashes the ROM, i.e. &lt;a href=&#34;http://cyanogenmod.org&#34;&gt;Cyanogenmod&lt;/a&gt;. Then a package called gapps, which contains Googles proprietary Apps. This is necessary to get Play, Youtube, GMail, Maps, etc. And lots of apps from Play requires Play and it&amp;rsquo;s services to function.&lt;/p&gt;
&lt;p&gt;See also &lt;a href=&#34;http://0p.no/2013/12/31/androids_privacy_invasiveness.html&#34;&gt;Androids privacy invasiveness&lt;/a&gt; and &lt;a href=&#34;http://0p.no/2013/11/25/android_with_as_little_closed_source_as_possible.html&#34;&gt;Android with as little closed source as possible&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Someone has started the project &lt;a href=&#34;http://forum.xda-developers.com/showthread.php?t=1715375&#34;&gt;Nogapps&lt;/a&gt; which aims to replace some of the gapps services with open services.&lt;/p&gt;
&lt;p&gt;As an example, you can only use GPS for location if you don&amp;rsquo;t have gapps. The other methods, wifi and cell tower id, comes from Google. Nogapps replaces this with &amp;ldquo;Network Location&amp;rdquo;. An app and a database which gives off-line location lookup.&lt;/p&gt;
&lt;h2 id=&#34;installing-network-location&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#installing-network-location&#34;&gt;
        #
    &lt;/a&gt;
    Installing Network Location
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Before you even consider this: you need root, you need to tinker with your device. A full backup is always adviced.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start with a phone with root access and i.e. Cyanogenmod installed. Probably works with other ROMs as well.&lt;/li&gt;
&lt;li&gt;Download the &lt;a href=&#34;https://developer.android.com/sdk/index.html&#34;&gt;Android SDK&lt;/a&gt; from Google to your PC.&lt;/li&gt;
&lt;li&gt;This should give you access to adb, the tool to communicate with android via USB. For me the path became &lt;code&gt;$ ~/Downloads/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;You need &lt;a href=&#34;http://wiki.cyanogenmod.org/w/Doc:_developer_options&#34;&gt;developer mode&lt;/a&gt; enabled on your phone, and to &lt;a href=&#34;http://wiki.cyanogenmod.org/w/Doc:_adb_intro/en#Secure_USB_debugging&#34;&gt;approve the computer&lt;/a&gt;. Not covered by this guide.&lt;/li&gt;
&lt;li&gt;Make sure you&amp;rsquo;re connected:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;$ adb devices&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;List of devices attached
014nnnnnnnnn800F    device
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Get root access to phone, this must first be allowed in phone settings: &lt;code&gt;$ adb root&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Make system partition writable:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;$ adb remount&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;remount succeeded
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Download Network Location apk from the Nogapps project website and push to phone: &lt;code&gt;$ adb push NetworkLocation.apk /system/app/NetworkLocation.apk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Download the cells.db for your continent from the Nogapps project website and and push to phone: &lt;code&gt;$ adb push cells-europe.db /sdcard/.nogapps/cells.db&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reboot phone.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;usage&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#usage&#34;&gt;
        #
    &lt;/a&gt;
    Usage
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re using Privacy Guard you will be prompted the first time your phone tries to look up the location. Now make sure you&amp;rsquo;ve activated non-GPS location:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;settings.png&#34; alt=&#34;Settings&#34;&gt;&lt;/p&gt;
&lt;p&gt;And enjoy. It works in every app:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;osmand.png&#34; alt=&#34;Osmand&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;contributing&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#contributing&#34;&gt;
        #
    &lt;/a&gt;
    Contributing
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;If you want to contribute to the cells database, use apps like &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=wifi&amp;amp;fdid=org.mozilla.mozstumbler&#34;&gt;MozStumbler&lt;/a&gt; and &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=wifi&amp;amp;fdid=com.vwp.owmap&#34;&gt;OpenWLANMap&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;further-on&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#further-on&#34;&gt;
        #
    &lt;/a&gt;
    Further on
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Nogapps consists of more that this feature, but it&amp;rsquo;s the one most important to me, and the only one I&amp;rsquo;ve tested so far.&lt;/p&gt;
&lt;p&gt;Edit: updated 2014-10-21&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Cheap DIY babycam with night vision</title>
      <link>/blog/posts/cheap_diy_babycam_with_nightvision/</link>
      <pubDate>Tue, 30 Sep 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/cheap_diy_babycam_with_nightvision/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;When I did this project in 2012 babycams cost from NOK 2000 and up, so I decided to see if I could build one using a Raspberry Pi, an IR light and a very cheap webcam.&lt;/p&gt;
&lt;p&gt;This will of course only be a level 0 night vision (active).&lt;/p&gt;
&lt;h2 id=&#34;parts&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#parts&#34;&gt;
        #
    &lt;/a&gt;
    Parts
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.dx.com/p/ir-48-led-infrared-illumination-light-for-night-vision-dc-12v-500ma-15235&#34;&gt;IR LEDs&lt;/a&gt; with a 12V PSU.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.raspberrypi.org/&#34;&gt;Raspberry Pi&lt;/a&gt; with a 5V PSU.&lt;/li&gt;
&lt;li&gt;Webcam. I don&amp;rsquo;t have a link to it, but pretty much any webcam will do.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;sku_15235_1.jpg&#34; alt=&#34;IR LED&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;Raspberry_Pi_-_Model_A.jpg&#34; alt=&#34;Raspberry Pi, from Wikipedia.org&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;hardware-setup&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware-setup&#34;&gt;
        #
    &lt;/a&gt;
    Hardware setup
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I set up a test and was disappointed that the IR setup hardly gave any visible picture at all, so I threw it in the trash. Then I rememberd that all digital cameras have an IR filter to sharpen daylight pictures. To remove it I did this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unscrew any lense or cover.&lt;/li&gt;
&lt;li&gt;Look for a small, slightly colored piece of glass covering the CMOS chip, and remove it by force.&lt;/li&gt;
&lt;li&gt;Reassemble.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the IR seemed to light up objects several meters away. As IR light can hurt eyes, I have the light pointed towards the ceiling, so only reflected light is ever hitting people.&lt;/p&gt;
&lt;h2 id=&#34;software&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software&#34;&gt;
        #
    &lt;/a&gt;
    Software
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Installed raspbian.&lt;/li&gt;
&lt;li&gt;Installed motion.&lt;/li&gt;
&lt;li&gt;Webcam is now available to local network for PCs (browser, VLC) and phones (VLC, video streaming apps).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;result&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#result&#34;&gt;
        #
    &lt;/a&gt;
    Result
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;irled.png&#34; alt=&#34;IR LED&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;webcam.png&#34; alt=&#34;Webcam, stripped and attached to wall.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;babyphone.png&#34; alt=&#34;Baby in nightvision viewed on a phone.&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Car-logger - part 2</title>
      <link>/blog/posts/car_logger2/</link>
      <pubDate>Mon, 29 Sep 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/car_logger2/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Read part one of &lt;a href=&#34;http://0p.no/2014/04/22/car_logger.html#more&#34;&gt;Car-logger&lt;/a&gt; first, if you haven&amp;rsquo;t.&lt;/p&gt;
&lt;p&gt;I chose to go with outdated Android phones in the previous article. Phones with CyanogenMod and no Google Play. This means that they run all free software, except for some firmware blobs and drivers. No background services driving up data or battery usage, no third party tracking my location.&lt;/p&gt;
&lt;p&gt;I tried out &lt;a href=&#34;https://www.traccar.org&#34;&gt;Traccar&lt;/a&gt;. The app worked fine, but the backend was a big, horrible java thing. Poor UI, overkill for my purpose, and too much for me to get hacking on.&lt;/p&gt;
&lt;p&gt;After trying out a few different ones I finally found &lt;a href=&#34;http://bk.gnarf.org/creativity/bigbrothergps/&#34;&gt;BigBrotherGPS&lt;/a&gt;. It was half of what I wanted. An app that simply makes a http request with a few parameters in post-data. The backend wasn&amp;rsquo;t more than a proof-of-concept, but http requests are easy to work with and language agnostic.&lt;/p&gt;
&lt;p&gt;So I created &lt;a href=&#34;https://github.com/ways/BigBrotherGPSweb&#34;&gt;BigBrotherGPSweb&lt;/a&gt; (a better name is needed). See github for a proper description, but the basics are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Receive http/https requests.&lt;/li&gt;
&lt;li&gt;Store requests and devices in mysql.&lt;/li&gt;
&lt;li&gt;Display results in a map.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It still need some work, and I&amp;rsquo;ll be working on it until I get bored or find a new project. But it currently serves the purpose.&lt;/p&gt;
&lt;p&gt;And of course it can be used to track more than cars.&lt;/p&gt;
&lt;h2 id=&#34;edit-20140930&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#edit-20140930&#34;&gt;
        #
    &lt;/a&gt;
    Edit 20140930
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;This requires a SIM card. My operator supplies a twin SIM for NOK 20 / month, so it&amp;rsquo;s a low cost for me.&lt;/p&gt;
&lt;h2 id=&#34;pics-or-it-didnt-happen&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#pics-or-it-didnt-happen&#34;&gt;
        #
    &lt;/a&gt;
    Pics, or it didn&amp;rsquo;t happen!
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;screenshot.png&#34; alt=&#34;Map view&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Google Hangouts - no one gets left out</title>
      <link>/blog/posts/hangouts_no_one_left_out/</link>
      <pubDate>Mon, 30 Jun 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/hangouts_no_one_left_out/</guid>
      <description>&lt;p&gt;&amp;hellip; except for anyone on &lt;a href=&#34;http://www.mozilla.org/en-US/firefox/os/&#34;&gt;Firefox OS&lt;/a&gt;, &lt;a href=&#34;http://www.windowsphone.com/en-us&#34;&gt;WindowsPhone&lt;/a&gt;, &lt;a href=&#34;http://www.amazon.com/mobile-apps/b?node=2350149011&#34;&gt;Amazon devices&lt;/a&gt;, &lt;a href=&#34;http://jolla.com/&#34;&gt;Sailfish OS&lt;/a&gt; and any other device without Google Play.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;hangouts.jpg&#34; alt=&#34;Website.&#34;&gt;&lt;/p&gt;
&lt;/rant&gt;</description>
    </item>
    
    <item>
      <title>RadiOS part 1</title>
      <link>/blog/posts/radios_part_1/</link>
      <pubDate>Fri, 09 May 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/radios_part_1/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;In my opinion most radios, especially internet radios, have horrible interfaces. Small buttons, small displays, often touch, often several functions for each button.&lt;/p&gt;
&lt;p&gt;So &lt;a href=&#34;http://no.linkedin.com/pub/erik-falk-petersen/b/286/a07&#34;&gt;Erik&lt;/a&gt; and I set out to design a new, better radio for ourselves. Our main requirements were ease of use and a very physical UI. Something you&amp;rsquo;d want to touch and play with.&lt;/p&gt;
&lt;h2 id=&#34;platform&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#platform&#34;&gt;
        #
    &lt;/a&gt;
    Platform
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;The Raspberry Pi is our platform of choice at the moment, so we have some physical restrictions and long boot time.&lt;/p&gt;
&lt;h2 id=&#34;physical-designs&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#physical-designs&#34;&gt;
        #
    &lt;/a&gt;
    Physical designs
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;the-cone&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-cone&#34;&gt;
        ##
    &lt;/a&gt;
    The cone
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;cone.jpg&#34; alt=&#34;The cone radio.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;cone2.jpg&#34; alt=&#34;The cone sketch.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Our first idea was a cone that would rotate for volume and press down for on, next channel, off. A very basic look, and extreamly easy to use. What killed this was the size it would need to be to accomodate an rPi and the mechanical complexity of making the twist and click switch.&lt;/p&gt;
&lt;h3 id=&#34;brainstorming&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#brainstorming&#34;&gt;
        ##
    &lt;/a&gt;
    Brainstorming
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;brainstorm.jpg&#34; alt=&#34;Brainstorming.&#34;&gt;&lt;/p&gt;
&lt;p&gt;So we hit the whiteboard. Some of the designs from our brainstorming:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A vertical rod with the radio sliding up/down for volume.&lt;/li&gt;
&lt;li&gt;A body-like shape hanging from the wall.&lt;/li&gt;
&lt;li&gt;A horizontal rod, where you pick up the radio and hang it on the position of the channel you want.&lt;/li&gt;
&lt;li&gt;Magnets! Anything with magnets!&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;the-chosen-design&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-chosen-design&#34;&gt;
        ##
    &lt;/a&gt;
    The chosen design
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Inspired by the switch boards of early phone systems, we chose to make rows of connections where you&amp;rsquo;d short two rows to make two selections at once. One row for the channels, one for the volumes.&lt;/p&gt;
&lt;p&gt;We went with magnets instead of jacks to make it look more modern and be quick to use.&lt;/p&gt;
&lt;h3 id=&#34;software&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software&#34;&gt;
        ##
    &lt;/a&gt;
    Software
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Netradio functionality can be solved in so many ways on the command line. From the most basic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cvlc url / aplay url / mplayer url&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The medium:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.musicpd.org/&#34;&gt;Music Player Daemon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;screen0.jpg&#34; alt=&#34;A cli frontend to MPD.&#34;&gt;&lt;/p&gt;
&lt;p&gt;The advanced:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.woutervanwijk.nl/pimusicbox/&#34;&gt;Musicbox&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;browse-desktop.png&#34; alt=&#34;Musicbox. Image from woutervanwijk.nl.&#34;&gt;&lt;/p&gt;
&lt;p&gt;The latter one is a brilliant use of the rPi. In short it includes out of the box support for &lt;a href=&#34;https://www.spotify.com/&#34;&gt;Spotify&lt;/a&gt;, &lt;a href=&#34;https://music.google.com/&#34;&gt;Google Music&lt;/a&gt;, &lt;a href=&#34;http://www.last.fm/&#34;&gt;Last.fm&lt;/a&gt;, internet radio, &lt;a href=&#34;https://soundcloud.com/&#34;&gt;SoundCloud&lt;/a&gt;, local files, files from network shares. Controlled by a webUI or any existing MPD app.&lt;/p&gt;
&lt;p&gt;We chose Musicbox.&lt;/p&gt;
&lt;p&gt;To be continued&amp;hellip;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Car-logger - part 1</title>
      <link>/blog/posts/car_logger/</link>
      <pubDate>Tue, 22 Apr 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/car_logger/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I want to know where my car is. Especially if it gets stolen. Logs would be a bonus. Also, I have several outdated Android phones, which has all necessary hardware.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I don&amp;rsquo;t want to use Google (latitude) or other service providers (embedded hardware).&lt;/li&gt;
&lt;li&gt;I don&amp;rsquo;t want to pay, unless I have to.&lt;/li&gt;
&lt;li&gt;If possible, I&amp;rsquo;d like it to do more (explained further down).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;hardware-options&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware-options&#34;&gt;
        #
    &lt;/a&gt;
    Hardware options
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;old-android-phones&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#old-android-phones&#34;&gt;
        ##
    &lt;/a&gt;
    Old android phones
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;800px-G1,_Nexus_One,_Nexus_S,_Galaxy_Nexus.jpg&#34; alt=&#34;Old android phones. Picture from wikipedia.org.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Free hardware.&lt;/li&gt;
&lt;li&gt;Lots of sensors (GPS, compass, barometer, temperature of hardware/battery, WiFi, Bluetooth, camera, microphone).&lt;/li&gt;
&lt;li&gt;UPS (the battery).&lt;/li&gt;
&lt;li&gt;Low power consumption.&lt;/li&gt;
&lt;li&gt;Reasonably small.&lt;/li&gt;
&lt;li&gt;Can be used for calling in an emergency.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not as easily programmed as something running a full Linux.&lt;/li&gt;
&lt;li&gt;Lots of apps doesn&amp;rsquo;t run on old versions of Android.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;raspberry-pi-or-similar&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#raspberry-pi-or-similar&#34;&gt;
        ##
    &lt;/a&gt;
    Raspberry Pi (or similar)
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;800px-RaspberryPi.jpg&#34; alt=&#34;Raspberry Pi. Picture from wikipedia.org.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy to program.&lt;/li&gt;
&lt;li&gt;Easily hook up extra gear via USB.&lt;/li&gt;
&lt;li&gt;Can get online for free by connecting to any open network. Or even start cracking passwords.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cost (the Pi isn&amp;rsquo;t expensive, but with full set of attachments it may be.&lt;/li&gt;
&lt;li&gt;Size/cable-mess.&lt;/li&gt;
&lt;li&gt;No RTC (real-time-clock). Need network to set time after a reboot.&lt;/li&gt;
&lt;li&gt;Power consumption.&lt;/li&gt;
&lt;li&gt;UPS is expensive.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dedicated-gps-logger&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#dedicated-gps-logger&#34;&gt;
        ##
    &lt;/a&gt;
    Dedicated GPS logger
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;sku_250295_1.jpg&#34; alt=&#34;GPS logger. Picture from dx.com.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Like this one: &lt;a href=&#34;http://www.dx.com/p/mini-multi-functional-gsm-personal-position-tracker-for-child-elder-black-250295&#34;&gt;Mini GSM tracker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Size.&lt;/li&gt;
&lt;li&gt;Ease of use.&lt;/li&gt;
&lt;li&gt;Battery time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All data is sent to an unknown company in China.&lt;/li&gt;
&lt;li&gt;No expandability, programability.&lt;/li&gt;
&lt;li&gt;SIM card is needed, twin SIM can not be used as calls will trigger a location report by SMS to caller.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;conclusion&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#conclusion&#34;&gt;
        ##
    &lt;/a&gt;
    Conclusion
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;I think the phones easily wins this one for me.&lt;/p&gt;
&lt;h2 id=&#34;extra-features&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#extra-features&#34;&gt;
        #
    &lt;/a&gt;
    Extra features
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Extra features I&amp;rsquo;d like, once I&amp;rsquo;ve decided to go with phones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run scanning for &lt;a href=&#34;http://openwlanmap.org/?lang=en&#34;&gt;Open WLAN Map&lt;/a&gt; and/or &lt;a href=&#34;https://location.services.mozilla.com/&#34;&gt;Mozilla&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run reporting for &lt;a href=&#34;https://play.google.com/store/apps/details?id=ca.cumulonimbus.barometernetwork&#34;&gt;PressureNET&lt;/a&gt; if possible.&lt;/li&gt;
&lt;li&gt;Have phone attempt to connect to open WiFis, instead of needing a SIM-card.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To be continued&amp;hellip;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>photOS 2.0 - a better photo frame</title>
      <link>/blog/posts/photos2/</link>
      <pubDate>Mon, 17 Feb 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/photos2/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;This is about improving photOS, mentioned in &lt;a href=&#34;http://0p.no/2014/02/14/photos1.html&#34;&gt;http://0p.no/2014/02/14/photos1.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When building this, price wasn&amp;rsquo;t a factor. If you want something cheap, you can still use this software with an old laptop or other recycled hardware.&lt;/p&gt;
&lt;p&gt;The display from Chalkboard Electronics is beautiful. Good resolution (not extreme resolution, though), good contrast, nice colors. And it supplies power for the RPi. Unfortunately it&amp;rsquo;s hard to attach stuff to it. There are nothing but smooth surfaces.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;backside.jpg&#34; alt=&#34;Backside of screen.&#34;&gt;&lt;/p&gt;
&lt;p&gt;All taped up to hide backlight. What you see is a rpi, a 4-port usb hub, a thumb drive (for keeping photos on) and the power board for the display.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;top.jpg&#34; alt=&#34;From above.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Using some cardboard to keep everything together. Also makes for a decent foot.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;done.jpg&#34; alt=&#34;Finished product.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Done and placed on the table. The photo doesn&amp;rsquo;t do the screen justice.&lt;/p&gt;
&lt;h2 id=&#34;hardware&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware&#34;&gt;
        #
    &lt;/a&gt;
    Hardware
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://raspberrypi.org&#34;&gt;Raspberry Pi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.chalk-elec.com/?page_id=1280#!/~/product/category=3094861&amp;amp;id=14647624&#34;&gt;10&amp;quot; Touch screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cover made of cardboard and tape.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;software&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software&#34;&gt;
        #
    &lt;/a&gt;
    Software
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ways/photOS&#34;&gt;photOS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;features&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#features&#34;&gt;
        #
    &lt;/a&gt;
    Features
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Sync files from &lt;a href=&#34;http://owncloud.org&#34;&gt;ownCloud&lt;/a&gt;, a free, selfhosted alternative to Dropbox.&lt;/li&gt;
&lt;li&gt;Display local images in a slideshow.&lt;/li&gt;
&lt;li&gt;Display images from web. I.e. webcams, weather reports, RSS feeds.&lt;/li&gt;
&lt;li&gt;Display images from reddit, i.e. lates from r/newsporn, r/wallpapers, etc.&lt;/li&gt;
&lt;li&gt;Stream video, i.e. from baby monitor, live webcams.&lt;/li&gt;
&lt;li&gt;Display websites, i.e. news.&lt;/li&gt;
&lt;li&gt;Display recent images (from ownCloud), by looking at date in Exif.&lt;/li&gt;
&lt;li&gt;Turn off LCD at night.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is my current crontab, to show how I&amp;rsquo;m using it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;MAILTO=****
# m h  dom mon dow   command

PHOTOS=/home/pi/photOS

#Sync owncloud
#27 7-18 * * *  ${PHOTOS}/helpers/sync-owncloud.sh

#Morning
0 6 * * *       ${PHOTOS}/helpers/powersave.sh 1; ${PHOTOS}/web/weather.sh
0 7    * * *    ${PHOTOS}/web/website.sh &amp;#34;http://nrk.no/tekst-tv/100/&amp;#34;

#Normal photo display
0  9-16 * * *   ${PHOTOS}/helpers/kill.sh; ${PHOTOS}/photos/slideshow.sh

#Display weird images from the net
0 17 * * *      ${PHOTOS}/helpers/kill.sh; ${PHOTOS}/photos/slideshow.sh $( ${PHOTOS}/web/rss-images.sh 50 )

#Baby monitor streaming
0 19,21 * * *   ${PHOTOS}/helpers/kill.sh; $PHOTOS/streams/cvlc.sh http://192.168.1.84:8081

#Night
0 1 * * *       ${PHOTOS}/helpers/powersave.sh 0; ${PHOTOS}/helpers/kill.sh;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;challenges&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#challenges&#34;&gt;
        #
    &lt;/a&gt;
    Challenges
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The screen has no attachments. I&amp;rsquo;ve currently just taped the RPi to the back, which works but isn&amp;rsquo;t very beautiful and will break down. See &amp;ldquo;Plans&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;LXDE, the default window manager on Raspbian, has no multitouch support. The image viewer, feh, has no gesture support. I&amp;rsquo;ve looked at a few ways to use touch, but hasn&amp;rsquo;t decided on anything yet. See this &lt;a href=&#34;http://www.reddit.com/r/raspberry_pi/comments/1wzeku/how_to_use_touch_capabilities/&#34;&gt;Reddit post&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Feh is somewhat lacking in rotating photos correctly.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;plans&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#plans&#34;&gt;
        #
    &lt;/a&gt;
    Plans
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use touch capabilities.&lt;/li&gt;
&lt;li&gt;3d printed or CNCed enclosure.&lt;/li&gt;
&lt;li&gt;Display photos related to this date. I.e. if christmas, display photos from past christmases.&lt;/li&gt;
&lt;li&gt;Look for better image viewer.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>photOS version 1.0 - a place for your phone to rest</title>
      <link>/blog/posts/photos1/</link>
      <pubDate>Fri, 14 Feb 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/photos1/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;A few years ago I wrote a collection of scripts for Debian/Ubuntu to make digital photo frames of outdated laptops. Lots of people have done this. What made &lt;em&gt;photOS&lt;/em&gt; v.1 special was the idea that it was a place for your phone to rest. Meaning recharge, dump photos, and display photos on the big screen. All by just plugging in the power cable.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;splash.jpg&#34; alt=&#34;Splash screen from photOS.&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;physical&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#physical&#34;&gt;
        #
    &lt;/a&gt;
    Physical
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;PhotOS was conceived and designed together with littlegreenfruit, a student of industrial design at that time. I made the software, and he built a &amp;ldquo;Home Book&amp;rdquo;, a machine made for photOS. It was made using a laptop from the trash (if I remember correctly), put inside a structure of bent wood. It had a small tray to put your phones on, and retractable, textile cables (microUSB, usb and iPod connectors).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;homebook.jpg&#34; alt=&#34;The homebook, here (mis)used as a desktop replacement.&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;software&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software&#34;&gt;
        #
    &lt;/a&gt;
    Software
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A udev rule recognized media devices and started an import script. After import, these photos was displayed.&lt;/li&gt;
&lt;li&gt;When no recent images existed, all images collected where displayed.&lt;/li&gt;
&lt;li&gt;At night time it displayed an animated logo of a security firm, to look like an advanced alarm system, as it was visible from outside a house entrance.&lt;/li&gt;
&lt;li&gt;Everything was written in bash. I see no reason to publish the code, as v.2 is now published. See bottom of this post.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;then-dropbox-came-along&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#then-dropbox-came-along&#34;&gt;
        #
    &lt;/a&gt;
    Then dropbox came along
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;People are bad at plugging in their phone, so dropbox (and similar file syncing) made it easier to dump photos from phones. Also iPhone 4 and newer wouldn&amp;rsquo;t allow linux to pull images. So PhotOS moved to just sync dropbox and display that. Screens got better and cheaper. And the raspberry pi made it possible to build smaller and fanless.&lt;/p&gt;
&lt;h2 id=&#34;version-20&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#version-20&#34;&gt;
        #
    &lt;/a&gt;
    Version 2.0
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Will come in a separate post.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Brazil-like monitor</title>
      <link>/blog/posts/brazil_like_monitor/</link>
      <pubDate>Fri, 31 Jan 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/brazil_like_monitor/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;In the movie Brazil you can see small, mostly black/white, stripped down, CRT monitors. I&amp;rsquo;ve also seen a store having CRTs in transparent cases. Somehow I think this is a cool retro look, so I built my own. Primarily to display weather forecast by my door.&lt;/p&gt;
&lt;p&gt;Remember CRTs uses thousands of volts, so one should keep fingers away.&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;A few photos from Brazil:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.highdefdiscnews.com/screenshots/brazil_15.png&#34;&gt;http://www.highdefdiscnews.com/screenshots/brazil_15.png&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://image.toutlecine.com/photos/b/r/a/brazil-1984-08-g.jpg&#34;&gt;http://image.toutlecine.com/photos/b/r/a/brazil-1984-08-g.jpg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://2.bp.blogspot.com/-yilGPzuL21U/TdbjnN7r4lI/AAAAAAAAAps/d0FZhbEDFk4/s1600/brazil13.jpg&#34;&gt;http://2.bp.blogspot.com/-yilGPzuL21U/TdbjnN7r4lI/AAAAAAAAAps/d0FZhbEDFk4/s1600/brazil13.jpg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The store cases mentioned in overview, spotted in Denmark in 2004:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;cubes.jpg&#34; alt=&#34;CRTs in transparent cases&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;build-process&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#build-process&#34;&gt;
        #
    &lt;/a&gt;
    Build process
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I got a brand new crt off ebay. Unfortunately shipping from the US cost me more that the TV. I stripped it down, removed stuff I didn&amp;rsquo;t need (audio, tuner). The foot is from dx.com. The computer is a Raspberry Pi. Plastic flowers cover some of the wires and increases the WAF.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;crt.jpg&#34; alt=&#34;Brand new.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Brand new.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;stripped.jpg&#34; alt=&#34;Stripped down.&#34;&gt;&lt;/p&gt;
&lt;p&gt;Away with the cover.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;placed.jpg&#34; alt=&#34;On the shelf.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;big.jpg&#34; alt=&#34;On the shelf.&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;code&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#code&#34;&gt;
        #
    &lt;/a&gt;
    Code
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Weather is from &lt;code&gt;finger oslo@graph.no&lt;/code&gt;. It alternates between showing hour by hour for a 24 hour period, and a large weather-right-now with unicode images of sun, snow, etc. There are a few more scripts to test network and such.&lt;/p&gt;
&lt;p&gt;Right now looks like this (your browser will have to have unicode support):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-3℃ ☃⚐
⌚11:50
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;future-plan&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#future-plan&#34;&gt;
        #
    &lt;/a&gt;
    Future plan
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Cables from CRT to main board are very short. Will replace them with some colored fabric cables. This will also allow the arm to hang below shelf, as originally planned.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Checklist for Raspberry Pi setup</title>
      <link>/blog/posts/checklist_for_raspberry_pi_setup/</link>
      <pubDate>Sun, 19 Jan 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/checklist_for_raspberry_pi_setup/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;There are lot of small changes one should do for pis that will be in use over some time. I covered a few in &lt;a href=&#34;http://0p.no/2013/11/25/keeping_a_raspberry_pi_alive.rst&#34;&gt;Keeping A Raspberry Pi Alive&lt;/a&gt;. This post will serve as more of a complete checklist for myself, so it may be updated over time.&lt;/p&gt;
&lt;h2 id=&#34;basic-stuff&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#basic-stuff&#34;&gt;
        #
    &lt;/a&gt;
    Basic stuff
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Update:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo apt-get update; sudo apt-get dist-upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Get some necessary tools:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo apt-get install screen mosh
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Set locale, password, a unique hostname, etc:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo raspi-config
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Change autostart. You might want to comment out screensaver, and add your own stuff:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo nano /etc/xdg/lxsession/LXDE/autostart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Completely disable screensaver. Under [SeatDefaults] add &amp;ldquo;xserver-command=X -s 0 dpms&amp;rdquo; in following file:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo nano /etc/lightdm/lightdm.conf
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;if-youre-using-an-sd-card-as-main-storage&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#if-youre-using-an-sd-card-as-main-storage&#34;&gt;
        #
    &lt;/a&gt;
    If you&amp;rsquo;re using an SD card as main storage
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Put /tmp on tmpfs: Edit &lt;code&gt;/etc/default/tmpfs&lt;/code&gt; and set: &lt;code&gt;RAMTMP=yes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Put log on tmpfs: Install &lt;code&gt;fs2ram&lt;/code&gt;, version 0.3.12 or better. Earlier versions are broken in Debian. &lt;a href=&#34;http://packages.debian.org/unstable/main/fs2ram&#34;&gt;http://packages.debian.org/unstable/main/fs2ram&lt;/a&gt;. Edit &lt;code&gt;/etc/fs2ram.conf&lt;/code&gt;, activate &lt;code&gt;/var/log&lt;/code&gt; and &lt;code&gt;/var/tmp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Consider locking /boot to read-only:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TODO!
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;if-youre-using-wifi&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#if-youre-using-wifi&#34;&gt;
        #
    &lt;/a&gt;
    If you&amp;rsquo;re using wifi
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;set-up-wifi&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#set-up-wifi&#34;&gt;
        ##
    &lt;/a&gt;
    Set up wifi
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Edit &lt;code&gt;/etc/wpa_supplicant/wpa_supplicant.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
 ssid=&amp;#34;network-name&amp;#34;
 psk=&amp;#34;password&amp;#34;
 priority=1
 id_str=&amp;#34;network-name&amp;#34;
}
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;if-youre-using-raspicam&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#if-youre-using-raspicam&#34;&gt;
        #
    &lt;/a&gt;
    If you&amp;rsquo;re using raspicam
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Disable led on camera:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo echo &amp;#39;disable_camera_led=1&amp;#39; &amp;gt;&amp;gt; /boot/config.txt
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;when-youre-done&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#when-youre-done&#34;&gt;
        #
    &lt;/a&gt;
    When you&amp;rsquo;re done
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set up backup and get to work! =)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;edits&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#edits&#34;&gt;
        #
    &lt;/a&gt;
    Edits
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Edit: 20140120 - added section on camera.&lt;/li&gt;
&lt;li&gt;Edit: 20140131 - added more info on autostart, screensaver.&lt;/li&gt;
&lt;li&gt;Edit: 20141118 - removed outdated wifi stuff.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Fanless livingroom entertainment</title>
      <link>/blog/posts/fanless_livingroom_entertainment/</link>
      <pubDate>Wed, 08 Jan 2014 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/fanless_livingroom_entertainment/</guid>
      <description>&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I recently made an effort to keep only fanless (or silent) devices in my livingroom. Including my media center / HTPC. This article will outline a few ways to achieve this.&lt;/p&gt;
&lt;h2 id=&#34;requirements-for-setup&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#requirements-for-setup&#34;&gt;
        #
    &lt;/a&gt;
    Requirements for setup
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;must-have&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#must-have&#34;&gt;
        ##
    &lt;/a&gt;
    Must have
&lt;/div&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;File/torrent downloading with decent storage.&lt;/li&gt;
&lt;li&gt;Playback of movies, music and images.&lt;/li&gt;
&lt;li&gt;Very low noise levels, especially when not in use.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;should-have&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#should-have&#34;&gt;
        ##
    &lt;/a&gt;
    Should have
&lt;/div&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Youtube.&lt;/li&gt;
&lt;li&gt;Spotify or similar legal music service.&lt;/li&gt;
&lt;li&gt;Play/control from smart phone.&lt;/li&gt;
&lt;li&gt;High &lt;a href=&#34;https://en.wikipedia.org/wiki/Wife_acceptance_factor&#34;&gt;Wife Acceptance Factor&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Low maintenance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;nice-to-have&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#nice-to-have&#34;&gt;
        ##
    &lt;/a&gt;
    Nice to have
&lt;/div&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Netflix, HBO or similar legal video service. (This is unlikely in my scenario, as they don&amp;rsquo;t support my OS of choice.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;suggested-setups&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#suggested-setups&#34;&gt;
        #
    &lt;/a&gt;
    Suggested setups
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&#34;the-all-in-one-htpc&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-all-in-one-htpc&#34;&gt;
        ##
    &lt;/a&gt;
    The all-in-one HTPC
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Schematics:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;+--------------+
|              |
|              |              +----+
|  TV          |              |    |         +-+
|              | --- HDMI --- | PC |  - - -  |A| &amp;lt;- (Smart phone)
|              |              |    |         +-+
+--------------+              +----+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is the most common. A desktop or laptop connected to the TV. Preferably small and quiet. Either running media center software controlled by a smart phone over wifi, or running a standard desktop and controlled by a wireless keyboard/mouse.&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy to set up.&lt;/li&gt;
&lt;li&gt;You probably have the needed hardware.&lt;/li&gt;
&lt;li&gt;Flexible (you can use any app, browser, netflix compatibility layer, etc).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Low WAF.&lt;/li&gt;
&lt;li&gt;High maintenance.&lt;/li&gt;
&lt;li&gt;Often noisy.&lt;/li&gt;
&lt;li&gt;Large space requirements.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;the-raspberry-pi&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#the-raspberry-pi&#34;&gt;
        ##
    &lt;/a&gt;
    The raspberry pi
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;A raspberry pi is used instead of the PC, with &lt;a href=&#34;http://raspbian.com&#34;&gt;Raspbian&lt;/a&gt; or similar.&lt;/p&gt;
&lt;p&gt;Schematics:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;+--------------+
|              |
|              |
|  TV          |              +----+         +-+
|              | --- HDMI --- | Pi |  - - -  |A| &amp;lt;- (Smart phone)
|              |              +----+         +-+
+--------------+                |
                                USB
                                 |
                               +-----+
                               | HDD | &amp;lt;- (Or thumb drive)
                               +-----+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cheap.&lt;/li&gt;
&lt;li&gt;No fans, no HDDs (unless you add one).&lt;/li&gt;
&lt;li&gt;Small. Can be hidden anywhere. Can even be brought along on travel.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You need some familiarity with the pi to set it up.&lt;/li&gt;
&lt;li&gt;Starting playback and navigation is slow.&lt;/li&gt;
&lt;li&gt;No support for netflix, HBO. Bad support for spotify.&lt;/li&gt;
&lt;li&gt;You need to add storage. A large thumb drive will do fine. If you use an external hard drive, you will have to power it by something else than the pi.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Problems that can be handled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spotify app for xbmc is cumbersome =&amp;gt; install mopidy instead, or use a separate pi with &lt;a href=&#34;http://www.woutervanwijk.nl/pimusicbox/&#34;&gt;MusicBox&lt;/a&gt; for music.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;raspberry-pi--a-good-router&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#raspberry-pi--a-good-router&#34;&gt;
        ##
    &lt;/a&gt;
    Raspberry Pi + a good router
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Same as above, but HDD is attached and shared from the router. This separates downloading from playback to improve performance and because the router will usually be able to power a 2.5&amp;quot; HDD.&lt;/p&gt;
&lt;p&gt;Firmware like &lt;a href=&#34;http://www.polarcloud.com/tomato&#34;&gt;Tomato&lt;/a&gt; or &lt;a href=&#34;https://openwrt.org/&#34;&gt;OpenWRT&lt;/a&gt; can run Transmission for downloading and share files using Samba or UPNP.&lt;/p&gt;
&lt;p&gt;This setup can also be solved by using an extra Pi instead of the router.&lt;/p&gt;
&lt;p&gt;Schematics:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;+--------------+
|              |
|              |
|  TV          |              +----+         +-+
|              | --- HDMI --- | Pi |  - - -  |A| &amp;lt;- (Smart phone)
|              |              +----+         +-+
+--------------+

                              |
                              |
                           +--------+             +-----+
                           | Router | --- USB --- | HDD |
                           +--------+             +-----+
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;smart-tv--storage&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#smart-tv--storage&#34;&gt;
        ##
    &lt;/a&gt;
    Smart TV + storage
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m not a fan of smart TVs for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They are usually slow and complex.&lt;/li&gt;
&lt;li&gt;They seldom receive software updates, and are therefore full of security problems.&lt;/li&gt;
&lt;li&gt;You can&amp;rsquo;t upgrade your &amp;ldquo;HTPC&amp;rdquo;, since it&amp;rsquo;s part of the display.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But if you have one, you can add storage to it to allow for a noise less livingroom.&lt;/p&gt;
&lt;p&gt;Schematics:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;+--------------+
|              | --- USB --- Thumb drive or HDD
|              |
|  Smart TV    | - - - Storage (router, Pi or PC)
|              |
+--------------+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You get some value from your overly expensive, over-engineered display.&lt;/li&gt;
&lt;li&gt;Very little cables, mess. High WAF.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Codec support is limited.&lt;/li&gt;
&lt;li&gt;No automatic download of subtitles, like XBMC does.&lt;/li&gt;
&lt;li&gt;Use limited to what ever apps are available for your TV.&lt;/li&gt;
&lt;li&gt;Usually a horrible UI.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Androids privacy invasiveness</title>
      <link>/blog/posts/androids_privacy_invasiveness/</link>
      <pubDate>Tue, 31 Dec 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/androids_privacy_invasiveness/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;With Android you have two options of app management. With Google Play, or without. As Google is getting more and more invasive the latter option seems more tempting. Too bad they made sure it&amp;rsquo;s a poor one.&lt;/p&gt;
&lt;h2 id=&#34;background&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#background&#34;&gt;
        #
    &lt;/a&gt;
    Background
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Each device manufacturer that wants to include Play has to include a bundle of Google apps, gapps. And if he ever release a device with a competing app store (i.e &lt;a href=&#34;f-droid.org&#34;&gt;F-droid&lt;/a&gt;, &lt;a href=&#34;http://www.amazon.com/mobile-apps/b?node=2350149011&#34;&gt;Amazon Appstore&lt;/a&gt;), he will be banned from future use of Play.&lt;/p&gt;
&lt;p&gt;What control does Play give Google? Full remote access! What does it take away? The option to uninstall any of the closed source gapps. Examples of this access can be seen when installing apps via the website &lt;a href=&#34;https://play.google.com/store&#34;&gt;play.google.com&lt;/a&gt; (no user interaction required) or in the &lt;a href=&#34;https://www.google.com/android/devicemanager&#34;&gt;Android Device Manager&lt;/a&gt; that suddenly turned up on every device. It allows you to track a phone, without ever having enabled (or been notified of) this on the device. I&amp;rsquo;m sure it&amp;rsquo;s in the EULA somewhere, but it was unknown to me until it appeared in the news.&lt;/p&gt;
&lt;p&gt;On &lt;a href=&#34;http://forum.xda-developers.com/showthread.php?t=2397942&#34;&gt;xda-developers forum&lt;/a&gt; you can see that the absolute minimum of apps you can choose is Core Base, Google Experience Launcher, Google Bookmark Sync, and the following Play Store applications: Gmail | Google+ | Google Calendar (replaces stock/AOSP Calendar) | Google Play services | Google Search | Google Text-to-Speech | Hangouts | Maps | Street View on Google Maps | YouTube. Not only are they all installed, but some of them will also bug you to use them. Like G+ Photos, which pops up and tempts me with free, secure and private storage, or creates animated gifs of my photos without me asking for it.&lt;/p&gt;
&lt;p&gt;The by far biggest problem though, is that most of the apps in existence are only available in Play. If you don&amp;rsquo;t have play, you can&amp;rsquo;t have i.e. Spotify.&lt;/p&gt;
&lt;h2 id=&#34;other-issues-with-gapps&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#other-issues-with-gapps&#34;&gt;
        #
    &lt;/a&gt;
    Other issues with gapps
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;They&amp;rsquo;re all closed source.&lt;/li&gt;
&lt;li&gt;No one of them allows you to adjust how they sync. You can&amp;rsquo;t tell gmail to sync mail only when on wifi, or stop syncing when your battery is low.&lt;/li&gt;
&lt;li&gt;Some of them duplicate functionality. Like G+ Photos vs. Gallery.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>George Washingdone - a motion sensor for your washing machine</title>
      <link>/blog/posts/george_washingdone___a_motion_sensor_for_your_washing_machine/</link>
      <pubDate>Mon, 16 Dec 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/george_washingdone___a_motion_sensor_for_your_washing_machine/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;When &lt;a href=&#34;http://piborg.org/&#34;&gt;PiBorg&lt;/a&gt; launched the accelerometer/compass &lt;a href=&#34;http://piborg.org/xloborg/&#34;&gt;XloBorg&lt;/a&gt;, I imediately bought a couple. I had no idea what to use them for, but the price was right, raspberry pi was new, and it seemed like a fun &amp;ldquo;sensor&amp;rdquo; to play with. It remained in my drawer until this weekend. Over a few hours at a hackathon I created the WashingDone. A script to measure certain patterns of motion, to alert when the washing machine is done.&lt;/p&gt;
&lt;p&gt;It is still under testing, but it seems to work. Just need to find the right values for motion, calmness, required duration of motion, etc. See project page/github for source.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;washer.jpg&#34; alt=&#34;Pi placed beside washing machine.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;washingDone.jpg&#34; alt=&#34;Pi with accelerometer.&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Android with as little closed source as possible</title>
      <link>/blog/posts/android_with_as_little_closed_source_as_possible/</link>
      <pubDate>Mon, 25 Nov 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/android_with_as_little_closed_source_as_possible/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;Android seemed like an &lt;a href=&#34;http://openmoko.org&#34;&gt;OpenMoko.org&lt;/a&gt; that could work. A phone running free software. Linux, and all the goodies that goes with it. However it took a bad turn. Not only was it just linux (no GNU), but Google seems to be locking it down. Replacing every app with a closed source one: &lt;a href=&#34;http://arstechnica.com/gadgets/2013/10/googles-iron-grip-on-android-controlling-open-source-by-any-means-necessary/&#34;&gt;Googles iron grip on Android&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;See follow-up: &lt;a href=&#34;http://0p.no/2015/02/26/android_with_as_little_closed_source_as_possible2.html&#34;&gt;Android with as little closed source as possible 2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This problem can be broken into three:&lt;/p&gt;
&lt;h3 id=&#34;hardware-closed-drivers&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#hardware-closed-drivers&#34;&gt;
        ##
    &lt;/a&gt;
    Hardware (closed drivers)
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Possible solution: &lt;a href=&#34;http://www.fairphone.com/&#34;&gt;FairPhone&lt;/a&gt;?&lt;/p&gt;
&lt;h3 id=&#34;android-is-not-gnulinux&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#android-is-not-gnulinux&#34;&gt;
        ##
    &lt;/a&gt;
    Android is not GNU/linux
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Android missing GNU tools, crontab, rsync, mosh, apt and other components making Linux fun to use.
Possible solution: I don&amp;rsquo;t have one for this. Perhaps &lt;a href=&#34;https://sailfishos.org/&#34;&gt;Sailfish OS&lt;/a&gt; or &lt;a href=&#34;http://www.mozilla.org/en-US/firefox/os/&#34;&gt;Firefox OS&lt;/a&gt;? This isn&amp;rsquo;t a big problem, though.&lt;/p&gt;
&lt;h3 id=&#34;software-closed-source-reliant-on-google-services&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#software-closed-source-reliant-on-google-services&#34;&gt;
        ##
    &lt;/a&gt;
    Software (closed source, reliant on Google services)
&lt;/div&gt;
&lt;/h3&gt;
&lt;p&gt;Possible solution: &lt;a href=&#34;http://replicant.us/&#34;&gt;Replicant&lt;/a&gt; is &amp;ldquo;a fully free Android distribution running on several devices&amp;rdquo;. It can be a long-term solution for this, but has some issues. It doesn&amp;rsquo;t have access to source for drivers (camera, GPS, modem ++) on most phones, and there are lots of apps that one only can find in Google Play. I don&amp;rsquo;t understand why companies allow Google to control all of their business and push apps to Google Play only. However, I&amp;rsquo;m reliant on a few of these apps (Spotify, RuterBillett, etc.), so I&amp;rsquo;ll have to keep Play for now.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve made a list of how I&amp;rsquo;m keeping as little closed source on my phone as possible. As of 2013 this is my setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rom: &lt;a href=&#34;http://www.cyanogenmod.org/&#34;&gt;CyanogenMod&lt;/a&gt; with Privacy Guard enabled.&lt;/li&gt;
&lt;li&gt;Anything from AOSP is OK. That includes the default app for calendar, messages, calling.&lt;/li&gt;
&lt;li&gt;App store: &lt;a href=&#34;https://f-droid.org/&#34;&gt;F-droid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;E-mail: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=k9&amp;amp;fdid=com.fsck.k9&#34;&gt;K-9&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Podcast: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=antennapod&amp;amp;fdid=de.danoeh.antennapod&#34;&gt;AntennaPod&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Browser: Default is OK, but there are several good alternatives including &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=firefox&amp;amp;fdid=org.mozilla.firefox&#34;&gt;Firefox&lt;/a&gt; and &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=lightning&amp;amp;fdid=acr.browser.barebones&#34;&gt;Lightning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Task sync: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=acal&amp;amp;fdid=com.morphoss.acal&#34;&gt;aCal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reddit: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=redreader&amp;amp;fdid=org.quantumbadger.redreader&#34;&gt;RedReader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Facebook if you must: &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=tinfoil&amp;amp;fdid=com.danvelazco.fbwrapper&#34;&gt;Tinfoil for Facebook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are some good, open source apps, but unfortunately only available through Play:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TextSecure - SMS encryption&lt;/li&gt;
&lt;li&gt;RedPhone - VOIP encryption&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apps/services I&amp;rsquo;ve yet to find a replacement for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Google maps&lt;/li&gt;
&lt;li&gt;Yatse&lt;/li&gt;
&lt;li&gt;Youtube&lt;/li&gt;
&lt;li&gt;TinyCam monitor free&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other problems to be handled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Google (and Apple) can circumvent the disk encryption: &lt;a href=&#34;http://www.youtube.com/watch?v=NjuhdKUH6U4&#34;&gt;http://www.youtube.com/watch?v=NjuhdKUH6U4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Edit 20140103: updated apps list.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Hello world</title>
      <link>/blog/posts/hello_world_/</link>
      <pubDate>Mon, 25 Nov 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/hello_world_/</guid>
      <description></description>
    </item>
    
    <item>
      <title>Keeping a Raspberry Pi alive</title>
      <link>/blog/posts/keeping_a_raspberry_pi_alive/</link>
      <pubDate>Mon, 25 Nov 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/keeping_a_raspberry_pi_alive/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;http://raspberrypi.org&#34;&gt;http://raspberrypi.org&lt;/a&gt; is a great, cheap piece of hardware, but it has some limitations. Number one is the SD card. SD cards are not made for lots of rewrites to the same file.&lt;/p&gt;
&lt;p&gt;Edit 20140109: If you wonder why SD cards suck, see &lt;a href=&#34;http://www.youtube.com/watch?v=r3GDPwIuRKI&#34;&gt;http://www.youtube.com/watch?v=r3GDPwIuRKI&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;tricks-to-prolong-the-life-of-the-sd-card&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#tricks-to-prolong-the-life-of-the-sd-card&#34;&gt;
        #
    &lt;/a&gt;
    Tricks to prolong the life of the SD-card
&lt;/div&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;/etc/default/tmpfs&lt;/code&gt; and set: &lt;code&gt;RAMTMP=yes&lt;/code&gt;. This will keep /tmp in memory.&lt;/li&gt;
&lt;li&gt;Install &lt;code&gt;fs2ram&lt;/code&gt;, version 0.3.12 or better. Earlier versions are broken in Debian. &lt;a href=&#34;http://packages.debian.org/unstable/main/fs2ram&#34;&gt;http://packages.debian.org/unstable/main/fs2ram&lt;/a&gt;. In its config it&amp;rsquo;s important to activate /var/log and /var/tmp. If you&amp;rsquo;re using any databases or other files that are written to often, make sure they&amp;rsquo;re on a tmpfs using fs2ram. If you keep /var/cache in memory, make sure to clear out apts cache often, as it can fill up: &lt;code&gt;sudo apt-get clean&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Disable swap: &lt;code&gt;sudo dphys-swapfile swap off&lt;/code&gt;, and uninstall it: &lt;code&gt;sudo apt-get remove --purge dphys-swapfile&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Life without US cloud services</title>
      <link>/blog/posts/life_without_us_cloud_services/</link>
      <pubDate>Mon, 25 Nov 2013 00:00:00 +0000</pubDate>
      
      <guid>/blog/posts/life_without_us_cloud_services/</guid>
      <description>&lt;h2 id=&#34;overview&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#overview&#34;&gt;
        #
    &lt;/a&gt;
    Overview
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m not creating this list because I have something against the US or because I hate the cloud (or to get on a watchlist). I&amp;rsquo;m creating it because my work/hobbies. Also for economy, access to resources (unlimited dropbox!), performance (keep things local) interest in FLOSS and control of my data.&lt;/p&gt;
&lt;h2 id=&#34;why&#34; &gt;
&lt;div&gt;
    &lt;a href=&#34;#why&#34;&gt;
        #
    &lt;/a&gt;
    Why?
&lt;/div&gt;
&lt;/h2&gt;
&lt;p&gt;As Snowden showed the world how much interest NSA takes in foreigners, I&amp;rsquo;ve started migrating my data away from the US cloud. This isn&amp;rsquo;t easy, as you would know. Here are the alternatives I&amp;rsquo;ve moved to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dropbox -&amp;gt; &lt;a href=&#34;http://owncloud.org/&#34;&gt;ownCloud&lt;/a&gt; (not production ready for large collections)&lt;/li&gt;
&lt;li&gt;Google search -&amp;gt; &lt;a href=&#34;http://startpage.com/&#34;&gt;startpage.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google contact sync -&amp;gt; &lt;a href=&#34;http://owncloud.org/&#34;&gt;ownCloud&lt;/a&gt; with &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=davdroid&amp;amp;fdid=at.bitfire.davdroid&#34;&gt;DAVdroid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google calendar sync -&amp;gt; &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=davdroid&amp;amp;fdid=at.bitfire.davdroid&#34;&gt;DAVdroid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google todo-list -&amp;gt; &lt;a href=&#34;http://owncloud.org/&#34;&gt;ownCloud&lt;/a&gt; with &lt;a href=&#34;https://f-droid.org/repository/browse/?fdfilter=acal&amp;amp;fdid=com.morphoss.acal&#34;&gt;aCal&lt;/a&gt; (no offline use yet =(&lt;/li&gt;
&lt;li&gt;Google mail -&amp;gt; I use &lt;a href=&#34;http://runbox.no/&#34;&gt;Runbox&lt;/a&gt;, but I&amp;rsquo;m sure there are lots of non-US, security conscious e-mail providers. You have to pay for e-mail, but it&amp;rsquo;s not much.&lt;/li&gt;
&lt;li&gt;Google Hangouts -&amp;gt; Self hosted Jabber server. But there are public servers listed on &lt;a href=&#34;http://jabber.org&#34;&gt;Jabber.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google Reader -&amp;gt; &lt;a href=&#34;http://tt-rss.org&#34;&gt;Tiny tiny RSS&lt;/a&gt; or &lt;a href=&#34;http://owncloud.org/&#34;&gt;ownCloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Image sharing (facebook, g+, flickr) -&amp;gt; &lt;a href=&#34;http://owncloud.org/&#34;&gt;ownCloud&lt;/a&gt;, but not perfect yet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Edit: updated list 20131211&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
