All Projects → mrusme → lemon

mrusme / lemon

Licence: MIT license
Lemon – LED Monitor – is a $79.43 opensource alternative to LaMetric that supports GitHub-, IFTTT- and Zapier-webhooks and even integrates with Pushover!

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to lemon

kiwi
Kiwi turns your Pimoroni Keybow into a fully customizable poor-man's Elgato Stream Deck!
Stars: ✭ 40 (-11.11%)
Mutual labels:  pimoroni, raspberry
jetson-monitor
🚨 Jetson is an HTTP monitoring service used to notify by various messaging platforms such as Slack and Telegram
Stars: ✭ 45 (+0%)
Mutual labels:  monitor, notification
Rpi wordclock
Software to create a Raspberry Pi based wordclock
Stars: ✭ 164 (+264.44%)
Mutual labels:  led, raspberry
Fileboy
fileboy,文件变更监听通知工具,使用 Go 编写。Fileboy, File Change Monitoring Notification Tool, written with Go.
Stars: ✭ 345 (+666.67%)
Mutual labels:  monitor, notification
sre.surmon.me
💻 SRE service for Surmon.me blog.
Stars: ✭ 34 (-24.44%)
Mutual labels:  webhooks, github-webhooks
notion-heroku
Heroku hosted application that performs Notion actions (i.e., new task, new note) based on voice requests via IFTTT Webhooks and Google Assistant.
Stars: ✭ 41 (-8.89%)
Mutual labels:  ifttt, ifttt-webhooks
laravel-exception-notify
Laravel 中异常监控报警通知(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)。
Stars: ✭ 52 (+15.56%)
Mutual labels:  monitor, notification
Monitor Table Change With Sqltabledependency
Get SQL Server notification on record table change
Stars: ✭ 459 (+920%)
Mutual labels:  monitor, notification
akeneo-events-api-bundle
The Events API Bundle for Akeneo PIM delivers catalog changes as events to a 3rd party systems.
Stars: ✭ 18 (-60%)
Mutual labels:  webhooks, ifttt-webhooks
WeatherPi TFT
a weather display for a raspberry pi and a TFT display written in python3 and pygame
Stars: ✭ 66 (+46.67%)
Mutual labels:  pimoroni, raspberry
github-release-notifier
Automatize tasks when a specific package got a new release - Github Release Notifier
Stars: ✭ 21 (-53.33%)
Mutual labels:  webhooks, notification
linux-inspect
linux-inspect implements various Linux inspecting utilities.
Stars: ✭ 32 (-28.89%)
Mutual labels:  monitor
ds18b20
Golang get temperature from ds18b20 sensor connected to a Raspberry PI (GPIO w1 pin).
Stars: ✭ 62 (+37.78%)
Mutual labels:  raspberry
panorama
Lightweight system monitor for Linux
Stars: ✭ 31 (-31.11%)
Mutual labels:  monitor
solana-nft-monitor
Monitor Solana NFT projects using Github Actions + flatgithub.com
Stars: ✭ 31 (-31.11%)
Mutual labels:  monitor
GitHubAPI
[UNMAINTAINED] This is a simple Object Oriented wrapper for GitHub API v3, written with PHP7.
Stars: ✭ 36 (-20%)
Mutual labels:  webhooks
raspi-chatrobot
基于树莓派的微信机器人
Stars: ✭ 33 (-26.67%)
Mutual labels:  raspberry
idiots.win
Google Autocomplete Guessing Game
Stars: ✭ 26 (-42.22%)
Mutual labels:  lemon
homebridge-magichome-platform
Homebridge Plugin for MagicHome LED Strips with Preset Scene Automation Support (Cycle Color/Fade/Strobe)
Stars: ✭ 46 (+2.22%)
Mutual labels:  led
hook.io
Open-Source Microservice Hosting Platform
Stars: ✭ 1,259 (+2697.78%)
Mutual labels:  webhooks

Lemon

Lemon – LED Monitor – is a $79.43 opensource alternative to LaMetric that supports GitHub-, IFTTT- and Zapier-webhooks and even integrates with Pushover!

GitHub Commit

More examples here, here, here & here.

Requirements

Installation

On your Raspberry:

$ raspi-config nonint do_spi 0
$ reboot
$ aptitude install python3 python3-pip python3-dev python3-spidev libtiff5-dev libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev tcl8.6-dev tk8.6-dev python-tk
$ pip3 install gunicorn falcon pillow ujson unicornhathd
$ # If you want to enable Pushover integration:
$ pip3 install py-pushover-open-client
$ # If you want to enable InfluxDB integration:
$ pip3 install influxdb
$ cd /opt
$ git clone https://github.com/mrusme/lemon.git
$ ln -s /opt/lemon/init.d/lemon /etc/init.d/lemon
$ update-rc.d lemon defaults

Lemon will now be run automatically every time your Raspberry starts.

Running manually

$ cd lemon/
$ ./lemon.sh

Configuration

Port (on boot)

You can change the port by creating a file named /etc/lemon and adding the following content to it:

export PORT=1337

The init.d-script will look for the file and in case it was found source it.

Port (manually)

PORT=1337 ./lemon.sh

Integrations

GitHub Webhooks

First, make Lemon's port (e.g. 20001) accessible from the internet. You'll probably need to add a NAT rule to your firewall/router or fire up ngrok or something like that. Then, set up hooks on the GitHub repos (https://github.com/mrusme/<REPO>/settings/hooks) or organisations (https://github.com/organizations/<ORG>/settings/hooks) that you'd like to receive notifications for. For the Payload URL, use http://<YOUR-DNS-NAME>:<FORWARDED-PORT>/github. As Content type use application/json. The secret is not necessary (yet). Also, configure the webhook to Send me everything and don't forget to check the Active checkbox. That's it. You should be receiving notifications for at least a handful of implemented GitHub events.

IFTTT

You can create all sort of notifications using IFTTT's Maker Webhooks. Configuration is pretty easy:

Build your IFTTT rule by specifying the If this service and using Webhooks as then that service. Configure the webhook like this:

Webhook

Zapier

Like with IFTTT, you can send webhooks from Zapier to Lemon. Configuration for Zapier is pretty easy as well:

Build your Zapier zap and use Webhooks as an action. Configure the webhook like this:

Webhook POST

Webhook Payload

Pushover

Lemon provides an integration into Pushover using the Open Client API. Therefor, a separate config needs to be created, which will be read from/written to by Lemon. See lemon-pushover.cfg for an example configuration. In order to activate the Pushover plug-in, the environment variable LEMON_PUSHOVER_CONFIG needs to be set to the location of your lemon-pushover.cfg, e.g. LEMON_PUSHOVER_CONFIG=/etc/lemon-pushover.cfg. Make sure that the file is read and writable by the user you run Lemon under! You can set that environment variable within /etc/lemon, just like with PORT (see above).

Lemon will register a new device in your Pushover account (named lemon). This device can be targeted by other Pushover clients and it will of course also receive all un-targeted notifications. Be aware that you'll need a Pushover desktop license in order to use this feature. However, they do provide a 7-day-trial for you to test it.

If don't want to fiddle around with DynDNS, NAT or ngrok in order to make Lemon's HTTP port reachable from GitHub, IFTTT, Zapier and other webhook providers, you can set up Lemon to only use Pushover, which doesn't require you to expose any port. The Pushover client implementation uses a websocket to connect to the Pushover API and retrieve notifications. It basically acts like a web browser, hence you'll be able to use it even within networks you have no/little control over.

Info regarding 2FA (2 Factor Authentication): For Pushover Open Client API integration, Lemon uses jonogreenz/py-pushover-open-client. However, this library did not natively support 2FA, but a PR was set to the author of the library to include a possibility for an initial 2FA authentication. This PR was accepted and is available since v1.3.0 of the library. If you need 2FA make sure you pip3 install the latest version of the library!

InfluxDB

In order to use InfluxDB, simply add the configuration to your /etc/lemon:

export LEMON_INFLUXDB_SERVER=your-influxdb-server.local
export LEMON_INFLUXDB_PORT=8086
export LEMON_INFLUXDB_UDP=1
export LEMON_INFLUXDB_DB=your-database
export LEMON_INFLUXDB_USER=you-user
export LEMON_INFLUXDB_PASS=your-user-password

API

You can also attach any other service by using the generic Lemon API, which is accessible through http://yourdns:20001/api. The body of the requests/webhooks should contain the following JSON:

{ 
  "icon": "icon-name-here",
  "text": "The text to be scrolled through after the icon animation finished"
}

You need to make sure that the icon name you specify actually exists within the icons/ folder and is a .png file. If you want to use the icon icons/docker.png, simply specify "icon": "docker" in the JSON.

By default, each icon animation is being repeated three times. However, you can override that by specifying an additional JSON parameter named icon_repeat, e.g.:

{ 
  "icon": "doom-bloody",
  "icon_repeat": 1,
  "text": "Game over!"
}

Animation cycle time can also be adjusted individually, in order to allow smoother playback of longer animations:

{ 
  "icon": "microsoft",
  "icon_repeat": 1,
  "icon_cycle_time": "0.01",
  "text": "Micro$oft"
}

The default font can be adjusted by specifying the text_font property. In order for this to work, the font needs to be available as .ttf file inside the fonts/ directory. Example:

{ 
  "icon": "psy",
  "text": "Oppa Gangnam Style!",
  "text_font": "Hack-Regular"
}

In order to be able to categorize notifications, in case InfluxDB is being used, a category can be passed via JSON:

{ 
  "icon": "twitter",
  "text": "New tweet!",
  "category": "twitter"
}

Testing

curl -X "POST" "http://raspberrypi:20001/ifttt" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "icon": "youtube",
  "text": "New video on YouTube!"
}'

Kudos to ...

"Let me tell you..."

Sure, tell me!

<script> (function(f, a, t, h, o, m){ a[h]=a[h]||function(){ (a[h].q=a[h].q||[]).push(arguments) }; o=f.createElement('script'), m=f.getElementsByTagName('script')[0]; o.async=1; o.src=t; o.id='fathom-script'; m.parentNode.insertBefore(o,m) })(document, window, 'https://cdn.usefathom.com/tracker.js', 'fathom'); fathom('set', 'siteId', 'CZYGATKR'); fathom('trackPageview'); </script>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].