Рет қаралды 13,436
Here is a template example for home assistant as requested
- platform: template
sensors:
battery_v1:
friendly_name: "Voltage Monitor 1"
unit_of_measurement: 'volts'
value_template: "{{ ((states('sensor.voltagesensor1_analog_a0')|float - 45 ) / 1024 * 3.3 * 5)|round (2) }}"
I couldn't find anything on the market that would monitor a 12v battery and let me integrate it into Home Assistant so I could monitor the state of the car battery when its in the garage. I decided to have a go at making my own using a NodeMCU ESP8266 board that is flashed with Tasmota, an Arduino Voltage sensor and a 12V to 5V DC-DC converter. I also designed a case for it and 3D printed it out. overall it works great.
Components were sourced from Ebay but are readily available on the internet for relatively little money. I think the whole project was done under £20. This can also be done much cheaper if you broke it down into single components and soldered them all together.
I flashed the NODE MCU using Tasmotizer and a USB lead from the PC straight into the unit. It was very straight forward, I used the Sonoff Basic firmware and then configured it to a generic module. There are loads of tutorials on the internet about doing this but if you are stuck with anything please just ask.
Home Assistant configuration is shown later in the video, this assumes you have Home Assistant setup and working on your network, if you dont you should take a look, its brilliant!