Appendix E Running on Non Linux Platforms - jgyates/genmon GitHub Wiki

Running on Non-Linux Platforms

The software for this project has been written and tested on a Raspberry Pi running a few different variants of Linux. When creating the software an effort has been made to not tie the execution to a particular platform. The base requirements for the software are:

  • Python 3.x
  • A serial port supported by the pyserial library, or not if you use serial over TCP
  • A TCP/IP network connection supported by python
  • A file system that can read and write files

By default the config files are loaded from the /etc/genmon directory however if you are on an operating system that does not have an /etc directory you can specify the path to the config files on the command line:

sudo python3 genmon.py -c <path to conf file> &
sudo python3 genserv.py -c <path to conf file> &

where <path to conf file would be something like C:/Temp/

Use the forward slash "/" slash instead of the backward "" slash when specifyuing Windows path names. Python uses the forward slash as a special character so you can not use it alone as a path delimiter.

Also, the log files, by default are written to /var/log. To change the location of your log files you can modify your genmon.conf file (logfilelocation=).

While the software has not been tested on non Linux platforms, since it is python it should run OK. If you attempt this feel free to open and issue if you have any problems or let me know via opening and issue if you are successful.

Windows

There have been some additions to the project to allow it to run on windows however Windows is not officially supported as the windows platform is not included in the regular development testing. I am open to support this further however it would rely on community support for testing.

Here is a rough guide to getting up and running on windows:

Note: in the steps below the c:\Users\testuser directory would be different on your specific system.

  1. Install git for windows

  2. Install python for windows

    • Ensure that all paths used do not have spaces as this can cause issues with python
    • Modify the PATH system variable for so the python program can be executed from the command prompt
      • sysdm.cpl -> Advanced -> Environment Varialbes -> User Variables
      • %USERPROFILE%\AppData\Local\Programs\Python\Python313 needs to be before %USERPROFILE%\AppData\Local\Microsoft\WindowsApps
  3. Create a file structure similar to this to host the genmon project. Any thing above the testuser folder can change, it just needs to be in folders without spaces. I used this:

    c:\Users\testuser\project. Base folder for project c:\Users\testuser\project\config Folder to hold working copy of config files c:\Users\testuser\project\logs Folder for logs

The genmon source will be in ./project/genmon but git will create that folder in the steps below.

  1. cd in to c:\Users\testuser\project and type

    git clone https://github.com/jgyates/genmon.git

  2. Then cd in to c:\Users\testuser\genmon and type:

    .\OtherApps\win\genmonmaint.bat -i -c c:\Users\testuser\project\config\

This will launch the windows install script. You will be prompted to ask a couple of questions. In most cases you want yes for all questions.

  1. Once the script is complete, edit the file c:\Users\testuser\project\config\genmon.conf

Change the logfilelocation from

loglocation = /var/log/

to

loglocation = c:/Users/testuser/project/logs/

Change the outage log setting from:

# outagelog = /etc/genmon/outage.txt

to

outagelog = c:/Users/testuser/project/config/outage.txt

Change

# kwlog=

to

kwlog=c:\Users\testuser\project\logs\kwlog.txt

NOTE: the path needs to use '/' instead of '' to make python happy

Make any other changes to the genmon.conf file that may be needed, for example the serial or serial over IP settings.

  1. From the genmon folder, type:

    .\OtherApps\win\startgenmon.bat start -c c:\Users\Jason\project\config\

Unhandled Things / Known Issues with Genmon on Windows:

  1. starting genmon on boot. The install script does not modify the Windows system ot start genmon on every boot. You can use the command listed above to do that.
  2. genmon attempts to restart after a software update is applied. The restart does not always work in my testing. You milage may vary.
  3. Windows firewall blocks external access to web site to the genmon web server that show the generator status. You can access it localy or modify the Windows security settings to allow the web interface to be accessible to other computers. Exposing genmon to the internet is not recommended. If you want access outside or your local network then a VPN is recommended.