Setup your Home Assistant


  • Home Assistant is a great open source home automation hub. If you do not have a Home Assistant hub setup yet, there are easy to follow instructions on their site. 


  • The setup that we are testing with and have setup is with a Raspberry Pi running Hass.io version of Home Assistant.






Add the Automation to Home Assistant for the WiFi Doorbell Sensor


  • Click on Configuration in the left navigation bar. Click the + in the lower right to add a new automation.



  • Add a Trigger for your automation. For the trigger type, select MQTT. The topic that you enter must match the topic that is used in the WiFi Doorbell Sensor configuration portal. The default is doorbellsensor/status.



  • Add an Action. In this example, we are calling the notify.ios service and attaching our foscam camera feed to the message. You can call other services like blinking a smart bulb when someone pushes your doorbell. When you are finished click on the save button in the lower right.




Add a Home Assistant sensor to track battery level


  • Add a sensor in Home Assistant to keep track or the battery voltage level from the WiFi Doorbell Sensor. Edit your configuration.yaml file and add this text.


sensor:
  - platform: mqtt
    state_topic: "doorbellsensor/status/battery"
    value_template: '{{value_json.batt}}'
    unit_of_measurement: "Volts"
    name: "Doorbell Sensor"



Test your automation