Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ojoanalogo/issuetron-3000
🚨 Trigger a MQTT alert when someone opens an issue in one of your repositories
https://github.com/ojoanalogo/issuetron-3000
actions-iot adafruit-io esp8266 gh-actions iot
Last synced: 3 months ago
JSON representation
🚨 Trigger a MQTT alert when someone opens an issue in one of your repositories
- Host: GitHub
- URL: https://github.com/ojoanalogo/issuetron-3000
- Owner: ojoanalogo
- License: mit
- Created: 2020-08-17T22:49:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T19:22:16.000Z (over 4 years ago)
- Last Synced: 2024-10-14T09:11:08.933Z (3 months ago)
- Topics: actions-iot, adafruit-io, esp8266, gh-actions, iot
- Language: TypeScript
- Homepage:
- Size: 1.53 MB
- Stars: 20
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# issuetron-3000 🚨
🚨 Turn on a light signal on the physical world when an issue is opened on one of your repos
This is my entry for the [dev.to GitHub Actions hackathon](https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn)
## Index
- [issuetron-3000 🚨](#issuetron-3000-)
- [Index](#index)
- [About this](#about-this)
- [How to use](#how-to-use)
- [Requirements](#requirements)
- [Setting up Adafruit IO](#setting-up-adafruit-io)
- [Setting up your IoT device](#setting-up-your-iot-device)
- [Setting up action](#setting-up-action)
- [Trying the action](#trying-the-action)
- [License](#license)## About this
This is a really simple action intended to connect the real world with IoT devices connected to Adafruit IO Cloud.
It allows repo mantainers to keep alerted about new issues on their repos, made for the heros of the Open-Source 💙
🔧 I'm using Adafruit IO cloud for the ease of IoT development and device provisioning, since I know most people would like to configure a device the easy way and not have to go through complicated setups like AWS or Azure IoT.
The Action workflow is listening to an "Issue" event and when it's triggered it gets the issue context (like username and issue title) and sends the content over MQTT protocol to an ESP8266 device which I had lying around, it turns on a red lamp which I got from a auto parts store. 🚨
Action is able to send context about the issue, being those details:
issue title
issue author
repo of originYou can also disable the issue context if you want to save some bytes or you only want to trigger a custom action on your IoT device.
This action leverages repo secrets, since some variables like the device Key and ID are supposed to be secret, you can find more information on the README on how to setup your device.
## How to use
Example workflow file:
```yml
on:
issues:
types: [opened]jobs:
do_iot_thing:
runs-on: ubuntu-latest
name: A job to turn on a light when someone opens an issue
steps:
- name: Send activation to ESP8266 device
uses: 'mxarc/[email protected]'
id: activation
with:
time: '15' # how much time we will keep our light on
blink: true # enable blinking, otherwise just turn on the lamp
io_user: '${{ secrets.IO_USER }}'
io_key: '${{ secrets.IO_KEY }}'
io_feed: 'issuetron'
send_context: true
# Use the output from the `hello` step
- name: Check if we succeeded to turn on the light
run: echo "The result of the action is ${{ steps.activation.outputs.success }}"
```## Requirements
- An Adafruit IO account
- A GitHub user account
- ESP8266 device
- LCD screen
- I2C Adapter for LCD screen (we need it to save space and pins)
- LED of any color
- 220ohm resistor
- Wires
- Internet connection
- 🍌 A banana (we will eat it, they're delicious!)## Setting up Adafruit IO
1. Head over to and create an account (Click Get started for free)
2. Once you create an account, sign in into io.adafruit.com
3. Create a new feed, name it "**issuetron**"
![New feed](screens/newfeed.png)
![New feed2](screens/newfeed2.png)
4. Once you create a new feed, click on "Adafruit IO Key" and save those values (you will need them later!)
![IO Key](screens/iokey.png)
![IO Key2](screens/iokey2.png)## Setting up your IoT device
Now it's time to wire up the components, for the red LGB you could use another source of output, like a buzzer but it's up to you to modify the sketch.
![Wiring](sketch.png)
Follow this sketch to connect your ESP8266 device
The next step is to upload the device code, you can find the code on the esp8266-code folder, I suggest you to use PlataformIO extension to make it easier to upload the code to your board.
You might need to find drivers for your esp8266 board, a quick Google search will get what you need.
Go to the `config.h` file and replace the next values with your actual device info and WiFi settings:
```c
// WiFi Settings
#define WLAN_SSID ""
#define WLAN_PASS ""// Adafruit settings
#define AIO_USERNAME ""
#define AIO_KEY ""
```## Setting up action
Add this [Workflow file](#how-to-use) to your .github workflows folder
I strongly suggest you to use Repo secrets to store the value of IO_KEY and IO_USER
## Trying the action
Once you completed the steps above, just open a new Issue and your device should alert you of a new opened issue :D
## License
[MIT](LICENSE)