Tinkering with Tasmota sensors
-
@a-lurker said in Tinkering with Tasmota sensors:
I like the Tasmota stuff but the devices would probably become a management nightmare as time goes on
I still have a sensor stuck at v5, because it's outside near the pool panel and it's a pita to mess with it, and it's working fine. I agree it's more management, but it's doable. I usually update them every now and them, manually, but I saw a couple of programs (this applies to shelly too) to manage them and update firmware centrally.
I still prefer Zwave, but it's too difficult to have reliable sensors for specific cases.
-
@archers said in Tinkering with Tasmota sensors:
It is built from a Wemos Mini D1and some components for in total approx. €10. All soldered together and hot-glued into a 60x60mm encosure.
Great build! As I already said, I'm jealous of your enclosures. Mine are too wacky
-
@therealdb Thanks!
I did some searching before finding good enclosures, I eventually found a few nice ones at Conrad. They have a lot of different enclosures listed, many of them are not that expensive either. I notice that they also have an Italian branch, below I listed what I used on Conrad.it.//ArcherS
-
@a-lurker I am not that good at IR codes to be honest. A number of years ago I played around with a USB UIRT together with my UI5 VeraLite and Girder(?) on a PC. I was able to record some codes that I then could send from the Vera.
I agree that better Tasmota support for Pronto codes probably could be useful since it seems to be a quite popular format and available for a lot of devices. Also the hardware for the device I put together seems both quite capable and reasonable in price. One possible upside with Tasmota is that it does not suffer from the lock-in problems that I have understood that e.g. Broadlink does from time to time when the manufacturers want to keep the users in their cloud.
//ArcherS
-
@archers said in Tinkering with Tasmota sensors:
One possible upside with Tasmota is that it does not suffer from the lock-in problems that I have understood that e.g. Broadlink does from time to time when the manufacturers want to keep the users in their cloud
Yes - it's a problem and your solution is a good Broadlink replacement for IR. Tosmota also has a very capable IR send library, including some excellent Aircon drivers. The library that's being used, can send Pronto as well, so I'm unsure why it's not made available. May be it is but just not documented. It can also do Global Caché. Would be good to ask the question on that forum.
void sendPronto(uint16_t data[], uint16_t len, uint16_t repeat = kNoRepeat); void sendGC(uint16_t buf[], uint16_t len); void sendRaw(const uint16_t buf[], const uint16_t len, const uint16_t hz);
If you post some pronto codes that you know definitely work on your AV device/s (NOT aircons) and you say what they do and what manufacturer and type of device eg TV, DVD, etc than I could have a look supporting Tasmota IR. Assuming you are in position to test the result.
Learned codes are OK but you need to learn every single one of interest, which is a pain. If the codes are generated you can use what's already known.
It's just a matter of identifying the correct code set and using the associated pronto codes. Hope this makes some sense.
-
Some time ago I stumbled on some rather nice looking temperature and humidity sensors from Xiaomi and how to get them to communicate with a Tasmota ESP32 with BLE.
I ordered an ESP32 on Ebay and a three-pack of the sensors from Bangood. The sensors are quite cheap, you can find them for €4-5 in the usual sites.
The sensors are quite small, approx 4.5cm and run on a CR2032 battery. Time will tell how long the batteries will last. With the custom firmware you can change the reporting interval.
I have now been running this for little over two months and it works surprisingly well, bringing the temperature and humidity data into OpenLuup.
In short what you do is the following:
-
Download the beta Tasmota for ESP32, flashing is a bit different from the regular Tasmota but pretty straight forward
-
Enable bluetooth with
setoption115 1
-
The Xiaomi sensors can used both with stock firmware and flashed with a custom firmware that removes the encryption from the transmit of data, I flashed them with a Win10 laptop and it was super easy. You can even roll back the original firmware if you want.
The Xiaomi sensors will then be included by the ESP32 Tasmota device and can be sent to OpenLuup with rules, brought in with Sitesensor or now via MQTT.
-
-
I've been waiting for something like this. Very cool. Thx for the post
-
@buxton yes it opens up new possibilities. On the Tasmota bluetooth webpage some other devices are listed, e.g. a soil humidity meter.
So far it has been quite stable for more than two months.
The Tasmota ESP32 is still beta, I assume it will get better over time.I will also make the ESP32 to report over Mqtt now that OpenLuup has support for it, hopefully that will make the setup even more stable.
-
@archers i didn't want to use a development kit for this, as in my environment they tend to get broken. So went searching and found the Sonoff Dual R3 with an ESP32 chip. Fits nicely in a switch box and runs on mains power. Can't wait to see what kind distance I get as soil sensors are next up after temp sensors.
-
@buxton yes I saw the Sonoff Dual R3, looks like a nice solution for getting an ESP32 into the house. The one downside is that some soldering is needed to get Tasmota onboard. I saw a good clip on this on youtube, should not be too complicated.
The distance for me is quite ok 7-8 meters with some walls inbetween, but it probably varies depending on what walls you have etc.
-
I have now completed two more CO2 meters. I used a similar enclosure as for the IR tranceiver, but this time 80 x 80 mm. I got it from Conrad, but you can get it from e.g. Farnell also. The enclosure is available in black and grey also.
The sensor contains a D1 Mini ESP8266, a MH-Z19B CO2 sensor and a BME280 temp/humidity/air pressure sensor. I have found the BME280 to be pretty good.
The temp reading from the MH-Z19B is however completely off so a separate sensor is required.A tip is to add a switch for the power to the MH-Z19B, this is needed for switching the MH-Z19B off when (re)flashing the ESP.
I think the MH-Z19B requires too much power from the PC USB when flashing.Another tip is that in Tasmota it is possible to adjust the sensor offset with TempOffset and HumOffset.
There are a few options for the MH-Z19B with the Sensor15 command. I have turned off auto calibration.
The plan is to push the data into OpenLuup from the sensors with Mqtt when I get this fully up and running.
-
@therealdb I have not found any really good enclosure for that either.
For my outdoor sensor above I had to DIY a bit, I took the dome from an old PIR sensor I had laying around (similar to this one), drilled a hole in the enclosure and then hot glued the dome and the sensor in place.
It is possible to buy just the domes also e.g. here.
-
@sender I discovered that the ESP does not flash with Tasmotizer when the MH-Z19B is connected. Why I do not know, usually it is no problem to flash ESPs with sensors attached.
I think it could be that the MH-Z19B draws too much power or something.The solution I chose (since I soldered the MH-Z19B to the ESP) was to add a simple on/off switch to the 5V VCC connection. That way when flashing I can put the switch in "off" position and then when done I turn it bach to the "on" position.
When using Dupont cables you can simply disconnect the MH-Z19B instead.
Btw this is normally only an issue when re-flashing, I usually do the initial flash before attaching any sensors.
-
Buxtonreplied to ArcherS on Apr 4, 2021, 5:38 AM last edited by Buxton Apr 4, 2021, 1:41 AM
@archers Very Cool gadget. I soldered to the flash pins, which given the size of the contacts was challenging, but managed to make it work. Now waiting for my BLE sensors to arrive.
Energy Monitoring built into the dual relay!
-
I’m tinkering without any hardware...
...just prototyping an MQTT Tasmota bridge. Does everyone use the default cmnd / stat / tele prefixes?
-
therealdbreplied to akbooer on Apr 4, 2021, 9:32 AM last edited by therealdb Apr 4, 2021, 5:33 AM
@akbooer yes. I usually use both /tele/devicename/sensor, and stat/devicename/status8 to get sensors data. It's useful to get both telemetry message and stats pushed via automations/console/UI. and cmnd/ to send/get commands.
EDIT: and tele/devicename/LWT to handle disconnections as well.