If your NAS is able to install Python3 in a version 3.6 or later, it should work. What dependencies are you referring to? The Python modules? This is really easy to handle. Look into chapter installation of the GeigerLog manual.
Sure you can reduce the software to serve only your needs. Do you want a USB connection or a WiFi connection?
For USB it is also easy: Download geigerlog_simple.py from my site https://sourceforge.net/projects/geigerlog/files/ and take a look. I believe you can open the USB-serial connection with php command dio_open()?
There are 2 more *simple* versions, which address the need of a GMC500. You don't need this for a 300 series counter.
For using WiFi it becomes quite a bit more complicated. But part of the problem is created by GQ, and you need to make a workaround. I think it is easier to install all of GeigerLog than create this "simpler" approach.
But, thinking about your php skills: isn't the php code on GeigerLog manual page 77 not already what you need? Just understand the redirection problem and the need to make your apache server "unsafe".
On my apache server I have in its docroot a file index.php, which produces this output into file WIFICLIENT.demo, sitting in the GeigerLog program directory:
Date : 2022-03-06 10:25:03
From : 10.0.0.42:34168
To : 10.0.0.20:80
Query: AID=123&GID=456&CPM=18&ACPM=23.29&uSV=0.12
R-URI: /?AID=123&GID=456&CPM=18&ACPM=23.29&uSV=0.12
Forward_URI: h**p://10.0.0.20:8000/GMC/?AID=01460&GID=18898497959&CPM=18&ACPM=23.29&uSV=0.12
ERR0 OK for GMC Device
There are your counter values CPM, ACPM, uSv.
The file is this:
<?php
// Bug-fixing workaround for a GMC counter as a WiFiClient device
// by forwarding the original request arriving on "unsafe" Apache
// server to the GeigerLog' internal web server using CURL
// Error messages printout to browser:
// to include syntax and parse errors in printout it is also
// required to set in php.ini file: display_errors = on
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
function saveToFile($text){
global $file, $allow_saving_to_file;
if ($allow_saving_to_file) file_put_contents($file, $text . "\n", FILE_APPEND);
}
$debug = FALSE;
// To record web traffic to a file set this variable to TRUE
$allow_saving_to_file = TRUE;
// And make sure this file exists with write permission for your computer's Web Server!
$file = '/home/ullix/geigerlog/geigerlog/WIFICLIENT.demo';
// QUERY_STRING = 'AID=0123&GID=4567&CPM=28&ACPM=37.38&uSV=0.18'
// REQUEST_URI = '/?AID=0123&GID=4567&CPM=28&ACPM=37.38&uSV=0.18'
saveToFile("Date : " . date("Y-m-d H:i:s"));
saveToFile("From : " . $_SERVER['REMOTE_ADDR'] . ":" . $_SERVER['REMOTE_PORT']);
saveToFile("To : " . $_SERVER['SERVER_ADDR'] . ":" . $_SERVER['SERVER_PORT']);
saveToFile("Query: " . $_SERVER['QUERY_STRING']);
saveToFile("R-URI: " . $_SERVER['REQUEST_URI']);
# write full _SERVER to file (use only for debugging)
if ($debug){
saveToFile("Full _SERVER :");
foreach ($_SERVER as $parm => $value){
saveToFile(sprintf(" %-30s = '%s'", $parm, $value));
}
}
// if root is called do NOT forward; instead
// send server signature and return
if ($_SERVER['REQUEST_URI'] == "/"){
echo $_SERVER['SERVER_SIGNATURE'];
return;
}
$myIP = "10.0.0.20"; // Set your Forward-to IP
$myFwPort = "8000"; // Set your Forward-to Port
$myDevice = "GMC"; // Special setting for GMC counter
$GeigerLog_URI = "h**p://" . $myIP . ":" . $myFwPort . "/" . $myDevice . $_SERVER['REQUEST_URI'];
saveToFile("Forward_URI: " . $GeigerLog_URI);
// setup curl
$ch = curl_init($GeigerLog_URI);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
$response = curl_exec($ch);
curl_close($ch);
saveToFile($response);
echo $response; // send back to GMC counter
saveToFile("");
?>
Adapt to your needs.
Note that this forum requires to write 'h**p' instead of xxx, well, that what can't be written ;-)