I’m taking notes on this wiki, once done or some milestones are reached I may create some blog articles from this… or not.
I’m creating my own FLOSS Stream Deck clone. For that I need a device to click on and some program to react to my clicks that
Raspberry Pi 4
Smarti Pi 2
Beehive is an IFTTT clone that is FLOSS, self hostable, easy to use and already implement integration with any social media you may want. The installation is as easy as uncompressing the archive found on github and copying the systemd configuration.
Since your passwords/tokens/apikeys will be stored in the configuration file, you should make sure to only give the read/write permissions to the user beehive run as:
sudo chmod 600 /etc/beehive.conf
sudo chown root:root /etc/beehive.conf # I’m using `root`, but you should create a `beehive` user to run beehive
You can test if the machine running a desktop notification system my using the following command:
notify-send "Test" "It works!"
By default raspbian does not include a desktop notification system. if you install the two following packages and re-test the notify-send
command should be present and a notification will appear.
sudo apt install libnotify-bin notification-daemon
See the ArchWiki for more information, especially how to start the server when needed and choose the notification server that better feet you and your desktop environment.
Write the base address address:port
(192.168.0.42:8182
) you want to listen to. If you want to filter on specific address you should be able to aadd it later.
You need an account on a Mastodon instance. Then go to Preferences
, Development
, New Application
, call it Beehive
(or anything as long as you remember that it is a beehive application).
Once saved, the different key needed by beehive
will be shown.
For the little I tried, letting the options as default is enough. Anyway, you will be able to change the options later.
Create a bot (application then promote it to a bot rank) here: https://discordapp.com/developers/applications/.
Some info you will need, like the channel_id
will only be visible if you active parameters > apparence > developer mode
. Then you will have the needed IDs by right clicking on channel, message or server.
Once your bot setup, go to the bot page and compute the permissions you need:
You then need to visit this URL to register your bot to a discord server: https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot&permissions=PERMISSION_NEEDED_19456. More options are detailed in the documentation.
More detailed infos can be found here: https://www.howtogeek.com/364225/how-to-make-your-own-discord-bot/
If you want to have emojis you have to use special codes depending on if the emoji is standard or custom. Standard emojis should be replaced by there unicode code. Server custom emoji should be replaced by a special string. To find what you should use, enter by hand \:emoji:
in a discord message. More infos here: https://anidiots.guide/coding-guides/using-emojis.
First thing to note is that the syntax to transfert information is precise and not intuitive. For example if you want to use the data
field you will need to write {{.data}}
, note the dot needed. I would love to have a link to the go
docs to understand how to use thiis at its full extent.
Making a notification when a message is received on discord:
From: {{.channel_id}}, user: {{.username}}, message: {{.contents}}
https://golang.org/pkg/text/template/#hdr-Functions
TODO: describe stream-pi
We can use this sites (and stream-deck’s one) to generate icons
https://openmoji.org/
https://game-icons.net