I’m making a battery powered temp sensor with a Huzzah and a battery with tasmota,
I’ve used these a lot and already have the temp readings from the dht11 on the huzzah, I’m trying to get the battery % read?
.things
Thing mqtt:topic:snugtemp "Snug Temp" (mqtt:broker:mosquitto) @ "MQTT" {
Channels:
Type number : temperature "Temperature" [stateTopic="tele/snugtemp/SENSOR", transformationPattern="JSONPATH:$.DHT11.Temperature"]
Type number : battery "Battery" [stateTopic="tele/snugtemp/battery", transformationPattern="JSONPATH:$.battery"]
}
.items
Number snug_temp_batt "Snug temp battery [%d %%]" { channel="mqtt:topic:mosquitto:snugtemp:battery" }
Well, if Tasmota isn’t giving you battery data, and you want battery data, something has to change on the Tasmota side so it gives battery data!
No idea if it’s possible though.
Beware that WiFi devices in general are quite power hungry, so you may find yourself changing batteries often. If you want to keep to batteries, I’d suggest have a look at the MySensors project. I’m using one with a DHT22 at the moment.
Warning: I’ve yet to try it. I’ve build my own d1 mini based temperature sensor and my own arduino “firmware” and I sooo want to move to Tasmota on them. I’ve been using Tasmota on my Sonoff devices for a very long time and I would like to standardize on it.
They are running on AA size rechargeable batteries. I believe they are 14500 batteries. I’ve programmed them to turn on every 20 minutes, report temperature and humidity, and then go back into deep sleep. They live around 1 - 1 1/2 months on a charge. I’ve actually programmed a “Low Battery” event into the device. Presently, I also calculate “charge level” based on the VCC they report back.
Personally, I’d loved to move them all over to Tasmota, but I’ve been holding out on building my own version of it I also have a number of Sonoff’s running an old (non-updatable) version on Tasmota. I’m in the process of testing what impact updating these will have on my OH/MQTT setup…
I’ve read somewhere that the 8266 CPU actually runs off of 3.3v and there’s a converter between the 5v input and the CPU and it’s circuitry. I remember that the wemos run on betwen 3.3v and 6.something…
I know this is a little bit of an older topic. Just curious if you had somewhere that you posted the code or options you used for the battery powered tasmota device. A buddy and I are looking to build some tasmota humidity/temp sensors with d1 minis and tasmota but the battery usage is for sure an issue. We were hoping to have them sleep most of the time and wake up roughly every 5 minutes to do readings.
1 or 2 18650s or similar batteries was our battery of choice but don’t want to have to swap them constantly.
Thanks!