I let my discord friends control my house. Could've gone worse?
Ever wondered how cool it would be to cause mayhem at your discord friend's house for fun?
Me and @joshuafrankle were working on a discord bot this year. We came up with cringe fest bot that played "Funny Tamil Comedy" soundtracks on command. We've been continuously adding features. It kinda evolved in a way we didn't imagine. Now we use mr.robot for our server management, api-testing, wiki and more.
So, here it goes. I've been working with some micro-controllers lately and I thought why not bring in some IoT to the recipe. #mightregretthisdecision
Although it ended up heating up my micro-controller and almost made my house look possessed, it was still worth a shot.
I used NodeMCU 8266 - the go to micro-controller for any hobby engineers out there. Instead of going with embedded C for my programming my board, I tried MicroPython for a change and trust me - the best decision.
Moreover that gave me an headstart in integrating it with my discord bot which already written in discord.py - a python discord client library. WebREPL modules came in handy to upload the program to my board.
Finally got everything set up and running in less than an hour.
I had a really interesting experience. I was hanging out with my friends and we were trying to think of something fun to do. I had recently set up a home automation system that allowed me to control various devices in my house through a bot on a Discord server. I thought it would be funny to invite my friends to the server and see if they could figure out how to use the bot to control my devices.
So I got my friends to join the server and I gave them access to the bot. There were almost 300 people on the server, so it quickly turned into quite the party. Anyone on the internet could use the bot to toggle my lights and fans on and off.
My friends started getting really into it and began experimenting with different combinations of commands to see what they could do. It was really amusing to see them messing around with my house from afar. They even tried to get the bot to play music, but unfortunately it wasn't set up to do that.
Overall, it was a really fun and unique experience. I'd definitely recommend giving something like this a try if you have a home automation system and a group of friends who are up for a little bit of harmless mischief.
Sadly, mr.robot had to be put down. I took it offline then.
Meanwhile I'm working on more a secure way to for this discord integration. Will post my next update with regard to this security update.
Here's a Bonus - Discord Bot MicroPython WebRepl Starter Boilerplate
Follow & Stay tuned. I will be writing a follow-up tutorial on how we bring IoT and discord bots together.