MAZI pilot – Creeknet

We set out on the second phase of neighbourhood engagement and activity around our Mazi pilot – Creeknet. It explores use of DIY networking methods and promotion of ‘offline‘ information systems, that express awareness, sustainability and determination for greater data autonomy.

To date, we have met with a wide range of local people living and working alongside Deptford Creek, each with a view on local issues and an intensity to shape outcomes in whatever form of public campaign or personal agenda they may fix on. Help us identify the tools for success in such situations and to foster the development of home grown options to introduce into the MAZI toolkit.

We begin a series of weekly meetings and workshops at venues up and down the creek this month, to channel some energies into discovery, discussion and expression on subjects closest to heart. The quality of lived environment tops that chart, as any local resident, worker or student will assert. Unbridled property speculation, deteriorating air quality and wealth disparity, contribute to the sense of dis-empowerment, isolation and anxiety for the future.

Much we have learned, as the storm of chaos around us builds, reminds us that we can never again take personal freedoms and privacy for granted. As of 30th December, the Investigatory Powers Act permits targeted interception of communications, bulk collection and interception of communications data by UK government and intelligence agencies.

Educating and informing ourselves on conditions of change are now critical steps for us to take for future health of communities, cultures and capital. Our faith in each other, open collaboration and social justice are at stake. Your insight, inventiveness and expertise are key to unlocking neighbourhood value and identifying solutions to act on locally.


Installing MAZI on Quintessence

Adnan installs the MAZI box on the roof of Quintessence. So far we had been running the MAZI zone from our living room (inside the LEGO box). Now it goes out of the lego box into a weather proof casing.

This research project on the boat looks into the development of the boattr prototype in collaboration with MAZI (for “together” in Greek), a Horizon2020 research project. Boattr connects narrow boats to the ‘Internet-of-Things’ and allows for open wireless mesh-networking within the narrow boat community, by using affordable microcomputers. The main goal of this project is to provide technology and knowledge that aims to 1) empower those narrow boats who are in physical proximity, to shape their hybrid urban space, together, according to the specificities of the respective local environment, and 2) foster participation, conviviality, and location-based collective awareness of the canals. The boattr prototype will build on the MAZI toolkit and the capabilities offered by Do-It-Yourself networking infrastructures – low-cost off-the-shelf hardware and wireless technologies – that allow small communities or individuals to deploy local communication networks that are fully owned by local actors, including all generated data. These DIY networks could cover from a small square (e.g., using a Raspberry Pi) to a city neighbourhood (e.g., the Commotion Construction Kit used at the RedHook WiFi initiative) or even a whole city (e.g.,,,, and in the case of boattr the UK canal network.
Interactive Dissemination over the MAZI webportal will offer a chance for personal interaction in academic, socio-economic (and possibly selected commercial) conferences, EU organised events and conferences and trade fairs and exhibitions, and most importantly with policy bodies, regulatory and funding bodies that decide on research and innovation in water and waste between EU countries. The interactive channel of dissemination is intended for target groups with a high level of information need and involvement and it therefore provides information tailored to highly targeted audiences (in the case of the boattr project the ‘narrow boat’ community). The interactive channel is expected to be the most efficient means for community building and have the highest impact on dissemination and exploitation.

MAZI is a confirmed (accepted) Horizon2020 research project with which Coventry University could potentially partner up by supporting the boattr research project. MAZI will run until 2019, allowing for future development and deployment of the boattr prototype (once established by the end of 2016 or beginning of 2017). Having acquired a partner status with the MAZI project will allow for boattr to disseminate and promote its activities, via the partners’ networks of databases, if applicable to some partners in their countries including accessing networks in other international regions. The MAZI consortium members have considerable experience in marketing such events and projects both directly and through leading international events, disseminating information to targeted audiences through both online and off-line channels, and recruiting qualified participants to the brainstorming, networking workshops and international conferences. In summary: 1) Roadmap and Recommendations, White Paper and Continuity Plan, Brainstorming reports, results of the clustering activities and the documentation presented in events will all be made available through the MAZI portal. 2) MAZI partners will use their databases for targeted mail-shots to inform EU researchers about project activities and workshops, events and conferences; 3) Articles, email announcements and electronic newsletters will be carried out to maximise visibility of the boattr objectives, results and developments.

The boattr DIY infrastructures offer a unique rich set of special characteristics and affordances for offering local services to the narrow boat community, outside the public Internet: the ownership and control of the whole design process that promotes independence and grassroots innovation rather than loss of control and fear of data shadows; the de facto physical proximity of those connected without the need for disclosing private location information, such as GPS coordinates, to third parties; the easy and inclusive access through the use of a local captive portal launched automatically when one joins the network; the option for anonymous interactions; and the materiality of the network itself. The prototype will integrate existing FLOSS software, from very simple applications to sophisticated distributed solutions (like those under development by the P2Pvalue project, mobile sensing devices, and recent developments in open data and open hardware), allowing it to be appropriated by different non-expert users according to their respective context and use case; it will offer a wide unique variety of customization options.

The boattr project already receives in kind contributions from Deckspace medialab in form of access to the medialab’s server farm (on root level); from the MAZI project in the form of access to the MAZI toolkit, databases & network; and privately in the form of access to two narrow boats as case study for the boattr prototype. Other funding opportunities to be pursued are Horizon2020 (CAPS), Leverhulme Trust, as well as the Heritage Lottery Fund. Ideally the boattr/MAZI project would partner up with the Canal and River Trust, a charity, which is entrusted to care for 2,000 miles of waterways in England and Wales, which are often over 200 years old (an enormous network of bridges, embankments, towpaths, aqueducts, docks and reservoirs and more). The waterways provide an unfenced, ‘no turnstiles’ opportunity to interact with history and nature next to soothing water.


boattr meets MAZI

Our media lab Deckspace SPC has started collaborating on a Horizon2020 research project titled MAZI. We are installing the MAZI toolkit on Quintessence in order to work with the bargee community. SPC’s main project within this research collaboration is Creeknet.

The mazizone will first live in our living room. The mazizone will be used as a boattr log & research journal (using WordPress),  as well as local sharing device (using NextCloud) & the MAZI guest book, allowing the community of neighbors around Quintessence to share the boattr know-how. Ideally those mazizones could also mesh with each other (but therefore the Raspberry Pi would need two Antennas). Something to add onto the ToDo list of MAZI.

The code for the mazizone can be found on GitHub.

MAZI backend

The MAZI Backend has been designed and developed in order to handle low-level communication between the MAZI toolkit’s hardware and the MAZI Portal. Moreover, it can be used by developers or advanced MAZI toolkit users to configure a MAZI Zone or build one from scratch. You can find below a guide on how to execute these scripts from the command line in order to modify your MAZI Zone.

In case you are using one of the MAZI Zone images, you can find the back-end scripts in the following folder

cd /root/back-end

Also, you can clone this repository into a Raspbian image to build a MAZI Zone from scratch, check here for more info.


Install the following packages:

$ apt-get install python-pip
$ pip install speedtest-cli
$ apt-get install sshpass
$ apt-get install jq
$ apt-get intsall sqlite3
$ apt-get install batctl
$ echo "batman-adv" >> /etc/modules


The script has been created in order to manage an external USB adapter that is connected to the Raspberry Pi. This script is able to check if a USB adapter is connected to the Raspberry Pi. In addition, you can discover the available networks in range and connect to one of them. Finally, you can disconnect the USB adapter from the connected Wi-Fi network.


sudo sh  [options]
-i,--interface              Set the interface
-a,--active                 Shows the SSID of the interface  
-s,--ssid                   Sets the SSID of the Wi-Fi network
-p,--password               Sets the password of the Wi-Fi network
-l,--list                   Displays a list of the available Wi-Fi networks in range
-h,--hidden                 Connect to hidden Wi-Fi network
-d,--disconnect             Disconnect the USB adapter from Wi-Fi network

The script is responsible for creating the Wi-Fi Access Point on the Raspberry Pi. With this script, you can also modify the settings of your Wi-Fi Access Point.


sudo sh  [options]
-i,--interface               Set the interface
-s,--ssid                    Sets the name of the Wi-Fi network
-c,--channel                 Sets the Wi-Fi channel
-p,--password                Sets the Wi-Fi password
-w,--wpa  [OFF/off]          Turns off wireless network security

You can simply start (or restart the Wi-Fi Access Point if it is already started) without passing any argument.

sudo sh

In case you have forgotten your MAZI Portal administrator password, this script enables its recovery. Once you run the, the password changes back to the default “1234” and then you can access the MAZI Portal and change it through the first-contact page.


sudo sh

The script has been created in order to manage various sensors connected to the Raspberry Pi. This script can detect the connected sensor devices and consequently collect measurements periodically with a specific duration and interval between measurements. In addition, it can store these measurements in a local or remote database and check the status of the storage procedure, as well.


sudo bash [SenseName] [Options] [SensorOptions]

-n,--name                    The name of the sensor

-s , --store                 Stores the measurements in the database
-d , --duration              Duration in seconds to take a measurements
-i , --interval              Seconds between periodic measurements
-a , --available             Displays the status of the available sensors
-D,--domain                  Sets a remote server domain (default is localhost)
--status                     Displays the status of store process

-t , --temperature            Get the Temperature
-h , --humidity               Get the Humidity
-p , --pressure               Get the current pressure in Millibars
-m , --magnetometer           Get the direction of North
-g , --gyroscope              Get a dictionary object indexed by the strings x, y and z
                              The values are Floats representing the angle of the axis in degrees
-ac , --accelerometer         Get a dictionary object indexed by the strings x, y and z
                              The values are Floats representing the acceleration intensity of the axis in Gs

The script enables the control of the status of the installed applications such as the Etherpad, the Guestbook, the LimeSurvey and the Interview-archive. You can start, stop or display the status of the above applications.


sudo sh  [options] <application>

-a, --action [start,stop,status] <application>    Controls the status of the installed applications

The script enables the modification of the MAZI Portal’s domain and the change of the splash page.


sudo sh [options]
-d,--domain              Sets a new network domain of the portal
-s,--splash              Sets a new splash page

The script is able to modify the mode of your Wi-Fi Access Point – currently – between offline and online as the managed mode has not been implemented yet. In the offline mode, clients of the Wi-Fi Access Point have not access to the Internet and are permanently redirected to the Portal splash page. In the online mode, the Raspberry Pi provides Internet access through either the Ethernet cable or an external USB Wi-Fi adapter.


sudo sh [options]
-m,--mode  [offline/online/managed]   Sets the mode of the Wi-Fi Access Point

The script displays the settings of the Wi-Fi Access Point that has been created in this MAZI Zone. You can view information such as the name, the password and the channel of the Wi-Fi Access Point. You can also see the domain you are using for the portal page, as well as the active interface that broadcasts the Wi-Fi Access Point – in case you have plugged in an OpenWRT router. Finally, this script informs you about the mode of your Wi-Fi Access Point (offline, online, managed).


sudo sh  [options]
-i,--interface  [wifi|internet..]  Shows the interface that used for AP or for internet connection respectively
                wifi               Interface for Access Point
                internet           Interface for internet connection
                mesh               Interface for mesh network
                all                Shows all available interfaces
-c,--channel                       Shows the Wi-Fi channel in use
-m,--mode                          Shows the mode of the Wi-Fi network
-p,--password                      Shows the password of the Wi-Fi network
-s,-ssid                           Shows the name onan f the Wi-Fi network
-d,--domain                        Shows the network domain of the MAZI Portal
-w,--wifi                          Shows the device that broadcasts the Wi-Fi AP (pi or OpenWRT router)

The script is used for the management of the OpenWrt Router connected to this MAZI Zone. After connecting an OpenWrt Router this script is able to detect it and control the status of the connection, (activate/deactivate).


sudo sh [options]
-s,--status                  Displays if the OpenWRT router exists 
-a,--activate                Activates	the	OpenWRT	router	as	the	Wi-Fi	AP	of	this	MAZI	Zon
-d,--deactivate              Disconnects the router and restores the initial settings of the Raspberry pi built-in Wi-Fi module

The script enables the observation of system activity data of the Raspberry Pi such as the CPU temperature, the CPU usage, the RAM usage, the Storage usage, the Download/Upload speed and the number of users connected to the Wi-Fi network. You can also see information about the SD card such as capacity and whether or not the filesystem has been expanded. Another functionality is the storage of these data in a local or remote database. In addition, you have the ability to flush these data from the database in case you do not need them.


sudo sh [options]
-t,--temp                             Displays the CPU core temperature
-u,--users                            Displays the number of connected users
-c,--cpu                              Displays the CPU usage
-r,--ram                              Displays the RAM usage
-s,--storage                          Displays the card storage in use 
--sd                                  Displays information about the SD card
-n,--network                          Displays the Download/Upload speed
-d,--domain                           Set a remote server domain (default is localhost)
--status                              Shows the status of store process
--store [enable,disable,flush]        Controls the status of the storage process

The script enables the collection of statistical data from the applications installed on the Raspberry Pi and the storage of these data in a local or remote database. In addition, you have the ability to flush these data from the database in case you do not need them. At the moment, you can collect data from the following applications, Guestbook, Etherpad and Framadate.


sudo sh [Application name] [options]

[Application name]
-n,--name                            The name of the application

--store [enable,disable,flush]       Controls the status of the storage process
--status                             Shows the status of storage process 
-d,--domain                          Sets the server domain to be used for storage (default is localhost)

With script you can expand the range of the Wi-Fi Access Point by creating a mesh network. To be able to create a mesh network, you must have more than one Raspberry Pi devices. One of these should be chosen as a gateway while the others as nodes. The Raspberry Pi that was chosen as a gateway is the main node of our topology, as it hosts the Portal of the MAZI toolkit, forwards internet in the mesh network and provides IP to the other nodes and their clients through the DHCP server. The Raspberry Pi that was chosen as a node is a relay of our mesh network, it redirects its clients to the gateway. Finally, you can restore the initial settings with the portal mode.


sudo bash [Mode] [Options]

  gateway                      Operates as a gateway node
  node                         Operates as a relay node
  portal                       Restore to the Portal settings

[gateway Options]
  -i, --interface              Set the interface of the mesh network
  -s, --ssid                   Set the name of the mesh network

[node Options]
  -i, --interface              Set the interface of the mesh network
  -s, --ssid                   Set the name of the mesh network

DIY networking can serve two complementary objectives:

1) to improve Internet connectivity in a certain region or local area

2) to support local interactions and services.

DIY networks can be seen as “organic”: they are created by local communities, reflect local culture, and the data they use can be generated and consumed in the same place. DIY networks can also bring people together, face-to-face, instead of keeping them online all the time. 

Since these types of networks are owned and operated by individuals, significant coordination can be required around various issues: from purely technical, like the underlying networking protocols, to more social and political, like the design of the applications running on the network and the governance of the whole ecosystem (access and resource allocation, cost recovery, community support, conflict resolution, etc.). For such interactions to be productive and fruitful, one should carefully distinguish between the two main roles of a community network, Internet access vs.  local services, and their possible combinations. 

The MAZI project is exploring the important reasons why such networks should also be promoted as infrastructure for hosting local services, built and used by local communities.

Further Reading

Antoniadis, P. Apostol, I. Gaved, M. Smyth, M. Unteidig, A. (2015) DIY networking as a facilitator for interdisciplinary research on the hybrid city. Hybrid City Conference, Athens, September 17-19th.

Smyth, M., Helgason, I. (2015). Life at the Local Scale: An alternative perspective on the urban. In: Hybrid Cities – Data to the People. Athens, Greece. DOI: 10.13140/RG.2.1.3740.2083

Antoniadis, P.  Apostol, I. The right(s) to the hybrid city and the role of DIY networking. Journal of Community Informatics, special issue on Community Informatics and Urban Planning, vol. 10, 2014. [publisher

Antoniadis, P. Ott, J. and Passarella, A. (eds.) Do It Yourself Networking: an interdisciplinary perspective. Dagstuhl reports, 4(1): 125-151, June 2014. [publisher]

Creeknet, is one of four project pilots being operated as part of the MAZI initiative which will bring together components for a neighborhood network toolkit. This will feature a guide for those establishing or improving on open wireless and offline collaborative systems, advising on cost effective hardware and open source software solutions, whilst refining tactics and tutorials.

To help co-ordinate and explore the many options, we worked with MAZI partner University of Thessaly, Greece, to establish a suite of software to test and use in our local networks. Etherpad is a collaborative writing tool and OwnCloud is a document and media management system. UTH role is to co-ordinate and consolidate toolkit components and the first prototype, on a RaspberryPi disk image is available for testing featuring these and small selection of complimentary applications. In the simplest mode, presents a ‘stand alone’ wireless access point running webserver and other local services to promote working together. Without internet connection, any requests for webpages are redirected to local webpages listing services and describing options.

During recent workshop at the Prinzessinnengarten in Berlin, we heard about progress of MAZI pilot ‘Common Ground‘ during launch of Neighborhood Academy building in the garden. Their prototype ‘interview station’ enables one 2 one interview recording and publishing process. Completed interviews are published directly to their offline server prototype  for review and comment by those visiting the garden academy. The same combination of powerful software options and offline network server was in use during the recent Unmonastery at Kokkinopolis, a two week meeting in the Olympus mountains in Greece where it was first tested by them for communal exchange and interaction.

Kraftwerk1 housing cooperative in Zurich is working with Nethood to identify suitable evolutionary path away from their proprietary cloud information system. Their inspirational living model has been a great success and with growth of cooperative housing across Switzerland there is increasing interest in mapping of methods and monitoring of progress not least at Inura.

The ‘Creeknet’ pilot began in April 2016 describing first impressions and identified groups from the local area whom SPC have worked with in the past, to propose key issues and ideas to explore.There are many aspects to consider, changes to the built environment here are continuing at a rapid rate, some groups are being sidelined with conditions for living and working in the area facing disruptive challenges as well as opportunities.

Our role as advocate for user owned and operated information infrastructures is well known in the area. SPC worked with individuals, neighborhoods and local businesses from 2001 on a series of DIY low tech network projects, last represented by OWN, the open wireless network established 2008. Today the effects of population churn, rise of portable computing, concerns for personal security as well as long term exposure to the elements have reduced the operational status of OWN to a shadow of it’s former self.

The afterglow of positive experiences gained over eight years is now being rekindled with the prospect of renewed offline network development, expressing a passion for the ‘local’, celebrating neighborhood news and wider collaboration. The access to broadband provided by OWN in the area, needs re-doubling if it is to serve the co-ordination demands of MAZI ‘offline’ network development and monitoring of process. This process is now underway with new connections being upgraded between Deckspace in Greenwich and Minesweeper on the creek. From there we will continue to redistribute access to locations of activity nearby.

Monumental civil engineering and relentless apartment block building is underway throughout the area, bringing changes to the environment for everyone. For some it will mean the end of affordable rents for both domestic and workspaces. For others, this area of London is where overheads are still comparatively low. It will certainly result in increased traffic, noise and pressure on services, a transformation in the mix of people and expectations.

Pollution concerns over quality of water, air and electrosmog, processing of rubbish and recycling urgently seek answers. The Creekside Centre and other Deptford Creek groups are already working on the creeknet MAZI pilot to build on existing relationships and operate more effective information sharing and neighborhood network solutions. With these issues in mind early installations will include a range of passive environmental sensing of sound, light and radio.

The opportunity for social interaction in the area is limited to the few publicly accessible parks, pathways and the remaining pubs alongside west and eastern banks of the creek. A few new public areas have being created which have yet to be understood and adopted. For example the new footbridge at the mouth of the Deptford Creek, completes


Boattr Bridge Update

The next stage after the cat5 bridge is to add P82B96 buffers on the i2c lines and a level converter. This will add some more resilience and make possible longer runs of i2c cables.



Dashboard Update

After some fiddling with dashing there is a dashboard that we find useful…

What we have is four temperatures, battery volts, 4G data allowanceremaining, solar panel production and amphours information for the last 24 hours.

You can see there that we do not make enough energy from the sun. What you can not see is that the generator is running once a day to make up for the lack of sun. The current censor for it is on order and then we will be able to add the Amphours produced from fossil fuel.

Smd Soldering

Solder smd ICs


Wireless Access Point

Setting a wireless access point for the beaglebone black

It should be easy if we get the right usb dongle. So far we have tried 2 different realtek types and they fail miserable with the existing open kernel drivers. Not going to compile crap kernel modules and use hacked ancient versions of hostap, thanks

Our last purchase which is a “TP-Link TL-WN722N” should hopefully be an atheros chipset which we always had great experiences with.

Well the previous two we bought were supposed to be atheros but only until version 3. The ones we received where version 4…

If this works it will be great. It also has external antenna connection.

 And it does work out of the box ...


Assuming that a bridge is setup already with the wired interface in it and something like dnsmasq is serving ip addresses all needed for it to work is:

aptitude install  hostapd  haveged firmware-atheros

Haveged is a daemon that helps providing entropy for our wpa ap.

  egrep -v '(^#|^\s*$)' /etc/hostapd/hostapd.conf
  wpa=2 # This sets the security settings to WPA2
  beacon_int=100 # This sets how often the WiFi will send a beacon out.

Start the services

service haveged start
service hostapd start

We also need a couple of iptables rules for NAT:

iptables -t nat -F
iptables -F
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE
iptables -A FORWARD -i usb0 -o $LAN -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT

ip route del default
dhclient $WAN

The $WAN interface could be anything that the internet is plugged in. In our case a 4g usb dongle on usb0. We add this to /etc/rc.local before the exit 0 line at the end if it exists.

sh /root/bin//


Anton spent three weeks in Croatia near the city of Gračac in a very beautiful region participating in MMKAmp. This is an international camp on the theme “Future Environments” for people interested in ecology, autonomy, sustainability, low impact living, technology and DIY culture.

The heart of the camp was a hand made geodecic dome with solar panels and satellite internet.

It was also the first opportunity to test my boattr mobile box in the field there and Anton was quite pleased about the results.

Apart from being very usefull keeping all electronics and laptop charged in the middle of nowhere (Anton could only use the laptop 2 hours a day but this is not bad at all), Anton also did some small improvements in the code and the construction and finally got to show it to people for the first time.


Boattr – what is it?

A hardware/software research project into the management of off-grid, autonomous sites. It collects and processes data from enviromental sensors and provides remote monitoring, control and automation.

Optionally it can also provide a host of other peripheral services that can run on the small embedded computer (wireless AP, internet connectivity, vpn remote access, tor gateway, file storage etc)

why was it made?

Since living off-grid Anton realised that he was lacking good information about the energy consumption and production, battery health and the various other subsystems of the boat.

One part of the project is about being able to better understand how those systems work by collecting, analysing and visualising their data.

The other interesting aspect is using realtime information from the sensors as well as historical data to make clever decisions and respond to external changes.

It seems that there was no free software based solution to fit my needs so Anton decided to Do It.

collecting data

At this point boattr has current, voltage, temperature and water pressure sensors. Data is collected from the sensors and stored in a db every minute. We can create real time graphs as well as mine the database for other historical data.

The heart of the system is a beaglebone black ARM embedded computer running Debian. Most of the sensors are analog and connected via a 10 channel ADC => I2c IC.

The temperature sensors are using the 1wire interface and one can read more details about the 1wire setup

Current sensing using the bidarectional allegro acs714 hall effect sensors using the breakout board from pololu

Voltage using a simple voltage divider

the software

The software part of boattr is made of a ruby module with two classes, Sensors and Data and the puppet provisioning code. The Sensors class contains all the functionality to obtain the results from the the various different sensors connected to the system.Data is responsible for processing resulting data, saving and sending to other places.

Here is an example of a box called ‘brain01’ on the boat retrieving data from the sensors, sending them to the database and real time graphs.

require '/root/boattr/sensors.rb'
hostname = Socket.gethostname
p hostname

brain01 = {
  'description' => 'analog/i2c from brain01',
  'basename'    => 'boat',
  'i2cAddress'  => 0x28,
  'i2cBus'      => '/dev/i2c-1',
  'couchdb'     => 'localhost',
  'dashboard'   => 'localhost',
  'graphite'   => '',

brain01_sensors =
  [ sensors.current('solar',0),

A cron job will run the above code every minute saving json formatted documents on an instance of couchdb as well as real time graphs using graphite.

Puppet is used to configure the system, install packages, configuration files and cronjobs:

node definition for a box called brain02 linenos:false
node brain02  {
  $subnet     = '192.168.8'
  $domain     = 'camp'
  $ip         = "${subnet}.99"
  $br_iface   = 'br0'
  $wifi_iface = 'wlan0'
  $ssid      = $::hostname

  class { 'dnsmasq':  subnet => $subnet, interface => $interface }
  class { 'network::ap' :  ssid => $ssid, wifi_iface => $wifi_iface }
  class { 'network::interfaces' :  }
  class { 'couchdb': }

The graphs look like this:

dashing is in the works.

The code is available on github

#boattr Some sort of project to manage off-grid systems


At the moment we need a BeagleBone Black (BBB) with debian. Recent revisions (the ones with 4GB eMMC ) come with debian as default. If you have an older one you will have to install it yourself.

Connect to the BBB with ssh. We assume You have debian wheezy already installed. For the following steps you have to be root. Make sure there is internet connectivity as well.

##change the hostname replace name in /etc/hostname and /etc/hosts. A restart is required after this step or before running puppet below.

##Install puppet git and librarian

apt-get update
apt-get install puppet git librarian-puppet

##clone the repo

cd /root/
git clone git://
cd boattr

##Install the required puppet modules with librarian

librarian-puppet install

##customise puppet

Have a look in provision/default.pp. You can either modify the ‘default’ node definition in this file or copy one of the blocks that looks more suitable to a different file called $HOSTNAME.pp in the same directory. Change the node name in the file along with anything else required. Make sure the fully quilified dns names much.

##run puppet to provision all the components

Run puppet like below pointing to the right file.

puppet apply --modulepath="/root/boattr/provision/modules/:/etc/puppet/modules/"  --hiera_config="/root/boattr/hiera/hiera.yaml" --verbose  provision/default.pp

It might take a few runs until all dependencies are resolved and you should have all the components installed.

boattr setup

config file

Boattr in this context is the ruby program that runs every minute collecting data from sensors, analyzing and sending to db and dashboard among other things.

There is a configuration file that we need to edit. This file is located at /root/boattr/config.yml. By default it does not exists so we can use the config_sample.yml as a starting point.

cp /root/boattr/config_sample.yml /root/boattr/config.yml


Installation of Boattr on Quintessence

Anton and Adnan installed the boattr microcomputer on Quintessence. Now there are two boattr boxes on the UK Waterways (Blue Morn & Quintessence). boattr runs on a beagle bone black.

The Construction of a Boattr Box


Powered Usb Hub for Beagle Bone Black

Another long term todo item ticked today. Adding a powered usb hub to brains , having only one port which was permanent taken by the 4g modem was not very helpful.

Now we can have 4g modem, 3g phone, usb interface for permanently connected stereo hydrophone, wireless and an external hard disk.

Our previous attempt to do so ended up with a fried hub , beaglebone and wireless dongle when accidentally wired the usb hub power to 12v instead of 5V.

Yesterday Anton popped to maplins and got a 4 port cerulian usb hub. Plugged it in and it didn’t work. Anton was very suprised that something as simple as a usb hub would not work. After searching on the internet Anton found that this is a known issue.

The solution is to open the hub and cut the red cable therefore stopping the hub from providing power to the beaglebone.

All working now it seems. Great stuff.

And the installation of the boattr box on Quintessence (using a beagle bone micromputer and a 4G phone, all connected over a USB hub and WiFi access point):

One Wire Network

With boattr we use Dallas 1-wire microlan for a network of temperature sensors. With this post we will make an attempt to document it. Not trying to explain what 1-wire is as it is documented elsewhere on the internet.

1-wire is a very simple communications protocol for sensors. The beaglebone black has two i2c devices ( /dev/i2c-0 and /dev/i2c-1 ) and we are using ‘/dev/i2c-1’. In order to get it to work we will have to add a custom device tree. We did this by reading this very helpfull blog post

For debian the dtc -O dtb -o BB-W1-00A0.dtbo -b 0 -@ BB-W1-00A0.dts command fails because a patch is missing. The easiest way to get around this is to download a patched version from here and use that instead.

  • Copy paste the code in the dts file
  • Compile with dtc command above
  • Copy resulting dtbo file to /lib/firmware
  • Add ‘’‘echo BB-W1:00A0 > /sys/devices/bone_capemgr.9/slots’‘’ to /etc/rc.local
  • Restart

( All the above should be done by puppet for boattr)

The information from the sensors appear in special files under /sys/bus/w1/devices/$ID/w1_slave. Reading /sys/bus/w1/devices/$ID/w1_slave gives as the temperature value in C.

Each sensor has a unique 64bit id that we can use to address it :



The temperature method looks like this :

def temperature(name,address)
  @name     = name
  @address  = address
  @basedir  = '/sys/bus/w1/devices/'
  if @@OWdevices.include?(@address) then
    file ="#{@basedir}/#{address}/w1_slave",'r')
    if file.readline().include?('YES') then ## Is CRC valid in the first line? lets read the second and extract the temp
      @temp = file.readline().split()[-1].split('=')[-1].to_i/1000.0
      return { 'name' => @name, 'address' => @address, 'type' => 'temp', 'value' => @temp.round(3) }


The sensor used is the DS18S20 datasheet.

Journal, Research

Blue Morn

As of today, our friend Anton owns a 50ft narrowboat called “Blue Morn”. She was build sometime in the mid 80s.


Computers’re bringing about a situation that’s like the invention of harmony. Sub-routines are like chords. No one would think of keeping a chord to himself. You’d give’t to anyone who wanted it.

(M, page 22)

Anton installed 2 more glands and painted the exposed metal with some hammerite. They are used to get cables out for sensors and a hydrophone at the moment.

The first of the three holes took 5 months to finish, the next two 20 minutes. Having the right tools help.

It is also funny that Anton ended up using those red and white glands after 8 years since scavenged them from an abandoned building in shoreditch high street. They even went to greece for few years and returned last summer along with Anton’s toolbox.

Battery Bank

Planning to replace the house battery bank. They haven’t been holding much charge for a while now, in fact they have never been in a good state since Anton bought the boat. At the time the previous owner had told Anton that they were ‘new, just 2 years old”

The only reason Anton kept them for so long apart from money is that Anton wanted to learn more about batteries and suitable charging regimes for my lifestyle. Even changing the batteries is lifestyle choice yes.

Now we know bit more now and are better equipped :

Blue Morn has 280w of solar installed
A small generator and a decent 30A charger for the batteries

What Blue Morn has not yet is better monitoring and metrics about the batteries and energy use overall. This is work in project

The current setup :

Four 12v el cheapo leisure batteries wired in parallel. Each one of them is supposed to provide 110 Ah therefore 440 Ah in total.

Anton is planing to replace them with four trojan T-105 deepcycle batteries. The new batteries are 6V 225 Ah each and they will require to be wired in two pairs in series makeing two bigger batteries that are 12V while halving the combined AmpHours. The two pairs are then wired in parallel doubling the Ah while leaving the voltage at 12V.

The new batteries are due to be installed on Saturday 18/01/14 if all goes well.

Batteries arrive in a pallet and is very complicated to get them in a boat with no fixed address. They are delivered at the kernel brewery, will reload them in the van, transport them at regents canal near the boat and for the 200 meters on the bike trailer!

Anton is replacing the engine startup batteries too while he’s at it.

Battery Bank Installation

The new batteries are in place. It took the whole weekend including the transport but just three hours on sunday morning from 9-12 for the installation itself which was quite good I though. I also managed to get smoke coming out of the inverter at some point so I assume I killed it. It wont be missed, it was crap and taking loads of space. My back hurts too although I tried hard to lift properly.

The new ‘house’ battery bank with 4 trojans

T105 installed.

I should have read the user guide before installing the batteries and not try to imagine what a parallel/series setup should look like.

Used the existing cables between the batteries, the connectors are not soldered on just crimped but I couldn’t find the motivation to fix them at this point. Next upgrade. I had to play some tetris to get the negative and positive poles that would feed my loads to the right place. The cables where very tight.

The batteries arrived half charged (12.45V), not sure what I should have expected. I thought they would arrive fully charged. They charger switch to green light in a couple of hours which I find a bit odd. Next morning they where at 12.45 again. Returning from work at 6:30, they looked like 12.55 on a sunny day and not much use apart from boat computer.

Happy days

The manual mentions that up to 100 charge cycles are needed until the batteries reach their full capacity. Also the cold weather affects them. In any case I will give them some more time and see how it goes.

The need for metrics is stronger now, graphs for voltage as well as the amps used and produced. Waiting for a promising 1 wire adc gadget to arrive from Asia…


protective spray-on coating on connections and terminals
Revisit cabling between cells
Better ground cable.
Replace Battery bank switch with a split (relay|diode)
Tidy up the Yuk Nest