Range-Announcer


NameRange-Announcer JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/CrazyVikingProductions/range_announcer
SummaryAnnounce range closure as sunset approaches
upload_time2023-05-14 06:24:07
maintainer
docs_urlNone
authorMichael J. Swenson
requires_python
license
keywords sunset closure announce
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Announce that the range is closing.

** The application is designed to run on Raspberry Pi 3B or newer. **

Between Midnight and Noon the application synchronizes the time on the Raspberry Pi with an atomic time server.
It calculates the sunset for the day given the date from the OS and the longetude and latitude values provided in the ini file.
It calculates the amount of time between now and one hour, one minute before sunset then goes to sleep for that long an interval.


## Features

* Calculates the sunset for the current date and location.
* Uses a Shelly 1PM switch to turn the power on and off for an external amplifier.
* Plays recorded messages announcing impending range closure at:
  * 1 hour before sunset
  * 30 minutes before sunset
  * 15 minutes before sunset
  * 5 minutes before sunset
  * at sunset
* Can be started at any time and it will play the required messages.
* Loops indefinitely...start it once and let it run.
    * Note: The application spends almost all of the time performing a sleep operation so it is not using CPU or resources. 
* Logs information to Range_Announcer_Log.txt


## Requirements:

The application is intended to be run on Raspberry Pi 3B or newer with a wireless network interface and sound output jack.

The program requires inputs for:
1.  The longitude and latitude of the location.
2.  The IP address for the Shelly 1PM switch.
3.  The URLs to turn the Shelly switch on and off.
4.  A delay time to account for the delay between when the amp is powered on and when it is functioning.

These inputs are stored in the file rangeannouncer.json

## Installation
To install the application run the command:<br>
sudo pip install --upgrade range_announcer<br>
This will install the application launcher:  /usr/local/bin/RangeAnnouncer

## Usage

The application is intended to be run unattended on a Raspberry Pi and start automatically.<br>
To do that perform the following steps:
1. Open a terminal and type:  sudo nano /etc/rc.local
2. Add the following command before the '<b>exit 0</b>':<br>  sudo /usr/local/bin/RangeAnnouncer &<br>The trailing <b>&</b> must be in place to fork a new process...this program doesn't normally end.
3. In nano type Ctrl-x, then Y to save and exit.

This program will create a log in /srv/RangeAnnouncer logging informational, debug and error messages.

## Notes
On Raspberry Pi I had to edit /etc/pulse/daemon.conf to set<p>
 <b>alternate-sample-rate=48000<br>
 default-fragments=5<br>
 default-fragment-size-msec=12<br></b>

## History

Range Announcer is the first python application written and released by Michael J. Swenson.  Built using PyCharm 2022.3.1 Community edition.


## License

Range Announcer is licensed under the BSD-3-Clause license (see `LICENSE`).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/CrazyVikingProductions/range_announcer",
    "name": "Range-Announcer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "sunset closure announce",
    "author": "Michael J. Swenson",
    "author_email": "mikswenson@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/95/50/6afe817dc52b0db39d4fef1f281c1c1e49880333a62b40ea77a2e16112f8/Range_Announcer-1.3.1.tar.gz",
    "platform": null,
    "description": "# Announce that the range is closing.\r\n\r\n** The application is designed to run on Raspberry Pi 3B or newer. **\r\n\r\nBetween Midnight and Noon the application synchronizes the time on the Raspberry Pi with an atomic time server.\r\nIt calculates the sunset for the day given the date from the OS and the longetude and latitude values provided in the ini file.\r\nIt calculates the amount of time between now and one hour, one minute before sunset then goes to sleep for that long an interval.\r\n\r\n\r\n## Features\r\n\r\n* Calculates the sunset for the current date and location.\r\n* Uses a Shelly 1PM switch to turn the power on and off for an external amplifier.\r\n* Plays recorded messages announcing impending range closure at:\r\n  * 1 hour before sunset\r\n  * 30 minutes before sunset\r\n  * 15 minutes before sunset\r\n  * 5 minutes before sunset\r\n  * at sunset\r\n* Can be started at any time and it will play the required messages.\r\n* Loops indefinitely...start it once and let it run.\r\n    * Note: The application spends almost all of the time performing a sleep operation so it is not using CPU or resources. \r\n* Logs information to Range_Announcer_Log.txt\r\n\r\n\r\n## Requirements:\r\n\r\nThe application is intended to be run on Raspberry Pi 3B or newer with a wireless network interface and sound output jack.\r\n\r\nThe program requires inputs for:\r\n1.  The longitude and latitude of the location.\r\n2.  The IP address for the Shelly 1PM switch.\r\n3.  The URLs to turn the Shelly switch on and off.\r\n4.  A delay time to account for the delay between when the amp is powered on and when it is functioning.\r\n\r\nThese inputs are stored in the file rangeannouncer.json\r\n\r\n## Installation\r\nTo install the application run the command:<br>\r\nsudo pip install --upgrade range_announcer<br>\r\nThis will install the application launcher:  /usr/local/bin/RangeAnnouncer\r\n\r\n## Usage\r\n\r\nThe application is intended to be run unattended on a Raspberry Pi and start automatically.<br>\r\nTo do that perform the following steps:\r\n1. Open a terminal and type:  sudo nano /etc/rc.local\r\n2. Add the following command before the '<b>exit 0</b>':<br>  sudo /usr/local/bin/RangeAnnouncer &<br>The trailing <b>&</b> must be in place to fork a new process...this program doesn't normally end.\r\n3. In nano type Ctrl-x, then Y to save and exit.\r\n\r\nThis program will create a log in /srv/RangeAnnouncer logging informational, debug and error messages.\r\n\r\n## Notes\r\nOn Raspberry Pi I had to edit /etc/pulse/daemon.conf to set<p>\r\n <b>alternate-sample-rate=48000<br>\r\n default-fragments=5<br>\r\n default-fragment-size-msec=12<br></b>\r\n\r\n## History\r\n\r\nRange Announcer is the first python application written and released by Michael J. Swenson.  Built using PyCharm 2022.3.1 Community edition.\r\n\r\n\r\n## License\r\n\r\nRange Announcer is licensed under the BSD-3-Clause license (see `LICENSE`).\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Announce range closure as sunset approaches",
    "version": "1.3.1",
    "project_urls": {
        "Bug Reports": "https://github.com/CrazyVikingProductions/range_announcer/issues",
        "Homepage": "https://github.com/CrazyVikingProductions/range_announcer",
        "Source": "https://github.com/CrazyVikingProductions/range_announcer"
    },
    "split_keywords": [
        "sunset",
        "closure",
        "announce"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6b0ba0fe8057bdd36d35bd8f0448c03c6bf80f5f930886051bc57224751c3b2",
                "md5": "433217d3b7b711c15bc4408276c7588c",
                "sha256": "cf9c111d8b80eed634ef11e18f2d2765b927d1a58fd729a8f1bef262d2f3bb77"
            },
            "downloads": -1,
            "filename": "Range_Announcer-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "433217d3b7b711c15bc4408276c7588c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9313326,
            "upload_time": "2023-05-14T06:23:38",
            "upload_time_iso_8601": "2023-05-14T06:23:38.722911Z",
            "url": "https://files.pythonhosted.org/packages/a6/b0/ba0fe8057bdd36d35bd8f0448c03c6bf80f5f930886051bc57224751c3b2/Range_Announcer-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95506afe817dc52b0db39d4fef1f281c1c1e49880333a62b40ea77a2e16112f8",
                "md5": "0a6b065323bcd8dfddfa5ecbbe91c130",
                "sha256": "7a2e86412e9ccc35b528988a1b4fceb196011f2a7094e00bbcf596dc700d347c"
            },
            "downloads": -1,
            "filename": "Range_Announcer-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0a6b065323bcd8dfddfa5ecbbe91c130",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9313854,
            "upload_time": "2023-05-14T06:24:07",
            "upload_time_iso_8601": "2023-05-14T06:24:07.422331Z",
            "url": "https://files.pythonhosted.org/packages/95/50/6afe817dc52b0db39d4fef1f281c1c1e49880333a62b40ea77a2e16112f8/Range_Announcer-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-14 06:24:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CrazyVikingProductions",
    "github_project": "range_announcer",
    "github_not_found": true,
    "lcname": "range-announcer"
}
        
Elapsed time: 0.08622s