Compare commits

...

4 Commits
v1.0.0 ... main

Author SHA1 Message Date
84e3b492cc
Add soft white color 2024-02-25 10:38:31 -05:00
1747b270cb
Add new color 2023-11-01 18:11:18 -04:00
3053b8650a
Update readme 2023-07-08 08:30:14 -04:00
ab5c6d6afa
Add authentication to ntfy 2023-07-03 12:23:15 -04:00
6 changed files with 27 additions and 3 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Mike Cifelli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,6 +1,6 @@
# chutney # chutney
A Raspberry Pi project for displaying the time, temperature and garage door status. A Unicorn Hat HD is used for a simple display. A Raspberry Pi project for displaying the time, temperature and garage door status. A Unicorn HAT HD is used for a simple display.
## Dependencies ## Dependencies
``` ```

View File

@ -9,3 +9,4 @@ lon=lon
uri=uri uri=uri
ntfy=ntfy.sh ntfy=ntfy.sh
topic=topic topic=topic
auth=auth

View File

@ -7,3 +7,5 @@ PINK = [255, 0, 64 ]
GREEN = [0, 255, 0 ] GREEN = [0, 255, 0 ]
BLUE = [0, 64, 128] BLUE = [0, 64, 128]
DARK_ORANGE = [255, 48, 0 ]
SOFT_WHITE = [240, 220, 210]

View File

@ -1,3 +1,2 @@
class HaltException(Exception): class HaltException(Exception):
pass pass

View File

@ -11,8 +11,9 @@ class GarageListener:
ntfy = config['garage'].get('ntfy') ntfy = config['garage'].get('ntfy')
topic = config['garage'].get('topic') topic = config['garage'].get('topic')
auth = config['garage'].get('auth')
self.ntfyUri = f'https://{ntfy}/{topic}/json' self.ntfyUri = f'https://{ntfy}/{topic}/json?auth={auth}'
def listenForNotifications(self, queue): def listenForNotifications(self, queue):
with requests.get(self.ntfyUri, stream=True, timeout=60) as response: with requests.get(self.ntfyUri, stream=True, timeout=60) as response: