How to configure Tasmota with buzzer and door and PIR sensors

I am setting up my smart home with nothing but tasmotas on esp8266s that I set up myself.

I did my last install about 3 years ago, and it had door sensors. I couldn’t figure out how I got HA to recognize them before. I was lucky and found an old backup of a tasmota config I had. Seems I was creating “fake” relays to trick HomeAssistant.

Basically I would set up one pin to be “door relay” (ie relay 3) but wouldn’t connect anything to that pin. I would then connect the door switch (reed switch with magnet on door) and set it up as the door switch (ie switch 3). When HA found the relay I switched it to door sensor and that was that.

The issue I now have is that in order to keep wifi connections down I am trying to use as many of the D1s pins as I can. I currently have 7 D1s set up, each with 7 to 10 devices connected to them.

Using my living room tasmota as an example. It has 3 real relays connected, 1 touch senor set as button, 1 buzzer, 1 door sensor set as switch, and two PIR sensors set as switch as well. I plan to add a presence sensor as well.

HA via mqtt discovered the 3 relays as switches. I’ve gone ahead and set two of them up as lights, and one as fan. That part is working great. I also see there are more entities like SSID, Signal, etc. that have been hidden by default.

What I don’t see are the switches and the buzzer. I know using rules on the tasmota I could force it to do what I want, but is there a “cleaner” way of doing it?

this video Talks about using passive buzzer on HA. First half of the video is flashing tasmota and setting up the buzzer as a buzzer in tasmota. On the HA end we call mqtt publish service and send commands to the tasmota to turn buzzer on and off, but the buzzer isn’t “added” to HA.

How would I add the buzzer to HA? What if i wanted the buzzer to show up on devices like light bulbs do, like fans, etc.

How about the door and PIR switches? Do I manually create those and just update status via mqtt?

Something tells me I just need some key words to help me find the right instructions to follow.

I got my door sensor (hall sensor) working.

20:35:52.640 MQT: tele/TasSala/SENSOR = {"Time":"2023-12-09T20:35:52","Switch2":"ON","Switch3":"ON","Switch4":"ON","Switch5":"ON"}
20:35:55.290 MQT: tele/TasSala/SENSOR = {"Time":"2023-12-09T20:35:55","Switch2":"ON","Switch3":"ON","Switch4":"ON","Switch5":"OFF"}

When I open the door “Switch5” goes to ON. When I close the door “swith5” goes to OFF

There is no Relay 5 in my setup, so HA doesn’t seem to “see” switch5. How can I create an entity in HA that goes “on” when switch5 goes on, and OFF when off.

Sorry I keep replying to myself. I just keep searching and coming up with more questions and less answers lol

So I seem to be on the right track, at least for my door and PIR sensors.

I have touch sensors set up as button_in, and the PIR and door sensors as switches. The buzzer is set up as buzzer.

Turns out if I do setoption114 1 (turn on) on my tasmota it decouples the switches from the relays (but not the buttons, sweet!!). When setoption114 is turn on, over in HA Tasmota Device Info screen automagically a new section appears “sensors” and my switches show up there. Going to experiment more but this seems to be the “clean” way I was referring to, at least to get the door and pir sensors going.

Sadly the buzzer didn’t show up. Seems only way to control is via mqtt publishes

1 Like