Support for MQTT

Cool, my Pi is en route from ebay. I bought a bunch of amazon dash buttons, and was going to use one by my exit door to ‘activate’ sensor notifications, but then found out AFTER that I can’t init them to even be hacked for this use because amazon dropped them. I’d use a shelly button, but I want something battery operated. There is this video, maybe I can use a wyze sensor to trigger away status. Modify Wyze Sense Sensor - YouTube

Haha, I did that too for my mailbox sensor. I tried extending the antenna, but that didn’t work, so I did this exact method. Didn’t know about the video.

Yeah, I have seen that video, there is quite a bit of good stuff on his YT channel. I may use that addon to toggle a couple automations with the door sensor.

I finally installed the Wyze Sense integration on Home Assistant and it works well. I’ve hacked a couple of Wyze reed switches with a microbutton on outside and it works great. I have one hidden to kill the alarm. It is such a relief not have to power YET another esp8266 and use up more wifi headroom.

Definitely add MQTT support, or even better make them flashable to Tasmota. I’m in a rural area & we lose internet connection 3 to 4 times a week. Cloud controlled devices are worthless during these times. I won’t buy anything that can’t either be flashed over to Tasmota or has a MQTT option. I received a couple of your bulbs as a promo and really like them playing with them, but won’t buy any because of the cloud only control. I’ll most likely gift the ones I have to someone else.

1 Like

If you’re still waiting for MQTT support in the Wyze Plug or Bulb — and are willing to void your warranty — use Wyze Plug Flasher to load Tasmota OTA.

Big caveat: Conversion is one way. Your converted devices will be permanently disconnected from Wyze’s servers.


So, it’s now been over 2 years and STILL nothing from Wyze about implementing MQTT.
REALLY Wyze, how hard could it be?
I would LOVE to be able to recognize, locally, that my Wyze door lock has been opened… and left open… in the summer so I could turn off the HVAC and not waste energy.

But worse yet, Wyze hasn’t even seen fit to implement an IFTTT offering for the door locks.

Is this EVER

Probably not. I had such an unreliable experience with the Wyze door closure sensors, I threw them all away. I bought generic 433mhz door sensors and a ESP8266 433mhz receiver and I have achieved reliability. Had to use a linux/rasp pi box to process the statuses, but that took less time than trying to figure out why the wyze stuff stopped working. The video camera works great, but the home alarm devices are infuriating, including the lock.

1 Like

Hey ob2s… Yeah, I’m not holding my breath on Wyze. I wasn’t really interetested in using the door closure sensors… I was interested in getting the, Wyze DOOR LOCK, states. But since you brought up the 433mhz sensors… That is a very interesting idea. I’m actually working on modifying a couple of the outdoor PIR lights to work with an ESP8266 for sending MQTT messages to my, Raspi, broker. The 433 door sensors could be something useful for generating MQTT messages too. Any particular brand you are using? Did your build your own sniffer for the Raspi? Is the format of the messages, just a number that you associate in your system? I know, lots of questions. :wink:

This is a good 433mhz door sensor, it sends a different code on open and close.
433 door sensor
I used a D1 mini with this 433mhz receiver, it is the best receiver
The D1 mini has a http client and it forks a url on a pi webserver (lighttpd [simple cgis]) with the payload of the received 433mhz code. The receiver receives ANY 433mhz code transmission within 250 feet. You obviously can identify your codes and do your mqtt thing, I wrote my own HA equiv to take actions, just using HA for visual status. The sensor response time to the pi is under a second. If you want the code for the esp I can give it to you and a pic of the esp. Also I write the last contact time of each sensor and then email a weekly report to indicate last contact time so I can know if the batteries are low, which hasn’t happened yet.

1 Like

Thanks for the info. I’m no stranger to ESPs. I have some full esp8266s, esp32s and a bunch of D1 8266/32s. Made my own boards for them (using EasyEDA) even. I already have my ESPs talking MQTT with my Raspi broker and Raspi HASIO. But, yeah, I’d love to see the code you have for the 433Mhz. BTW, I’m retired, but worked for Honeywell Security for 35 years in software engineering, so I’m no stranger to coding, security systems and RF. I actually have patents on some radio protocols and encryption. :wink: So if you ever want to discuss a topic, I’m available. LOL

Very nice ! I bought the D1s to use with a flat lipo battery and NO door contacts so the battery would only be on when the door was open. I was using espnow protocol which is VERY fast compared to wifi handshake time. Problem was these chinese NO contacts leak, ie they aren’t REALLY open when the contacts are together, so I went the 433mhz route and am much happier. I will save this thread to bounce things off ye. Thanks

#include <Arduino.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WebServer.h>
#include <WiFiClient.h>
#include <RCSwitch.h>

ESP8266WebServer server(80);

void handleRoot() {
//String s = MAIN_page; //Read HTML contents
server.send(200, “text/html”, “hola”); //Send web page

const char* ssid = “IoT”;
const char* password = “YMMV”;
int channel = 1 ; // esp channel (sender&receiver) and wifi channel have to
match, esp-now defaults to channel 1, if not using espnow can be anything
String rcv =“”;
//int D2 on esp = 4;
RCSwitch mySwitch = RCSwitch();

void setup() {
uint8_t bootCounter = 0;
Serial.begin(115200); // initialize serial port
Serial.println(); Serial.println();
Serial.print(“Initializing…”); Serial.println (MY_REAL_NAME);
Serial.println("My MAC address: " + WiFi.macAddress());

WiFiClient client;
WiFi.begin(ssid, password, channel);
while (WiFi.status() != WL_CONNECTED)
if(bootCounter == 40)

if ((WiFi.status() == WL_CONNECTED)) {
Serial.print(“Wifi connected to: “);
Serial.print(ssid); Serial.print(” on channel:”); Serial.println(channel); }

Serial.println(“433mhz receiver listening:”);

void loop() {
if (mySwitch.available()) {

rcv = String(mySwitch.getReceivedValue());
  rcv = "433:" + rcv ;
  // 433mhz devices chatter, so sleep to dump the 'jitter'

// output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());


void getHttp(String blob) {
if (blob.indexOf(“:”) > 0) {
HTTPClient http;
String host = “”;
int port = 8008;
String url = “/cgi-bin/” + blob;
int httpCode = http.GET();
if (httpCode) {
if (httpCode == 200) {
String payload = http.getString();
else {
Serial.printf(“[HTTP] GET… failed, error: %s\n”, http.errorToString(httpCode).c_str());
Serial.println(“Retry one more time in 1.2 seconds in case webserver needs to wake up first”);
int httpCode = http.GET();
if (httpCode == 200) {
String payload = http.getString();
Serial.println(payload); }
else { Serial.println("Retry failed, code: " + httpCode); }
Serial.println(“closing connection”);
http.end(); }

Plus 1