I recently received the “Onyx” Geiger counter that I had backed on Kickstarter in late 2012. This is a great little device, with the added bonus that it is completely open source: it was designed by Bunnie Huang following the Japan earthquake and Fukushima events. You can find the description of his design on his blog.
The Onyx can act as a logging monitor, and saves readings every 30 minutes. It is possible to download those using its serial interface, so I decided to re-use the same sort of framework I had developed for the Z-Scale controller, and write a quick “Onyx Viewer” utility. I had 2 hours ahead of me in the plane back home today, so here it is!
The Onyx Viewer
If you are interested by the code, one notable part is the use of the browser’s local storage to persist the Backbone “Settings” model. Otherwise, very straightforward Backbone.js app with Bootstrap as the UI.
Installing the viewer
You should first of all checkout the GIT repository for the viewer, as follows:
$ git clone https://github.com/elafargue/onyxviewer.git
You will need a proper Node installation on your machine: you can get it by heading over to nodejs.org and download the installer.
Once Node is installed, just get into the onyxviewer directory and install the node app:
$ cd onyxviewer
$ npm install
Last, once everything is installed, cd to “server” and launch the viewer:
$ cd server
$ node server.js
The server runs on port 8000: go to localhost:8000 on a browser, and head over to the Settings screen (link in the upper right corner):
At this stage, the settings save/restore options don’t do anything. What you are looking for is the “Serial port name:” option. You need to know this one: the easiest way is to open a terminal and “ls -l /dev/tty.usb*”. The Onyx’ serial interface will look something like “/dev/tty.usbserial-AE01D5RB” on a Mac. On a Windows computer, this will be different, if anyone tries, let me know and I will update the documentation.
Once this is done, you can go back to the main screen (press the “Onyx Display” menu on the upper left corner), then click on “Connect to Onyx”. If all goes well, the button will turn green within a second or two, and you can then press “Display Log”. Easy, right?
Quick user guide
Not much to say either: you can select an area on the graph to zoom in. Note that you can also select an area on the small overview graph on the left.
The “Diagnostics” button will take you to another screen, where you will get a display of the Onyx software version, and two additional actions:
– Launch a display test
– Synchronise the Onyx internal clock to your computer clock
I will shortly implement an option to save the device log to the local disk, as well as maybe to the browser’s local storage.