GithubHelp home page GithubHelp logo

stelas / gclog Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 42 KB

GCLOG is a lightweight daemon running in the background and constantly reporting your Geiger counter readings to various radiation monitoring websites. With a small footprint and minimal dependencies it is aimed to run on Linux embedded computers.

Home Page: https://www.gclog.de/

License: GNU General Public License v3.0

Makefile 6.95% Shell 6.54% C 78.78% Roff 7.73%
geiger-counter radiation monitoring linux c raspberry-pi openwrt gmcmap radmon safecast

gclog's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

they4kman

gclog's Issues

[ERROR] Reading ZERO value from Geiger tube

I have connected a GQ GMC 320+ v5 on a RasPi 2 Model B v1.1 running Raspbian.
The device is detected on /dev/ttyUSB0 and listed in lsusb.

The file gclog.conf is correctly configured to use /dev/ttyUSB0. When I start GCLog v0.2.4 (installed from the deb package), I get the following error every 2 seconds in journalctl :

Apr 17 10:06:59 pihole gclog[754]: [ERROR] Reading ZERO value from Geiger tube.

Any idea about the issue? Is there a way to troubleshoot the serial connection? The GC is working fine, and sending data to the GQ Windows software when connected to my PC.

GCLog fails to stay running on debian 12..

I did a make from the latest on here, created a systemd service gclog.service, containing:

[Unit]
Description=GClog radioactive data feeder
After=network.target

[Service]
ExecStart=/usr/local/bin/gclog -v -c /etc/gclog.conf
Restart=on-failure
RestartSec=20s

[Install]
WantedBy=default.target

Then this happens at boot:

2023-08-07T12:28:22.176925+02:00 greeny systemd[1]: Started gclog.service - GClog radioactive data feeder.
2023-08-07T12:28:22.796038+02:00 greeny gclog[2570]: Configuration:
2023-08-07T12:28:22.796192+02:00 greeny gclog[2570]: #011#011GQ GMC Geiger Counter on /dev/ttyUSB0 @ 0010002,
2023-08-07T12:28:22.796276+02:00 greeny gclog[2570]: #011#011Location: x
2023-08-07T12:28:22.796344+02:00 greeny gclog[2570]: #011#011netc.com: (null),
2023-08-07T12:28:22.796411+02:00 greeny gclog[2570]: #011#011radmon.org: x / xblahblah,
2023-08-07T12:28:22.796497+02:00 greeny gclog[2570]: #011#011safecast.org: xDidtfLG2YK / Device ID xx5,
2023-08-07T12:28:22.796567+02:00 greeny gclog[2570]: #011#011gmcmap.com: x45x7 / Device ID 5x75x05x750,
2023-08-07T12:28:22.796664+02:00 greeny gclog[2570]: #011#01160s interval
2023-08-07T12:28:22.797361+02:00 greeny gclog[2571]: Configuration:
2023-08-07T12:28:22.797475+02:00 greeny gclog[2571]: #011#011GQ GMC Geiger Counter on /dev/ttyUSB0 @ 0010002,
2023-08-07T12:28:22.797666+02:00 greeny gclog[2571]: #011#011Location: x
2023-08-07T12:28:22.797837+02:00 greeny gclog[2571]: #011#011netc.com: (null),
2023-08-07T12:28:22.797985+02:00 greeny gclog[2571]: #011#011radmon.org: x / xblahblah,
2023-08-07T12:28:22.798066+02:00 greeny gclog[2571]: #011#011safecast.org: xidtfLG2YK / Device ID xx5,
2023-08-07T12:28:22.798156+02:00 greeny gclog[2571]: #011#011gmcmap.com: x45x7 / Device ID 5x75x05x750,
2023-08-07T12:28:22.798275+02:00 greeny gclog[2571]: #011#01160s interval
2023-08-07T12:28:22.798401+02:00 greeny gclog[2571]: [DEBUG] Entering main loop...
2023-08-07T12:28:22.798677+02:00 greeny gclog[2571]: [DEBUG] Main loop exited. Cleaning up...
2023-08-07T12:28:22.799433+02:00 greeny systemd[1]: gclog.service: Deactivated successfully.

and the process just ends there. First it's strange it seems to run twice in a row after starting it from the service file, then it exits and deactivates, while nothing in the service would implicate this. SElinux or apparmor aren't running on this machine, so those can't be it.
Furthermore, when I run it by hand from the commandline, just running
/usr/local/bin/gclog -v -c /etc/gclog.conf
it does just fine and keeps running in the background, Entering main loop without ending....

What am I doing wrong here?

Upload to GCMMap only in https now

The upload to gmcmap.com does not work anymore.
journalctl shows

Apr 21 09:34:35 pihole gclog[30652]: CPM: 28 (= 1662/60), Timestamp: Sun Apr 21 07:33:35 2019
Apr 21 09:34:36 pihole gclog[30652]: [WARNING] Upload to gmcmap.com failed.

When I try to simulate an upload from command-line, I get:

$ curl -v "www.gmcmap.com/log2.asp?AID=01234&GID=1234567890&CPM=33"
*   Trying 184.168.224.226...
* TCP_NODELAY set
* Connected to www.gmcmap.com (184.168.224.226) port 80 (#0)
> GET /log2.asp?AID=01234&GID=1234567890&CPM=33 HTTP/1.1
> Host: www.gmcmap.com
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html; charset=UTF-8
< Location: https://www.gmcmap.com/log2.asp?AID=01234&GID=1234567890&CPM=33
< Server: Microsoft-IIS/8.0
< X-Powered-By: ASP.NET
< X-Powered-By-Plesk: PleskWin
< Date: Sun, 21 Apr 2019 07:36:56 GMT
< Content-Length: 194
<                                                                                                                                                              <head><title>Document Moved</title></head>
* Curl_http_done: called premature == 0
* Connection #0 to host www.gmcmap.com left intact
<body><h1>Object Moved</h1>This document may be found <a HREF="https://www.gmcmap.com/log2.asp?AID=01234&amp;GID=1234567890&amp;CPM=33">here</a></body>

So it looks like they're now redirecting all requests to https, which is not supported by the code in gclog.c .

Invalid readings after a while

After some time running gclog, the reported data is wrong:

Jun 09 00:30:15 pihole gclog[942]: CPM: 20 (= 1156/59), Timestamp: Sat Jun  8 22:29:15 2019
Jun 09 00:31:15 pihole gclog[942]: CPM: 21 (= 1247/59), Timestamp: Sat Jun  8 22:30:15 2019
Jun 09 00:32:15 pihole gclog[942]: CPM: 25 (= 1455/59), Timestamp: Sat Jun  8 22:31:15 2019
Jun 09 00:33:15 pihole gclog[942]: CPM: 27 (= 1604/59), Timestamp: Sat Jun  8 22:32:15 2019
Jun 09 00:34:15 pihole gclog[942]: CPM: 221 (= 12845/58), Timestamp: Sat Jun  8 22:33:15 2019
Jun 09 00:35:16 pihole gclog[942]: CPM: 7142 (= 428544/60), Timestamp: Sat Jun  8 22:34:16 2019
Jun 09 00:36:16 pihole gclog[942]: CPM: 7515 (= 443392/59), Timestamp: Sat Jun  8 22:35:16 2019
Jun 09 00:37:16 pihole gclog[942]: CPM: 6665 (= 399872/60), Timestamp: Sat Jun  8 22:36:16 2019
Jun 09 00:38:17 pihole gclog[942]: CPM: 4800 (= 288000/60), Timestamp: Sat Jun  8 22:37:17 2019

When that happens, the only solution is to stop/kill gclog and restart it. No idea about what triggers this.

Jun 09 10:04:43 pihole gclog[942]: CPM: 7526 (= 451584/60), Timestamp: Sun Jun  9 08:03:43 2019
Jun 09 10:05:44 pihole gclog[942]: CPM: 8333 (= 499968/60), Timestamp: Sun Jun  9 08:04:44 2019
Jun 09 10:06:20 pihole gclog[942]: [DEBUG] Main loop exited. Cleaning up...
Jun 09 10:06:41 pihole gclog[6126]: [DEBUG] Entering main loop...
Jun 09 10:07:41 pihole gclog[6126]: CPM: 29 (= 1755/61), Timestamp: Sun Jun  9 08:06:41 2019
Jun 09 10:08:42 pihole gclog[6126]: CPM: 28 (= 1629/59), Timestamp: Sun Jun  9 08:07:42 2019
Jun 09 10:09:42 pihole gclog[6126]: CPM: 25 (= 1491/60), Timestamp: Sun Jun  9 08:08:42 2019

I'm running gclog 0.2.5 on a Raspberry Pi.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.