In this update I’d like to talk about battery alerts and how to set it up. Battery alerts are particularly useful if you own multiple cars that you don't often use. All cars have "parasitic current draw" between 50mA to 85mA which eventually empties the battery if the car is not turned on, some cars can last about 30 days or 4 weeks before it needs to be jump started. WiCAN can help you keep an eye on the battery voltage as the battery discharges and send you an alert when the preset value is reached. In this tutorial you’ll create a simple Mqtt sensor and automation in Home Assistant, so when low battery is detected a text to speech notification will be sent to Google Home speaker.
Battery alerts are easy to set up, assuming you have a wifi connection where you park your car and you have a home assistant running on your network. Here’s how to set it up:
1- Install Home Assistant Mosquitto broker add-on
2- Create Home Assistant new user account for WiCAN. These user credentials will be used to set up the mqtt setting for WiCAN.
3- Connect to WiCAN access point WiCAN_xxxxxxxxxxxx, then using a web browser, go to http://192.168.80.1/
4- Enable Sleep mode and Battery Alert.
5- Fill in the Battery Alert configuration. In the Alert URL fill in your Home Assistant ip address and the Mqtt User/password created in step 2.
6- To create a new MQTT sensor, you need to edit “configuration.yaml” file and add the following lines to the file: mqtt: sensor: - name: "Car Battery" state_topic: "CAR1/voltage" unit_of_measurement: "V" value_template: "{{ value_json.battery_voltage }}"
7- Restart Home Assistant, then edit your dashboard to add a new card with “Car Battery” entity.
8- Finally create a new automation by setting the MQTT topic, entity name and battery voltage value.