Hello, I have searched the forum but did not find any similar question.
I want buy (or build) “cigarette smoke sensor” that can be integrated in to HA, to start a fan for a period time when it senses smoke.
Using normal smoke detectors is not possible as they will start beep-ing, I need something silent, and sensitive.
The story is that my girlfriend smokes and has her special room for smocking, I have installed celling fan that get’s the smoke outside, but she dos not turn on the fan every time when she smokes, and once the door to that room is left open, bad smell get’s in to the rest of the house and the Xiaomi Air Purifier starts to spin like crazy.
What if you would modify a smoke detector by connecting its output from the buzzer to an esp8266 running esphome or tasmota? That way, the smoke detector isnt safe any more for smoke alarms, but that would be the only way that comes to my mind for now.
EDIT: The one below is much better (no cloud connection required).
PM2.5 air quality sensors are very sensitive to cigarette smoke. I have this Xiaomi PM2.5 Air Quality Sensor for a while and whenever someone smokes even in the next room, the value jumps up to over 300 and if you are close to it goes up to 600 (i guess max value of xiaomi). Normally it is about 15-20. Best thing is, you can use it with HA.
Thanks “tenn0” , this was my idea to, buy one smoke detector from Xiaomi integrate in HA using his zigbe base, and just cut the wire to the speaker
“febalci” Thanks, this is rather expensive solution but definitely better, the xiaomi sensor is precise well built. I will be using an xiaomi relay to command the ventilator.
Now the question: This 2.5 sensor is wi-fi and definitely not supported to the EU server in xiaomi Mi app so I need an China account, but once I connect it to the network is it directly compatible with HA with no hardware hacking? do I use the “mio” integration?
You could also use a sensor MQ-135 and an ESP8266 … flash it with tasmota and use it with HA. more cheap and you will get the propose.
I’m using mine for alert me when should I open my windows to let fresh air enters.
I have an MQ-2 sensor, looking at his datasheet it can detect smoke/gas. Now I just need to find an ESP that I can cannibalize
What is the best option ESP home or Tasmota? I’m new to HA and I did not research either of the options I just know they exist.
I would recommend TAsmota . Its a simple as flsh it via USB (use a node MCU) and setup the PIN where you plug the sensor and them set the IP of your MQTT mosquito (probable same as HA).
And thats it … working fine for several months without any need for reboot or any
Actually i am not using any Xiaomi server or cloud or app, it is all local with:
sensor:
- platform: xiaomi_miio
name: Xiaomi pm2.5 AQI
host: 192.168.1.XX
token:!secret xiaomi_aqi_token
You can get the token as explained in the xiaomi integration page. No hardware hack required. Altough i haven’t updated its firmware ever; i am not sure how it acts with newer firmware versions.
Note: No smoking on that floor for over one week.
I already have a xiaomi Roborock configured, will the token be the same or do I have to find a new one for this device?
It was a PITA last time.
Token is device dependent. So, yes, a new token is required for a new xiaomi device.
It also sais on integration page:
Note: If you have multiple devices needing a token, e.g., Xiaomi Mi Robot Vacuum and a Xiaomi IR Remote, the above method may not work. The Xiaomi Home app will display a token, though it isn’t the correct one. The alternative method using “Mi Home v5.4.49” will provide the correct token.
with the NodeMCU with Tasmota and the sensor, you would be able to even add more sensor for a much lower price.
The NodeMCU cost at amazon 4-5 dollars and the sensor is cents . You can even add a light sensor or even a DHT22 for temperature and humidity sensor - also for cents.
a much lower price that Xiaomi gadget
my sensor:
I just looked at the price. Yeah diy ESPHome is going to be the way to go for me.
febalci, to get an IP address and token any xiaomi device that I have, needs to be connected first to the mi home app, I think this is the same with the air monitor device. So it still dependent on the cloud at first until you connect it to the network.
tom_l to get all the corect tokens/IP from the mi account easy and directly on HA use the Gateway 3 integration
miguelromao I have all the hardware I will try this tomorrow, I know what can be done with ESP and I have multiple sensors in Open Hab, just switched to HA recently.
I find tasmota more easy than EspHome …
I find ESPHome more customisable/powerful than Tasmota, it’s good that we have the choice.
miguelromao, flashed an ESP it with Tasmonta, configured analog pin and connected the MQ-2 analog pin directly to the ESP. Unfortunately there are 2 issues:
- the sensor is not that sensible to smoke. Is sensitive to Gas
- the refresh is not instant in HA, it has a delay of 2-3 min until HA get’s the new value.
Did you use other electronic components for your sensor, to make is more sensitive. My sensor sits at ~800 value and goes to 1024 when I put some gas from the lighter 2-3CM close to it.
I have done some more digging and realized that the best solution is the expensive xiaomi air quality sensor. Design for continues and fast sensing of air quality using laser technology.
- the MQ line of sensors are not sensitive to smoke, here is my graph for 3 days, you can clearly say from the graph when smocking was done in the room but is not instant and the range is to narrow for an automation, and it takes one day to settle down in a normal range, see spike at the end.
- the type of sensor presented in the video has an finite number working hours and is not suitable for an always on sensor.
- the fire/smoke alarm sensors from different brands have the same drawback as they are not that fast at detecting smoke to make automations like this.
Yep. I use an airvisual node pro, works great for anything like this.