Git Product home page Git Product logo

hfdl_band_switch's Introduction

hfdl_band_Switch

A script for switching the bands your HFDL set up monitors at certain times of day. Useful if you have a limited number of SDRs and/or do not wish to monitor all the bands all the time.

Assumes that you have set up your HFDL to use services and timers to start / stop / monitor dumpHFDL, and that all services are working as you want. If you followed this guide then you should be well away.

Clone the repo and make the script excutable:

git clone https://github.com/rikgale/hfdl_band_Switch.git
cd hfdl_band_Switch
sudo chmod +x bandSwitch.sh
cd

Set up script parameters manually. Requires a start and end time for the day period, a start and end time for the night period, the name of the service to run during the day, the name of the service to run during the night and optionally, which bands those services cover.

#Display script switches and descriptions
/home/pi/hfdl_band_Switch/bandSwitch.sh -h

example:

/home/pi/hfdl_band_Switch/bandSwitch.sh -startdaytime 07:30 -enddaytime 22:30 -startnighttime 22:31 -endnighttime 07:29 -serviceday dumphfdl5 -servicenight dumphfdl4 -bandday "Band 17" -bandnight "Band 5-6"

dumphfdl4 and dumphfdl5 are set up to use the same SDR, so only one can be used at any given time. The above example switches between them at different times of the day. enddaytime should be no later than 23:58 (still working out the logic to get it to work properly).

Running the script should place bandSwitch.log in your home drive.

Once you have it working, add script to sudo crontab. Must be sudo crontab as this script works with services.

sudo crontab -e

Set it to run at least a couple of times/hour incase the computer restarts for any reason, then it should notice and select the correct dumphfdl to run given the time of day.

1-59/5 * * * * /home/pi/hfdl_band_Switch/bandSwitch.sh -startdaytime 08:30 -enddaytime 22:30 -startnighttime 22:31 -endnighttime 08:29 -serviceday dumphfdl5 -servicenight dumphfdl4 -bandday "Band 17" -bandnight "Band 2-4"
2-59/5 * * * * /home/pi/hfdl_band_Switch/bandSwitch.sh -startdaytime 09:30 -enddaytime 23:30 -startnighttime 23:31 -endnighttime 09:29 -serviceday dumphfdl3 -servicenight dumphfdl6 -bandday "Band 21" -bandnight "Band 5-6"

The above sudo crontab -e entries switch between band 17 and 21 during the day to band 2-4 and 5-6 over night. 17 & 2-4 share the same SDR, 21 & 5-6 also share an SDR. The lower bands are more likely to be active overnight and bands 17 and 21 are very active during the day.

hfdl_band_switch's People

Contributors

rikgale avatar

Watchers

 avatar

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.