Skip to content

ederjc/mpy-ha-motion-radar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Summary

This project uses the example of a radar motion sensor to show how to easily integrate custom sensors to a Home Assistant-based smarthome setup. This repository is part of a Hackster.io post, which can be found here.

Getting Started

Requirements

  • Microcontroller with MicroPython enablement (I use this one).
  • Custom sensor like the Infineon XENSIV™ Radar Shield2Go.
  • MicroPython IDE like Thonny IDE.
  • umqtt.simple MicroPython library on your board -> check the Hackster.io article for instructions.

secrets.py

Before this application code can be executed on your board you need to create a file secrets.py according to the format given in secrets_example.py and fill in your credentials:

ssid = 'your wifi ssid'
password = 'your wifi password'
mqtt_server = 'your mqtt broker ip address'
mqtt_user = 'your mqtt broker user name'
mqtt_password = 'your mqtt broker password'

Make sure to never commit the file with your credentials to any public repository. Upload the file secrets.py onto your MicroPython board and continue with the next step.

Running the Application Code

Now you can run the code main.py on your MicroPython device. If you are satisfied with it's behaviour you can upload main.py to your device to make it run automatically after powering up.

About

A MicroPython application integrating the Infineon BGT60LTR11AiP radar motion sensor to Home Assistant using the MQTT autodiscovery feature.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages