Short guide to make a dowse boxon a raspberry pi 3

fredd
Sun, Nov 5, 2017 9:16 AM

How to make Dowse out of a Raspberry Pi

  • you need:
    • a Raspberry Pi (version 2 or 3)
    • a power supply with at least 2A power (the Raspberry Pi 3 needs 2.5A) and a Micro-USB connector
    • a MicroSD card with at least 4GB capacity, class 10
    • the Dowse image file

Wat to do

clone on MAC

Be careful using dd command. Double check the devices or you risk to lose data!

  • diskutil list
  • diskutil unmountDisk </dev/disk3>
  • sudo dd if=~/<dowseIMGname.img> of=</dev/disk3>

Deploy

  • connect it to your access point/router via an Ethernet cable

    • optional: you can connect a monitor via HDMI and keyboard and mouse, but you’ll have to do it before powering it up. This might be useful at the beginning because you can log in to it right away, get its IP address and change settings, etc.
  • connect it to power to boot it up

  • Dowse should now be running!

  • Log in to your home router/access point

  • disable DHCP (also for IPv6 if that is on, as apparently Windows 10 uses IPv6 for DNS)

  • The router will give you the Dowse box’s IP address. With the default SD card image Dowse takes its IP via DHCP

  • Use that to SSH into your Dowse box, i.e. with ssh root@192.168.0.1

  • set up a static IP address for your dowse box (edit /etc/network/interfaces). After all, you have disabled the router’s DHCP, so if you ever reboot the Dowse box (your new DHCP server), it will want to know which IP it should have.

There are two users set up, root and dowse. The default password for root is toor, for the user dowse it is dowse. Log in as dowse to go straight to the interactive Dowse console.

How to say Dowse is running:

  • find out its IP address. Your router might tell you if you log in to its web interface, or try an app like https://github.com/adafruit/Adafruit-Pi-Finder/releases/tag/3.0.0

  • Let’s assume it’s 10.0.1.10. Open a Terminal and type
    ping 10.0.1.10

  • or open http://dowse.it in your browser. You should see the captive portal. Enter yourself as the administrator.

  • another way to check that the captive portal works:
    dig 10.0.1.10 dowse.it

How to say dowse is running on WIN machines

  • Open the startmenu and type as a command to run ‘cmd’ - it will open a commandprompt
  • run ‘ping dowse.it
  • if it says ‘xx bytes from dowse.it … time=xx ms’ a few times, it works!
  • Open ‘ dowse.it’ in your browser

Troubleshooting

  • Dowse runs your DHCP. If it fails, try to disable the DHCP on your router
  • Check if there is a seperate DHCPv6 that might cause IPv6 resolving issues (Windows 10 uses IPv6 for DNS)

Gource

Gource allows to visualize the data using a colorful, dynamic and animated graph. It’s processor-intensive so it should be run on a client machine.

How to use Gource on a windows machine

  • Windows does not come with SSH. It is possible to use an alternative SSH-client called ‘Putty’ (Download URL: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
  • After installing, there is a ssh console client called plink.exe. It might not be in your ‘PATH’. To run it from windows commandline, you need to specify the whole path. E.g. “c:\Program Files\Putty\plink.exe …”
  • When piping the output to gource, Windows does not show the interactive prompot for the password. But you can specify the password via the commandline switch -pw

<full_path_to_putty>\plink.exe -pw dowse -l dowse dowse.it /usr/local/dowse/bin/dowse-to-gource | <full_path_to_gource>\gource.exe --log-format custom -

Alternative:

  • Instead of cmd/powershell, use a shell that knows SSH and such tools like ‘ https://babun.github.io/
  • Untested, please document :-)

On Mac:

NB, if you dont have XCODE, is sufficient to have the minimal version of it. Open a terminal and type:

  • xcode-select --install

Then is time to install homebrew

  • install via homebrew https://brew.sh/
    First install brew if it isn’t already, then just do brew install gource
    Once installed, start gource on your own laptop with a basic command like:

ssh -l dowse 10.0.1.10 /usr/local/dowse/bin/dowse-to-gource | gource --log-format custom -

NB you will be asked the password. Default password is
dowse

general

you can also get dns queries listed directly in your shell i.e. with
ssh -l dowse 10.0.1.10 /usr/local/dowse/bin/dowse-to-gource

How to start OSC

ssh into the dowse box (See ‘Putty’ further down if you are on Windows)

then start:

/usr/local/dowse/bin/dowse-to-osc osc.udp://ip-of-machine-to-send-to:port/path

to make it start at every boot, put this line inside the file /etc/rc.local (edit as root)

Node Red

A graphical editor to edit node patches/flows. Such flows allow reacting to input (like Dowse MQTT data). Not required to use Dowse. You can write your own programms or create gadgets that recieve MQTT or OSC data and do things with it.

after installing node red you can follow a great tutorial :

(It can also be installed on the dowse box, right? Following the instructions here, will report back if it works: https://learn.adafruit.com/raspberry-pi-hosting-node-red/setting-up-node-dot-js

NB: Before installing node red you must have a clean installation of node.js on your machine.

Node.js

Installation Linux

  • install node.js following instructions on nodejs page
  • then, in terminal
    sudo npm install -g --unsafe-perm node-red

Installation Mac

Installation Win

go to node.js website and install node.js
https://nodejs.org/en/

open node terminal
type: sudo npm install -g --unsafe-perm node-red

And then magically you are ready to ESP and another million ways to build interfaces to dowse your IoT lan...

Node MCU

Node-red to Arduino

some info on how to stay in touch with us @dowse