#esphome
Explore tagged Tumblr posts
Text
DIY Air Quality Monitors for Home Assistant
#air quality#capacitor#DIY#electronics#ENS160#ESP8266#ESPHome#Home Assistant#humidity#JST connector#make#making#particulate matter#SEN50#Si7120#soldering#temperature#VOC#Wemos D1
0 notes
Photo
Senseair K30 CO2 meter Hi, I’ve installed a Senseair K30 CO2 meter to an ESP32 and i’d like to share this with you. Big thanks to martgras and znerk13 for showing the way (Add Senseair K30 CO2 sensor · Issue #1587 · esphome/feature-requests · GitHub). Starting off with the most important question first: why choose the expensive Senseair K30 sensor, and not something else? The choice is based on this scientific publication, which shows the K30 to be a very good sensor. Tomomi Yasuda et al, Comparison of the Characteristics of Small Commercial NDIR CO2 Sensor Models and Development of a Portable CO2 Measurement Device, Sensors 2012, 12, 3641-3655 The result is backup-up by this peer-reviewed paper: Cory R. Martin et al, Evaluation and environmental correction of ambient CO2 measurements from a low-cost NDIR sensor, Atmos. Meas. Tech., 10, 2383–2395, 2017. The result is also backup-up by this non-peer-reviewed paper, which also shows the K30 to be a good sensor: Mengna Li et al, Design of a Calibration System for Miniature Carbon Dioxide Sensors, FLOMEKO 2019, Lisbon, Portugal Okay, based on these results, i choose the Senseair K30. The K30 uses automatic baseline calibration (ABC) to auto-calibrate every 7.5 days. It assumes that lowest measurement in this period is the baseline value of 400 ppm. This mechanism works fine unless somebody is at home all the time (the baseline of 400 would never be reached in those 7.5 days). If the baseline is never reached, it is also possible to disable the ABC-mechanism, but i have not investigated this. Hardware: Power Supply: Mean Well RS-15-5 ESP32: ESP32 WROOM Devkit CO2 sensor: Sensair K30 Bi-directional Logic Level Shifter 3.3v <-> 5v The sensor is very flexible, it can be connected analog and digital via I2C and UART (modbus). I choose UART based on the previous work of martgras and znerk13. Dupont pin headers are soldered onto the Senseair K30 UART terminal. In he picture below, from left to right: ground, 5v, RX, TX From here, the RX and TX go to the Logic Level Shifter → ESP32 TX (GPIO1, orange cable) and RX (GPIO3, yellow cable). As always, RX from the sensor goes to TX of the ESP and TX from the sensor goes to RX of the ESP. Screw the ESP into a project box and fixate the logic level shifter inside. Use a cable gland to fixate cabling in the project box. Now, screw the Senseair K30 outside of the project box, on top of the lid. Make sure to only use two screws, not more. Reason: Senseair advices this to prevent strain on the pcb. Also make sure that both screws are isolated from each other and isolated from main ground (for example by using plastic screws). Connect the wires and screw the top on the project box. CO2 sensors are sensitive to temperature, therefore the ESP32 is inside the box and the sensor is outside of the box attached via spacers. This is also the reason why the power supply is in another location. Building the power supply: this is pretty standard stuff. Crimp ring (or fork-style) connectors to the cables and screw the cables to the power supply. The power supply is placed into a ventilated project box (you can drill holes for this). Make sure to use cable glands to secure the 230v cables, otherwise you are creating a very dangerous situation. Use thick cabling to go from the power supply to the esp32/K30 combination to prevent voltage drop. I’ve used 0.75mm squared cables. You can calculate the required wire thickness using this website: Voltage Drop Calculator Inside the esp32 project box, i’ve placed Wago 221 to divide the cables further into shorter smaller cables to which i crimped dupont connectors (for the ESP32 and the K30) and ferrules (for the Wago 221). End-result of the device. Again, please be aware to place the power supply away from the K30 sensor to prevent warm-up and drifting CO2 measurements. I’ve placed the device inside the ventilation shaft that is extracting air from my living room to the outside. ESPHome is installed onto the ESP32. See the config below. esphome: name: living-room-co2-meter friendly_name: Living Room CO2 Meter comment: ESP32ESP-32S Wroom Devkit v1 + Senseair K30 esp32: board: esp32dev framework: type: arduino # Enable logging logger: baud_rate: 0 # Enable Home Assistant API api: encryption: key: "xxx" ota: password: "yyy" wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Living-Room-Co2-Meter" password: "zzz" captive_portal: uart: id: mod_uart tx_pin: 1 rx_pin: 3 baud_rate: 9600 stop_bits: 1 parity: none modbus: send_wait_time: 200ms uart_id: mod_uart id: mod_bus modbus_controller: - id: sensek30 ## the Modbus device addr address: 0xFE modbus_id: mod_bus command_throttle: 500ms setup_priority: -10 update_interval: 30s sensor: - platform: modbus_controller modbus_controller_id: sensek30 id: status_raw name: "CO2 Status Raw" internal: True address: 0 register_type: "read" value_type: U_WORD accuracy_decimals: 0 - platform: modbus_controller modbus_controller_id: sensek30 id: co2 name: "CO2 Level" address: 3 unit_of_measurement: "ppm" register_type: "read" value_type: U_WORD accuracy_decimals: 0 text_sensor: - platform: template name: "CO2 Status" lambda: |- if (id(status_raw).state == 0) { return {"Ok"}; } if (id(status_raw).state == 1){ return {"Error"}; } else { return "Unknown Code: " + to_string(id(status_raw).state); } The end-result is looking very good. 1 post - 1 participant Read full topic https://community.home-assistant.io/t/senseair-k30-co2-meter/593808
0 notes
Text
I heard you like blog posts, so here's a blog post that's so long I put quick links to get to specific parts of the long blog post.
Featuring: Making a Google Home Mini into an ESPHome-based voice assistant for Home Assistant! And the hardware choices involved.
https://blog.senil.me/esphome-google-mini-initial-thoughts/
1 note
·
View note
Text
maybe this is just because i'm more into this stuff than I was as a teen, but it's never been more straightforward and fun to play around with electronics. if tools like ESPHome had existed when I was a kid, I would've annoyed my parents so much!
the problem is every sensor, resistor, LED, or controller is only available in bulk(or $2 + $16 shipping) from Aliexpress.
When I wanted to change the tone knob on my guitar, i just walked over to radio shack at Westmount Mall after school and bought a different capacitor and potentiometer and bodged it all together in an afternoon. Nowadays, you have to have to wait a month and a half when you don't have time and maybe don't even care about that problem anymore.
more people need to know how electronics work, and every hobby involves more electricity than it ever has, but the lil store that could fill the niche burried itself for no reason.
Does anyone remember what happened to Radio Shack?
They started out selling niche electronics supplies. Capacitors and transformers and shit. This was never the most popular thing, but they had an audience, one that they had a real lock on. No one else was doing that, so all the electronics geeks had to go to them, back in the days before online ordering. They branched out into other electronics too, but kept doing the electronic components.
Eventually they realize that they are making more money selling cell phones and remote control cars than they were with those electronic components. After all, everyone needs a cellphone and some electronic toys, but how many people need a multimeter and some resistors?
So they pivoted, and started only selling that stuff. All cellphones, all remote control cars, stop wasting store space on this niche shit.
And then Walmart and Target and Circuit City and Best Buy ate their lunch. Those companies were already running big stores that sold cellphones and remote control cars, and they had more leverage to get lower prices and selling more stuff meant they had more reasons to go in there, and they couldn't compete. Without the niche electronics stuff that had been their core brand, there was no reason to go to their stores. Everything they sold, you could get elsewhere, and almost always for cheaper, and probably you could buy 5 other things you needed while you were there, stuff Radio Shack didn't sell.
And Radio Shack is gone now. They had a small but loyal customer base that they were never going to lose, but they decided to switch to a bigger but more fickle customer base, one that would go somewhere else for convenience or a bargain. Rather than stick with what they were great at (and only they could do), they switched to something they were only okay at... putting them in a bigger pond with a lot of bigger fish who promptly out-competed them.
If Radio Shack had stayed with their core audience, who knows what would have happened? Maybe they wouldn't have made a billion dollars, but maybe they would still be around, still serving that community, still getting by. They may have had a small audience, but they had basically no competition for that audience. But yeah, we only know for sure what would happen if they decided to attempt to go more mainstream: They fail and die. We know for sure because that's what they did.
I don't know why I keep thinking about the story of what happened to Radio Shack. It just keeps feeling relevant for some reason.
34K notes
·
View notes
Photo

Mike Norgate's Airlytix ES1 Is a Feature-Packed ESPHome-Powered Environmental Monitor
0 notes
Text
Home Assistant utilizzo delle schede Sunton con diplay integrati
Home Assistant utilizzo delle schede Sunton con diplay integrati Introduzione Le schede Sunton, basate su ESP32 S3, si distinguono per la loro versatilità e l’integrazione di un display, rendendole ideali per progetti di automazione domestica che richiedono un’interfaccia utente grafica. ESPHome e openHASP, utilizzati insieme a Home Assistant, offrono un potente framework per il controllo e…
View On WordPress
0 notes
Text
PWM frequency in Shelly RGBW2 controller
I received an interesting email from a reader of my post: https://teardownit.com/posts/shelly-rgbw2-controller-and-shelly-duo-rgbw-bulb-dangerous-light-pulsations
===== After having some bloody eyes and reading your article I decided to change the firmware on shelly rgbw2 with ESPHome so I can modify the pwm freq to 1500 Hz like you recommended. Don't know if placebo or not but I feel better :) .
I can test only with camera from phone with shutter speed at 1/1500 and no flicker (and sub multiples like 1/500). With PWM freq at 600 Hz I could see flicker on camera at anything above 1/600.
Don't know if this is the same you have tested but I was curious if you can test with a modified Shelly with ESPHome to be able to put higher frequency. I also don't know if there is a limit on the maximum frequency (the shelly or the COB LED strip it's dimming ) it will work and if is there any benefit in increasing any further.
Thank you for publishing this extensive tests online. Ciprian =====
Great news!
I was very interested and read the ESPHome firmware description. https://esphome.io/components/output/esp8266_pwm.html Perfect!
I have not previously used ESPHome, but I have been actively using Tasmota for a long time. In this firmware I also found PWM frequency adjustment: https://tasmota.github.io/docs/Commands/#pwmfrequency
Let's do the tests!
The measurement scheme is simple.


1. Old Shelly native firmware.
I found a new old Shelly RGBW2 controller with 2021 firmware in my stock.

Measurements are taken at 25% brightness. The PWM controller is running at 600 Hz.

2. New Shelly native firmware (20230913-131259/v1.14.0-gcb84623).
The PWM controller operates at 1000 Hz for a brightness of 25%.

3. Tasmota firmware.
Firmware installation is easily done without wires and additional devices using OTA. Manual: https://github.com/arendst/mgos-to-tasmota
However, I couldn't use this script and found many errors mentioned for this device.
The solution is found right here: https://github.com/yaourdt/mgos-to-tasmota/issues/102
This is my successful script:
RGBW2 must be set to Color mode. You do not need to do anything if the device is already in this mode.
The firmware needs to be downloaded from this link: http://deviceIP/ota?url=http://dl.nekohell.eu/mg2tasmota-ShellyRGBW2c.zip
Once the WiFi network is configured, you need to use two commands through the Tasmota console (changes will be saved after rebooting or shutting down the device): SetOption68 1 // The device will switch to 4-channel white mode (if you need it)PWMFrequency 2000 // PWM frequency will increase to 2000 Hz
Configuration for Tasmota and additional information: https://tasmota.github.io/docs/devices/Shelly-RGBW2/

I set the PWM frequency by a multiple margin (I was just curious). 4000 Hz.

The optical measuring tool showed an incomprehensible picture for me. But this phenomenon is outside the scope of this post, and I will deal with it later.

Conclusions.
The Shelly device manufacturer can change and does change the PWM frequency in their firmware. I really don't understand their answer about not being able/unwilling to change the PWM frequency to a safe level.
I am very grateful to Ciprian for the excellent advice. Thank you, Ciprian!
0 notes
Text
Last night:
Finish ST Prodigy (very consistently decent, why so many producers, I assume it's money reasons)
Dune of the 20s (thank you for not wasting all that time whispering about the wrong traitor, of course i went to the elmo edit and watched it thrice when i realized this was the upcoming scene)
Tonight:
Home Assistant install (no docker)
AirGradient One re-flashed with ESPHome (todo: make the blinkenlights do something)
0 notes
Text
have halfway implemented something similar; have stopped due to 'it's good enough' and 'i have other shit to do with my life' (fuck around on the internet apparently)
if i post this, hopefully partner will correct me on any factual inaccuracies/provide specifics where i've been general
home assistant. we used to have it running on a raspberry pi, now on a mini-pc. i don't know the specifics of how to set it up because partner handled it. partner set it up so we have remote access, but i forget exactly what they did; it wasn't through nabucasa which is the easier but paid way to set that up.
instead of a camera in a smart doorbell, we have a camera on the ceiling. it's amcrest, i think? i have nothing to say about it. it's fine. carefully angled it so it'd get a good view of anyone who's actually on our porch, but a terrible view of anyone on the sidewalk.
power-over-ethernet is the nice feature to look for, but wifi + plug-in would also be fine if ethernet cables are difficult to run to the location in question. battery management is annoying as hell, mostly.
the video part of affairs is handled by frigate, which does object detection (ie, person, cat, dog, car, etc detection) with local ML bullshit. if one hands them money, one gets to train their own model, which is apparently very nice if the camera is located at a funny angle (....like ceiling mounted). have not bothered doing that, probably would be worth it for us. eventually. lazy.
anyway, some useful stuff can be done with this. notifications on phones/computers/televisions with a picture of who's/what's at the door. powered camera, rather than battery, means the camera can always be going & trigger events based on image detection (earlier response) rather than doorbell being rung (later), which is nice for package delivery &c.
this all feels sorta overkill for just a door camera, but we already had homeass set up, so it was incremental steps for us.
...
i originally had this paragraph in-line above but it's pretty much irrelevant to how we have (halfway) set things up
our doorbell isn't a smart doorbell; it's a normal doorbell + a mechanical chime with an esphome board spliced into the wiring. no batteries to run out. attaching it to home assistant meant we could do things like 'mute the chime when we're in bed or if we're in meetings', 'get notifications, even when we're out, that someone rang the doorbell'... hardly anyone ever rings it; i have the numbers to prove it. twice in the last month. let me tell you! a lot more than 2 people have come to my place!
...
i'm sure i've forgotten relevant things but i don't know what.
We're looking at making/buying a non-cloud doorbell camera for the house. I'm not afraid of working with an Arduino/Rasp Pi, etc if necessary, but obviously if I could just buy something affordably, I'd rather do that. Basically something where someone could ring it and it would ping people on the local wifi (or maybe through an API like Adafruit IO, but not Amazon, etc). Anyone have any recs?
(@robustcornhusk this seems especially up your alley)
6 notes
·
View notes
Text
Home Assistant Air Quality Monitors from IKEA Vindriktning
#air quality#CO2#DIY#electronics#ESP8266#ESPHome#hacking#Home Assistant#home automation#humidity#IKEA#microcontroller#mod#modification#sensor#smart home#temperature#upgrade#Vindriktning#VOC#Wemos D1
0 notes
Photo

My project: controlling my SomfyIO-screens with a remote, ESPHome on a WemosD1mini and HomeAssistant . @homeassistant #esphome #diy #somfy #wemosd1mini #esp8266 #esp8266project #screens #soldering #covers https://www.instagram.com/p/CftOAdbskJG/?igshid=NGJjMDIxMWI=
0 notes
Video
youtube
Getting Started with ESPHome: How to Install and Integrate it with Home Assistant?
ESPHome is a simple yet powerful system that allows users to control ESP boards using YAML configuration files. It allows users to quickly and easily build custom firmware for sensors and devices without any programming skills. ESPHome supports a long list of devices, sensors, and protocols that can be configured with just a few lines of YAML. Apart from that, it can also control lights, displays, and even more. It can be integrated with Home Assistant in few clicks.
Read More
1 note
·
View note
Text
partner and i are both enthusiastic and lazy about home automation; we use home assistant.
'actually doing shit' can be annoyingly expensive, but very nice when i pull it off. 'reminding me about shit' is generally very cheap, and still helpful.
actually doing shit:
the shades in my bedroom open up a few inches when i'm supposed to get up in the morning
the overhead fan turns off, too, so that i stop burrowing under the covers
when i walk into the kitchen, overhead lights turn on; if i start doing things with the coffee or sink, the counter lights turn on. the overhead lights turn off when it's bright, and all the lights turn off shortly after i leave the room.
the front door locks once the screen door is shut
music and lights all turn off when i leave home. the music restarts when i get back; the lights only come back on if it's dim.
when i open the windows, the hvac gets disabled so that i don't try to heat/cool the entire neighborhood.
a white noise machine turns on whenever my partner takes a call from their home office.
all the lights other than the bedroom turn off when we go to bed at night
all lights gradually dim & change to a warmer color in the evening
back porch lights turn on when the back door is open & it's after sunset
reminding/notifying me about shit
when i opened the front door for my run, the lights flashed to let me know I'd forgotten to get out the bagels
when the kettle turned on this morning, i got a notification on my phone telling me 1) i needed to take iron today and 2) my partner needed to leave for their train at X:YZ.
if i'm playing games and making tea at night, i always forget about the kettle; now i get a reminder on both my phone & the projector
when it's after 5pm and my partner's phone disconnects from their office's wifi for five minutes, i'll get told that it's probably a good time to start cooking dinner.
i get notifications when either of the cat's litterbox has been used 3 times, and the counter resets when i clean the boxes.
i have an old tablet i use solely for watching anime while running on a treadmill, and i kept letting the battery run out; now its battery alerts get sent to my other devices.
not only do the washer and dryer send me notifications, but the clothes drying rack does too, when it's been set up for 6+ hours. (no heat for the running clothes; too much elastic)
i get notifications if someone presses the doorbell when i'm out
water leak sensors.
there's also a lot of data recording that's just happening constantly, like the co2 levels, temperature/humidity, how bright it is, etc.
i was going to say "i should get notified if the aqi is bad and the windows are open" but before i finished typing the sentence, i went ahead and implemented it.
more unorganized thoughts
almost everything is local; i think the fucking washer & dryer are the only ones that require The Cloud. many of the 'smart' devices aren't; for example, we have a totally normal doorbell that's been wired up in a particular way, and our kettle is just a normal electric kettle on a smart plug.
there's a lot of zigbee and a few zwave items; most of the wifi stuff is either 1) there's no other option or 2) esphome devices, which are cheap and flexible. even the wifi devices are local-only, except for the washer/dryer.
some automations are harder to set up, from a design perspective. i'm still stuck on trying to figure out how to detect if i'm out on a run, because i'd like my bedroom blinds to go down when i get back.
being able to remote-control the lights &c is nice. we have a lot of Fashionable Lamps that have super inconvenient switches, so homeass was instantly more convenient even before any automations came into play. the a/v system we have is complicated, but playing games (=turning on the game system, receiver, & projector, turning down the lights in multiple rooms, pausing the music) is just one button. basically it takes "complicated setup" and squishes it back to "convenient setup".
re local voice control, my understanding is that a lot of people are using willow and wyoming lately, but i haven't looked into them in any detail yet; i think there's quite a bit of setup involved.
is there any real use for smart home stuff (apart from disabled people, i can see there's obviously a load of accessibility options stuff like controlling your lights from your phone etc). if you're basically able-bodied, is there any actual useful stuff that smart home technology gets you. because it all seems a bit shit imo. but many of my beloved mutuals and followers are Nerds so someone's got to have an Opinion about this right
49 notes
·
View notes
Photo

Magic Home RGB/WW/CW led controller #esp8266 #magichome #esphome #homeassistant #homeautomation https://www.instagram.com/p/B0xbiwsDMPP/?igshid=fhv5rhweh241
0 notes
Photo

Oleg Tarasov Smartens Up a Basic Gas Boiler with an ESPHome-Driven OpenTherm Thermostat System
0 notes