Materials

We will use Viber’s Python bot API as means of communication to the platform.

Putting it all together

We will connect the microcontroller and the motion sensor by 3 wires: 5V, GND, PIR-OUT -> NodeMCU PIN 2.

See the microcontroller code below:

Result

Finally, we should have our motion detector up and working. It will look something like this:

Possible next steps?

We might consider utilizing the sun as a power source for a more sustainable energy source. We are also aware of the potential to enhance this bot’s capabilities, as it has the ability to manage individual rooms, in addition to the entire home. The bot can also monitor the environment that it supervises - providing data about outside temperature, light and power.

Your project

If you have an interesting project you’d like to share with the Viber developer community, please fill out this form.