GithubHelp home page GithubHelp logo

jimbobbennett / busylight Goto Github PK

View Code? Open in Web Editor NEW
71.0 7.0 11.0 3.17 MB

An IoT Busy light for folks working from home ๐Ÿšจ

License: MIT License

Python 72.19% Shell 27.81%
python iot iot-central azure raspberry-pi

busylight's Introduction

Let your family know you are in meetings with an IoT Busy light

License: MIT Twitter: jimbobbennett

Like a lot of folks at the moment, I'm working for home and my child is off school.

For those reading this in the future and wondering why, I am currently living in the time of the COVID-19 pandemic and worldwide toilet paper shortages.

One of the upsides of working from home, especially when my 7 year old is off school is that I am available most of the time for the occasional quick cuddle, to laugh at something silly she'd just done or help her with something. One of the downsides is that at any time she could walk in to my office whilst I'm on a call.

Image from BBC news of a child walking in to an office during an on-air interview

What I need is a on-air style light, to let her know when I'm in meetings and when I'm not. Luckily I'm an IoT nut so I not only have the skills to build such a thing, but I have all the parts just lying around begging me to use them! So I built one!

The busy light changing from green to red to off at the press of a button

What I needed it to do

This light needs to live outside my office so my family can see it before they come in, but I don't want to have to get up and walk out the door to turn it on or off. I want to have it controlled automatically by my calendar, so it shows red when I have a meeting and green when I'm free.

This leads to the problem of connectivity - how can my calendar control my light remotely. For that the answer was obvious - a mixture of Azure IoT Central, the glorious IoT SaaS platform from Microsoft, and Azure Logic Apps, a no-code tool for building apps. Both have such a low barrier to entry I knew I'd be able to get something up and running quickly.

Steps

To set this up yourself, you need to set up some hardware, configure Azure IoT Central, program your Pi to talk to Azure IoT Central, then connect it to logic apps to control it via your calendar.

  1. Set up the hardware
  2. Configure Azure IoT Central
  3. Install the software on the Pi
  4. Connect an Azure Logic app to control the lights

Learn more

If you want to learn more about Azure IoT and AI services, the best place to start is Microsoft Learn - our free on-line, self guided hands on learning experience.

busylight's People

Contributors

asajohnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

busylight's Issues

Errors & not connecting

The script doesn't autorun on reboot. In my root's crontab, I see:

@reboot /usr/bin/python3 /home/pi/BusyLight/app.py

But for some reason, it doesn't connect to Azure IoT.

python3 --version

Python 3.7.3

sudo python3 app.py

Traceback (most recent call last):
File "app.py", line 112, in
asyncio.run(main())
AttributeError: module 'asyncio' has no attribute 'run'

sudo python3.7 app.py

Allows the Pi to connect to Azure IoT

Not sure what the issue is.

Blinkt won't light

Hello. Thank you for creating this repo and for the time it took to set up. I completed the step to get the code installed on my Raspberry Pi 3B but my Blinkt is not lighting up when I send it an update color command. I will attach some screen shots to this issue of my Azure setup. The task manager in Raspberry Pi OS shows the BusyLight/app.py running. Outside of a bad piece of Blinkt hardware can you think of any reason why this won't light? Any help is appreciated. Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.