-
Quite a number of years ago I set up a few Arduino sensors that reported temperature to my VeraLite running UI5. I did this with MySensors, a quite nice community based platform.
I discontinued this mostly because that the combination of a rather flaky Vera and that the Vera when rebooting lost the USB connected gateway.Some time ago I started to look at this again, but this time using ESP8266’s and Tasmota. I think the credit for this partially is the plugin for Shelly and Tasmota that @therealdb has written, even though I have still to use the plugin. The other reason for reentering into this area is that my electrical supplier is replacing the electrical meters for a new smart meter. Today I use a blink meter from Effergy, but the new meter will have a port for reading out data. This also led me to Tasmota, there seems to be a functioning solution for this.
I must say that Tasmota is brilliant! Support for all kind of devices and sensors and super easy to use, also for multi-sensors, OTA update, good documentation etc. You can get parts on ebay etc quite cheap. It has also so far been very stable. You can also very easily adjust the sensors readout, e.g. TempOffset -1.5 gives an offset of -1.5 degrees.
I have put together sensors for temperature and humidity for use in the garage, the outhouse, on the attic etc. I have tested DHT22, DS1820B, BME280 and BH1750 so far and they all work without issues. The latter two I installed in an outdoor enclosure to use as a simple weather station reporting temperature, humidity, air pressure and light level.
I also got a MH-Z19B CO2 meter for testing to monitor the indoor CO2 levels. The initial feeling is that it does what it should.
In general I have pretty good wifi coverage with a few Unifi access points. One of the sensors is in a building some 25 meters from the house where the wifi is not that strong, but the NodeMCU has no problem with this. Quite impressive and a good addition to Z-wave for that kind of location.
Not owning a 3D printer I have had to resort to purchased enclosures and the old Dremel. 😊
For the CO2 sensor I put it in an old smoke detector enclosure for now.
I am sure that there are a lot of talent here that can do much better with a 3D printer!
CO2meter1.jpgYou can get the data from the Tasmota devices into OpenLuup in a number of ways. The obvious way is via MQTT. I have still to set this up at some point in time. The second way is to use the excellent SiteSensor plugin. I tested this but had some problems with reporting stopping after a few days for some reason. I probably got something wrong in the setup. The third option, that I currently use is via adding rules to each sensor. You can quite easily add rules for reporting data to a virtual sensor in OpenLuup, e.g:
Rule1 ON tele-AM2301#Temperature DO Var1 %value% ENDON ON tele-AM2301#Temperature DO WebSend [IP_adress:3480]/data_request?id=lu_action&DeviceNum=65&id=variableset&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=%Var1% ENDON
With TelePeriod you can change the polling interval as required.
This method I think could be super useful for reporting back e.g. switch status from a Tasmota node much like I understand Shelly can do.
Some resources and notes I made on the way:
Using Tazmotizer to flash the ESP’s is very easy
List of supported sensors including how to connect, commands etc
A good pinout reference for ESP8266 variants
Tasmota rules documentation
Most sensors are either “Generic (0)” or “Generic (18)”, check for each sensor type what to use
For I2C sensors e.g. BME280 one must use tasmota-sensors.bin
For the MH-Z19B I had to flash the ESP before attaching the sensor, this could be a good practice always
Use the following url for the query in SiteSensor:
http://IP_address/cm?cmnd=Status%2010This became a rather long post but hopefully it can be of some use.
//ArcherS -
Shelly i3 is an unbelievably cheap (9,99 EUR/USD) WiFi device that’s part of the fantastic Shelly family. It supports REST API, MQTT and much more.
mundzhos Shelly i3 | Shelly Cloud Shelly i3 | Shelly Cloud 10It’s just L,N and 3 inputs. No relays, so it’s a scene controller with bonus point to the fact that you can use your own buttons and keep the aesthetics of your house. Bonus points for WAF. It’s very small, so it will fit in your standard wall box easily.
While I built my own Scene Controller Virtual Device and I’m using MQTT for other devices of the family, Shelly can call your HTTP endpoints on button presses and in this case is more than enough.
The buttons support different actions (press, long press, double/triple press) and you can just call a service endpoint, or update a variable:
f3e509c0-f2a7-4f40-a099-af765e87c9fe-image.pngGo get it if you need a very cheap, very reliable scene controller for your home.
-
-
-
Hey guys...
Is it just me or the GE/Jasco switch or very sensible to power outage ?
Almost each time we have a power outage, I need to replace at least 1 switch to replace.
Each time, same behaviour, the blue led is flashing rapidely and nothing works.
Last power outage, I got 3 switches. 95% of our switch and dimmer are GE/Jasco.
-
So, I bought a new Christmas Tree led set from Twinkly (https://www.twinkly.com/).
The security of this thing is questionable, so first thing first I placed it in the blocked IoT Vlan.
The lights will just work (the 3d mapping of your tree is very cool, so effects are really mapped to the way you've set the lights), but, you know, I wanted to control them locally 😄 and I built a plug-in for it. Not sure I'll release it unless someone else is interested.
Twinkly pre lit Christmas Tree 600 count light purchased at Home DepotThey're not cheap and I know I could have accomplished the same with WS2812 leds, but it's worth mentioning if you want a quick and easy way to have effects on your Christmas tree.
Next year I'll definitely start my permanent led installation outside.
-
Since I know there are fans of Shelly's products (hi @akbooer), I'll post it here too:
Shelly Shop Europe Shelly Shop Europe
Up to 45% discount, and 2/4 packs discounted as well.
-
-
-
-
So, I'm at the 4th Z-wave devices and I still have trouble in getting my Vera operate my door gate, and getting the input from the doorbell. It's already all 220v, because I have an external modulo meant for integration.
So, last night I had an idea: why not use a Shelly 1 as both sensor and opener?
If you need instructions on wiring, here's an image:
Shelly 1 can operate the output independently from the input. So, I prototyped this:
I attached to the doorbell sensor O attached to the gate openerIt seems to work on my bench, because I can call the endpoints when the button is pressed or the input is triggered, so I can update virtual devices and execute all the logic I want. I usually integrate these devices with MQTT, but it's not necessary in this case, since I can live with a doorbell buzz being missed.
Bonus point: you can run it at 12v if you want.83c3d861-0169-454d-bd2b-1105042bdfa8-image.png
Next in my TODO list, the Shelly Universal, a 9 EUR universal binary inputs, with separated inputs and outputs (so, you can get 2 inputs and operate 2 outputs independently), that I'll probably use in my weather sensors project, where I'm using two Shelly 1 at the moment, just the get the inputs.
-
I'm going to throw this in here, but I don't actually expect a solution, but it might help someone else.
I have three of these magnetic sensors and the work. Kind of.
The issue is that if you open and close the door within about 2 seconds, they trip correctly and then will not untrip unless the door is opened and closed (for more than about 2 seconds) .
This makes them virtually useless for any security application unless you are very slow through the doors.
Even forcing setting 'Tripped' to zero using lua fails. Well it doesn't fail but it's simply reversed:
2020-07-03 15:01:24.783 luup_log:0: ALTUI: runLua(luup.variable_set("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", "0", 20780) 2020-07-03 15:01:24.783 luup.variable_set:: 20780.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped was: 1 now: 0 #hooks:0 2020-07-03 15:01:25.044 luup.variable_set:: 20780.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped was: 0 now: 1 #hooks:0So there it is. Unless anyone has any smart ideas (apart from not opening and closing the doors quickly, I'd avoid buying these.
(PS the only apparent setting that might affect this is the the delay before sending 'untripped' but even setting that to 10 seconds makes no difference. In short, it seems that thee devices have a hardware limitation in how soon they can be tripped.
C
-
I've just completed my setup (after exactly 3 years from moving in, priorities!) and even if I wrote all the code in C#, I could port it easily to LUA (I guess 😄 )
I've used Fully Kiosk Browser + 3D Printed Mount (check https://makesbymike.com/) and a custom HTML dashboard, all running on an Amazon Fire Tablet:
WhatsApp Image 2020-06-29 at 11.05.29.jpeg
60002839-8b8d-4801-bd21-120264b559f8-image.png
WAF is very high 😉
Sorry for the Italian interface. First row is temperature/humidity sensors (esterno = outside, piscina = pool, salotto = open space, zona giorno = 1st floor, zona notte = 2nd floor, lavanderia = laundry room).
Then I have a bunch of commands/scenes sent to Vera to change blinds/roller shutters (they are automatically managed, but wife pretends to be smarter than code, from time to time 🙂 ). Last row has notifications for washer/dryer, with the cycle end date. When doing its cycle, the background becomes orange, then green when completed. It's probably the best feature, since the laundry room is in the basement. There's also a link to cams (videosorveglianza) and I automatically open TinyCamPro in case of movement outside/doors/gates are opened.Is there any interest in a generic wall mount tablet plug-in, offering simple dashboard (maybe json-driven) and integration with Fully Kiosk API?
I'm currently dimming screen on/off, get the battery status and schedule a 20-80 cycle for the battery, via a smart plug and a bunch of lua code. I planned for this when I did the electrical setup, so the tablet has a standard european 503 (recessed) box with ethernet, that I attached to the 5V into the network closet to feed the tablet. I'm updating the screen via AJAX every 30 secs.
Here's a behind the scenes photo as well 🙂
-
-
I'm in the middle of adding a water tank, because the latest summers were very hot and we had our water restricted, sometimes for weeks and for extended hours during the day (from 7 am to 5 pm).
It should be automatic, thanks to pressure sensors, so it will integrate water when needed (and the main line is open), switch the pump, etc. But I want to add a water level sensor nonetheless, to monitor it if necessary. I will probably just double this project and automate the pool refill as well, since I'm doing it manually at the moment.
I took a look and a lot of people are using Zunos, but I'm not sure I want to spend so much on a so simple system.
Pre-built solutions are OK. Thanks! -
I'm in the process of trying to get some info from my pool controller using Modbus. If I'll ever succeed, I want to write a generic plug-in for Vera/openluup, to be added to my collection of virtual device plug-in. I'll write a custom app in a Raspberry offering access to the controller via HTTP.
Long story short, I think I'm almost covered. Typical device:
heater pumps (on/off) jets (on/off) lights (dimmers, on/off) filtration (on/off) temperature sensor generic sensor (for ph/redox probes)I think I'm almost covered by standard devices, but I'm wondering if there's something I'm missing.
I'll probably use a multistring to display status, since it's already supported in mobile apps, but I'm wondering if there's some kind of more granular way to show something and avoid custom devices and similar. -
-
I had this setup and working perfectly in my vera for years. I recently accidentally deleted the device. I tried to re-add it as generic zwave. No problem, all devices come up fine and work. But the vera keeps trying to get secure classes. This is an old device I don’t think it’s zwave plus and it worked on my vera vefore. Vera can’t configure the parameters on the device and vera thinks its a failed device. But it works. Any experts know this one?
|-<:) -
-
With a ChemE and Electrochemist background and wanted to share some understanding on batteries. I looked around and was surprised to find as little as I did on battery comparisons. I only found this site:
Disposable Batteries compared -- Alkaline, Lithium, Carbon Zinc, OxyrideThe summary is this:
Alkaline are cheap.
Lithium are expensive but last much longer for high drain applications like powering a motor. They also are much more tolerant to low temperatures so they are more suitable for outdoor use. They have much higher capacity but this difference becomes pretty insignificant when used under low drain condition. (example are z-wave and zigbee sensors) and are therefore both a cost and environmental waste for these applications.The rechargeable battery technology has progressed a lot in the past 10-15 years. Their biggest drawbacks were low capacity, high self discharge rate and limited number of recharge cycles. All have significantly improved with the LSD (Low Self Discharge) NiMH (Nickel Metal Hydride) batteries. The famous Sanyo/Panasonic eneloop are an example of these.
The use of different batteries will have a significant impact on the battery readback reports from our devices because most of devices estimate the battery capacity percentage based on their voltage assuming they are alkaline:
While the alkaline behaves almost linearly draining from 1.55V to 1.1V, lithium present a near step function characteristic starting at ~1.75V (AA -LR6 and AAA-LR3) and stay at that voltage until suddenly dropping to 1.5V at which point they are almost incapable of delivering high currents. They will then deliver gradually lower currents until ~1.4V where they can be considered empty. NiMH on the other hand start at ~1.35V and drop near linearly to 1.1VThe result is that lithium batteries will always show as full until suddenly stopping to work, showing 0% or nothing at all.
NiMH will start at 0-25% when full. These all can render the battery read-back very misleading... But either alternative choices according their applications will be much more cost effective and environmentally savvy.Adding info on other common rechargeable batteries for those interested but less relevant for Smarthomes:
NiCd: Still found in many devices, they have much smaller energy density (lower capacity) and support fewer recharge cycles than NiMH. They offer the advantage of having a very short load transient, meaning they are able to deliver full current immediately after the load is put on them, making them very good for powering motors. They are mostly used in power tools
Li-Ion: Very high energy density. It is what is used in laptops, phones and... some planes. More expensive and not available in low voltage/small format.
Tinkering with Tasmota sensors
-
Quite a number of years ago I set up a few Arduino sensors that reported temperature to my VeraLite running UI5. I did this with MySensors, a quite nice community based platform.
I discontinued this mostly because that the combination of a rather flaky Vera and that the Vera when rebooting lost the USB connected gateway.Some time ago I started to look at this again, but this time using ESP8266’s and Tasmota. I think the credit for this partially is the plugin for Shelly and Tasmota that @therealdb has written, even though I have still to use the plugin. The other reason for reentering into this area is that my electrical supplier is replacing the electrical meters for a new smart meter. Today I use a blink meter from Effergy, but the new meter will have a port for reading out data. This also led me to Tasmota, there seems to be a functioning solution for this.
I must say that Tasmota is brilliant! Support for all kind of devices and sensors and super easy to use, also for multi-sensors, OTA update, good documentation etc. You can get parts on ebay etc quite cheap. It has also so far been very stable. You can also very easily adjust the sensors readout, e.g. TempOffset -1.5 gives an offset of -1.5 degrees.
I have put together sensors for temperature and humidity for use in the garage, the outhouse, on the attic etc. I have tested DHT22, DS1820B, BME280 and BH1750 so far and they all work without issues. The latter two I installed in an outdoor enclosure to use as a simple weather station reporting temperature, humidity, air pressure and light level.
I also got a MH-Z19B CO2 meter for testing to monitor the indoor CO2 levels. The initial feeling is that it does what it should.
In general I have pretty good wifi coverage with a few Unifi access points. One of the sensors is in a building some 25 meters from the house where the wifi is not that strong, but the NodeMCU has no problem with this. Quite impressive and a good addition to Z-wave for that kind of location.
Not owning a 3D printer I have had to resort to purchased enclosures and the old Dremel.
For the CO2 sensor I put it in an old smoke detector enclosure for now.
I am sure that there are a lot of talent here that can do much better with a 3D printer!
You can get the data from the Tasmota devices into OpenLuup in a number of ways. The obvious way is via MQTT. I have still to set this up at some point in time. The second way is to use the excellent SiteSensor plugin. I tested this but had some problems with reporting stopping after a few days for some reason. I probably got something wrong in the setup. The third option, that I currently use is via adding rules to each sensor. You can quite easily add rules for reporting data to a virtual sensor in OpenLuup, e.g:
Rule1 ON tele-AM2301#Temperature DO Var1 %value% ENDON ON tele-AM2301#Temperature DO WebSend [IP_adress:3480]/data_request?id=lu_action&DeviceNum=65&id=variableset&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=%Var1% ENDON
With TelePeriod you can change the polling interval as required.
This method I think could be super useful for reporting back e.g. switch status from a Tasmota node much like I understand Shelly can do.
Some resources and notes I made on the way:
-
Using Tazmotizer to flash the ESP’s is very easy
-
List of supported sensors including how to connect, commands etc
-
A good pinout reference for ESP8266 variants
-
Tasmota rules documentation
-
Most sensors are either “Generic (0)” or “Generic (18)”, check for each sensor type what to use
-
For I2C sensors e.g. BME280 one must use tasmota-sensors.bin
-
For the MH-Z19B I had to flash the ESP before attaching the sensor, this could be a good practice always
-
Use the following url for the query in SiteSensor:
http://IP_address/cm?cmnd=Status%2010
This became a rather long post but hopefully it can be of some use.
//ArcherS -
-
I'm struggling with good enclosure as well (I still have to find something good for my light and temperature sensor...), but overall I did what you did, plus MQTT, because I'm not that good with Tasmota's rules and I have a couple of other things running on MQTT (Shelly, OpenSprinkler, FullyKiosk) and it was fun to write an orchestrator from MQTT to luup.
Do you mind if I grab some of your instructions and add them to the readme? A lot of people are asking for guidance and the rules in particular is very helpful
-
@therealdb feel free to use what ever you want to your instructions, nice to know that it will be of use for others.
//Archers
-
@therealdb I built my outdoor sensor from what I had in the garage, very much DIY in other words.
I used an outdoor junction box, to this I hot glued a plastic dome from an old motion sensor for the light sensor. I also added a short piece of plastic pipe for the BME280 so that it is outside of the box to get better readings. To keep spiders etc out of the pipe I added an old stainless mesh dome to the end of it.
In the box is also a 240V/5V transformer.The intention is to mount it on the north wall of the house outside of the sun. At the moment it is laying on the window sill.
Some more small tips on rules:
It is possible to create up to three rules for each sensor.
It is possible to have several "Do" stamements in each rule.
Rule<x> ON <trigger1> DO <command> ENDON ON <trigger2> DO <command> ENDON ...
It is very easy to find out the name of each sensor for using in the rules by looking at:
http://IP_address/cm?cmnd=Status%2010
A rule is defined by pasting the rule from e.g. notepad to the Console window of the sensor.
After that the rule needs to be enabled byRule1 1
,Rule2 1
etc.
After enabling a rule check in the console that the rule is sending values.
A rule is deactivated byRule1 0
etc.
To see the contents of a rule just typeRule1
etc.
To delete a rule typeRule1 "
etc.My recommendation is for people to look at the Tasmota rules documentation, it is very good.
.
//ArcherS -
I'm currently struggling to get some dome, so sensors are getting dust. It's not a huge problem, since I have them indoor at the moment, but I wish I had more leftovers to thinker with
Thanks for the rules, I'll definitely add something to the docs in the next days.
-
Continuing an old thread, today I finished a Tasmota IR receiver and transmitter. I built it using the guidelines in the Tasmota documentation.
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.
I must say it works quite nicely, I have tried it with a few of the remotes in the household and it seems to pick up and decode them so far.Like all Tasmota devices it can be controlled via console, MQTT or web requests.
Via web requests you send:http://DeviceIPadress/cm?cmnd=
and then append the command e.g. IRsend{...} or IRHVAC{...}.
The command needs to be url encoded via e.g. https://www.urlencoder.org/
The exact command you get by the help of the IR receiver, just press the appropriate button on the remote and look at the response in the console.The idea I have with the IR unit is to be able to send some commands to the HVAC. Commands for HVAC units are a bit tricky since the remote usually send all config commands every time, but I think I got it to work as I need to.
I could also see this as an alternative to a Broadlink unit to control a TV etc. as well, all depending on the use case.//ArcherS
-
I like the Tasmota stuff but the devices would probably become a management nightmare as time goes on, or as the number of devices is increased. However, is it worthwhile me having a look at supporting the Tasmota IR device with this plugin or maybe not?
The Tasmota interface is a bit lacking as it follows no standard. This list
"Protocol" or "Vendor" (select one of the following): RC5, RC6, NEC, SONY, PANASONIC, JVC, SAMSUNG, WHYNTER, AIWA_RC_T501, LG, MITSUBISHI, DISH, SHARP, DENON, SHERWOOD, RCMM, SANYO_LC7461, RC5X, NEC (non-strict), NIKAI, MAGIQUEST, LASERTAG, CARRIER_AC, MITSUBISHI2, HITACHI_AC1, HITACHI_AC2, GICABLE, LUTRON, PIONEER, LG2, SAMSUNG36, LEGOPF, INAX, DAIKIN152
includes duplicates, as some such as LG, are based on NEC format. Formats have already been well defined here.
Also listing out working codes like this will become untenable in the long term. It's already been done here.
Perhaps the Virtual Pronto Remote plugin could also produce raw "Tasmota" codes, so they could be used through this Tasmota interface?
I don't have the hardware, so can't test it. Might also have to rename the plugin as it will do output more than pronto codes.
It would be easier to encourage the Tasmota people to allow Pronto codes to be sent, which is an extremely popular format?
-
@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
-
Thanks @ArcherS! I just need the ventilated ones. They should fit temp, humidity and light sensors nicely. I’ll also build an air quality sensor soon, so it’ll be handy. I’ll place an order soon. Thanks again!
-
@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.