DEV Community

Cover image for I let my discord friends control my house. Could've gone worse??
Fabian Ferno
Fabian Ferno

Posted on

I let my discord friends control my house. Could've gone worse??

Hello World!

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.


Alt Text

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.

Alt Text

I got my friends to turn on fans and switch off some lights. So here's the fun - the bot had access to a discord server with almost 300 members. Quite the party. Anybody on the internet could toggle my devices. My friends started playing with my house.

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. The next post will have step by step tut for you to create your own IOT discord Integration. Feel free to suggest your thoughts.

Top comments (5)

Collapse
 
veronid20 profile image
veroni-d20

Woah!! MicroPython, IoT and discord.py, what a combo. Great work. Keep going!! Waiting for your updates...

Collapse
 
fabianferno profile image
Fabian Ferno • Edited

Thanks @veronid20

Collapse
 
joshuafrankle profile image
Joshua Frankle

Wow, This is great stuff! Integrating discord.py with Emerging super cool technology like MicroPython, that's really great!! Rocking on the first post, Keep going

Collapse
 
fabianferno profile image
Fabian Ferno • Edited

Thanks yo!

Collapse
 
senkottuvelan profile image
Senkottuvelan

Awesome buddy. Looking for more from you! Keep up the good work! ๐Ÿ”ฅ