Building a 12v Car Battery monitor for Home Assistant with MQTT, NodeMCU, Tasmota, ESP8266, Arduino

  Рет қаралды 14,026

Mr 12v

Mr 12v

Күн бұрын

Пікірлер: 32
@TheTox1cant
@TheTox1cant 2 жыл бұрын
anybody ending up here and looking at the posted template above here is some modified code to work with current HA as of 10/18/22 for both legacy code and modern. This code is using an ESP32C3 so you may or may not have to add back the 5v conversion Modern template: - sensor: - name: "Battery Monitor" unit_of_measurement: "VDC" state: > {{ ((states('sensor.voltage_monitor_1_analog_a1')|float(0) - 45 ) / 918 * 3.3)|round (2) }} Legacy sensor: platform: template sensors: battery: friendly_name: 'Voltage Monitor 1' unit_of_measurement: 'VDC' value_template: "{{ ((states('sensor.tasmota_analog_a1')|float(0) - 45 ) / 918 * 3.3)|round (2) }}
@thedmr8886
@thedmr8886 2 жыл бұрын
Amazing - thank you for sharing this! I have almost all of the parts here already - just need the voltage sensor!
@timmulhall2121
@timmulhall2121 3 жыл бұрын
Works a treat, great idea. Thank you!
@nuukemm
@nuukemm 2 жыл бұрын
This is great, thank you! Could you share a link to your Tinkercad box design?
@matisok
@matisok Жыл бұрын
Hi there. Excellent tutorial. Building this myself now for my houseboat, though with node-red instead of Home Assistant. I am curious: why did you change to ESP Home? (as I read on the home assistant forum).
@Mr12v
@Mr12v Жыл бұрын
It was really only because I had moved most of my other stuff over to esphome, it doesn't really add any functionality as such but I could tie in the deep sleep to my system better!
@bruceshowalter6046
@bruceshowalter6046 3 жыл бұрын
Future TODO use a digital out to turn on/off a trickle charger to compensate for monitor parasitic discharge.
@Mr12v
@Mr12v 3 жыл бұрын
I use it through home assistant to turn the chargers on and off whe the battery drains. I have since moved to esphome and sleep the monitor as much as I can to save on the discharge factor!
@reg2590
@reg2590 3 жыл бұрын
Thanks for documenting this. My hybrid car's 12v battery has been flat a few times due to little use during lockdown such that it could not power the electrics for the car to start using the big drive battery. A Wi-Fi battery status sensor is a good solution either as an ESP8266 acting as a web server one can log into or as you suggest an ESP8266 sending MQTT messages to Home assistant or in my case NodeRed. I would like to keep the battery drain to a minimum so I intend to use tasmota's DeepSleep mode. My question is simple - Did you investigate the Tasmota DeepSleep command and if so was it successful?
@Mr12v
@Mr12v 3 жыл бұрын
Hi, I've converted one of then to use deep sleep through esphome although its the same thing. It works really well to be honest and keeps the last reported value in home assistant so you don't lose the value. I'm sure it could be done with tasmots just as easy yes!
@colincoleman7358
@colincoleman7358 3 жыл бұрын
Could you use the circuit board part of a mobile phone charger to provide the 5 Volt supply rail?. I ask this because I have several of these module that are no longer used, They all have different plugs on the end for when each phone had an alternate style power socket
@grommet20002000
@grommet20002000 3 жыл бұрын
Can you post the template as its not possible to see clearly in the video and im getting syntax errors
@Mr12v
@Mr12v 3 жыл бұрын
Hi, Which template do you need?
@grommet20002000
@grommet20002000 3 жыл бұрын
The template sensor at 7:40 thanks
@Mr12v
@Mr12v 3 жыл бұрын
@@grommet20002000 here is the one I have setup in home assistant in the configuration.yaml - 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) }}"
@grommet20002000
@grommet20002000 3 жыл бұрын
@@Mr12v Thanks for your video and help, i now have this in my template.yaml - sensor: - name: "Solar battery" unit_of_measurement: "Volts" state: "{{ (((states('sensor.green_house_analog_a0') | float -22) / 1024 * 3.3) * 5) | round(2) }}"
@sygad1
@sygad1 3 жыл бұрын
@@Mr12v I just pasted this directly into my configuration.yaml and it's giving me errors "end of stream" is there meant to be something before -platform: template? - thanks
@manfredschuhmacher5260
@manfredschuhmacher5260 2 жыл бұрын
great, thank you
@CodeWithCal
@CodeWithCal 3 жыл бұрын
How accurate do you find your readings? I have a similar setup stepping rough a 12v supply to 3.3v using the same 5:1 ratio voltage divider. Results are ball park how ever I would like to get it more precise.
@Mr12v
@Mr12v 3 жыл бұрын
Hi. I just used a volt meter to check the values and then changed the calibration values to give me the most accurate voltage to actual. I calibrated at about 12.5v which is somewhere at the mid point. They seem accurate enough!
@Edmorbus
@Edmorbus 2 жыл бұрын
Could you share a link to your Tinkercad box design?
@Mr12v
@Mr12v Жыл бұрын
I'll try and get it uploaded yes!
@Edmorbus
@Edmorbus Жыл бұрын
@@Mr12v thanks
@christophsuess7646
@christophsuess7646 2 жыл бұрын
Thank you very much for the good video. Please share the tinkercad-File or (better) the stl-file with us. Please.
@ljadf
@ljadf 3 жыл бұрын
Looks "real good" "up in here" y'all.. Was this designed for an American audience by any chance? :) On a more serious note, it'd also be "real good" if you could post the code you used for the template, as I'm also not able to see it clearly. Great work though, the closest I could get was a bluetooth module, which doesn't work with Homeassistant.
@Mr12v
@Mr12v 3 жыл бұрын
Hi, do you need the code i used in the home assistant?
@MrDallaskincaid
@MrDallaskincaid 3 жыл бұрын
@@Mr12v yes
@ljadf
@ljadf 3 жыл бұрын
@@Mr12v I did manage to find some code online which I modified to below, I found that by tweaking the '3.139' figure up or down, it tuned it to within 2dp of the measured figures: {{ ((states('sensor.mysensorname')|float -10) /1024 * 3.139 * 5) | round (2) }}
@Mr12v
@Mr12v 3 жыл бұрын
@@ljadf you have it there :) This is my Home Assistant sensor using the template. - 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) }}"
@brucerawiri7170
@brucerawiri7170 3 жыл бұрын
Hi there. Where can i find the tasmota Bin file for this project
@Mr12v
@Mr12v 3 жыл бұрын
It just uses the standard tasmota bin for the esp8266 :)
@marcuslibby6918
@marcuslibby6918 Жыл бұрын
im getting this error - Platform error tts.template - No module named 'homeassistant.components.template.tts', does anyone know why
Every Apartment needs this Upgrade! (WhatsApp/Telegram Notifications)
10:05
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 57 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 116 МЛН
This tiny computer changes EVERYTHING
15:57
Jeff Geerling
Рет қаралды 725 М.
Monitor a Car Battery Remotely using ESP8266
6:35
MrDIY
Рет қаралды 40 М.
DIY ESPHome Multisensor - Temp, Humidity, RGB LED, Motion and LUX
27:16