Skip to content

Lightweight server to log, analyze and proxy data measured by internet connected Geiger counters

License

Notifications You must be signed in to change notification settings

vinceh121/gmcserver

Repository files navigation

GMCServer

GitHub GitHub Workflow Status GitHub Workflow Status GitHub repo size LGTM Grade LGTM Grade Most used swear

GMCServer is a lightweight service that allows logging, analysis, visualization and proxying of data recorded by GMC Geiger counters, Radmon counters and Safecast counters
Some of the features implemented so far:

  • User accounts
  • Device logging
  • Timeline visualization
  • Device World map
  • Simple statistical analysis (min, max, average, standard deviation)
  • Proxy to other platforms

A demo/main instance is available at https://gmc.vinceh121.me

Map view Timeline view Calendar view

Motivation

On top of not being self-hostable and closed-source, gmcmap.com lacks some features relating to data analysis, visualization, API access, and overall security. This project aims to create a compatible, open-source and self-hostable alternative to gmcmap.com implementing those missing features and security fixes. GMCServer can also proxy records, that is, report measurements itself to other platforms such as gmcmap.com and radmon.org simultaneously upon receiving a record from your counter.

Setting up device

GQ Electronics' GMC

You should first set up WiFi on your GMC device. In the Server settings, you should set the following values:

  • Website : to the hostname of the server where GMCServer is running (gmc.vinceh121.me for the main instance)
  • URL : to log2.asp
  • User ID : to the "GMC ID" of your account, visible next to your username when logged in on your user page. This ID is supposed to stay secret.
  • Counter ID : to the "GMC ID" of your device, visible next to the device's name when logged in on its page. This ID is supposed to stay secret.

Once those settings set, pressing the Test Connection button should show "Successful" after a second.

Cajoe

You will need to flash a custom ESP8266 firmware.

Installing

On Debian/Ubuntu

  • Install Java (apt install default-jre)
  • Install MongoDB
  • Download the deb file from GitHub actions "Make debian" and install it with dpkg:
unzip gmcserver-debian-master-abcdef012345.zip
dpkg -i work/gmcserver/gmcserver_0.0.0-1_amd64.deb

Building from source

The following dependencies are required to build:

  • make
  • maven
  • pnpm
git clone https://github.com/vinceh121/gmcserver
cd gmcserver
make
sudo make install

This will build all compenents of GMCServer (backend, frontend, emails), if you need to only build one specific component, cd to its folder and run make in it.

Configuring web server

GMCServer can act on its own as a web server, you just need to set the web.enabled setting to true in config.properties

However, it may be more "proper" to use a separate web server/reverse proxy such as Apache or Nginx:

Licensing

Unless otherwise noted, files in this repository are licensed under the GNU AGPL V3 license.

Icon is by Lorc under the CC BY 3.0 license from game-icons.net