ESP8266 mini sends SMS when door opens

preview_player
Показать описание
How to develop Arduino sketch for ESP8266 mini and magnetic door switch
Рекомендации по теме
Комментарии
Автор

Thanks Viktor for the time you spent on this project. I got it working in the end but I had to use "esp8266 by esp8266 community v.2.4.2" the exact version you've used. Version 3.x did not work but perhaps I have to give it a go again as there were few minor typos that I had to deal with after that. Will update this in due course. Let me know what later version(s) you've tried since. I am sure you moved on and do some other funky stuff, but hey...Thanks once again.

ibrahimyusuf
Автор

you should check 10:48 and, thanks for the video

xfarsys
Автор

Thank you so much Sir Viktor.
One question. How to use that PLIVO??How do i get the code for that??Again, thank you so much!

blazetechnb
Автор

Just some helpful advice — many people watch YouTube on their phones. You can’t read a thing because your text is SO small. The screen is over half who’re space with some microscopic text. Zoom to what you’re doing.

ericrandall
Автор

Can you give the magnetic switch
Product link for buy

junaidhkv
Автор

Just the project im looking for, could you please share the code. Thankx.

paulcowley
Автор

Thanks for sharing such an Awesome project. Can you please share the code for the same.
Awaiting your earliest response.

yawarsaeed
Автор

I'm a novice, well, I really have no clue on how to build what I want. Was wondering if you could give me some advice or even help me build this little project, if possible. I'd be more than happy to pay you for your time. I'm looking to build a very small or very slim wireless/ wifi window sensor. The smallest possible that's activated by a very small magnet. I need the activation to send a signal straight to my cell phone through my home router (without having to manipulate the settings on my router). I can download "homeassistant" or "mylife" or run a small simple phone app. The intent here is not to adjust any setting on my router. I'd like to get at least 75 - 150ft signal to my router. I have a 3d printer and can make a housing for the battery and board...just wondering if this is possible? Any advice would be much appreciated. Thank you for your help.

raymerritt
Автор

Hi sir. So we can use normal esp8266 for this project, right?

sedanurkocal
Автор

Hi, possible to use this to get notification when garage door is open?

frodemolland
Автор

Is there a method for sending an SMS text message without using third-party websites as in IFTTT or the one you used. Would like to keep the message sent and received within the LAN.

MaxGoddur
Автор

Hi, here is the code: OpenDetector.ino
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include "credentials.h"


int switchRead=D1;
bool hasSentMessage = false;


void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
pinMode(switchRead, INPUT_PULLUP);
connectWifi();
}


void loop() {
if (digitalRead(switchRead) == HIGH) {
digitalWrite(LED_BUILTIN, LOW);
Serial.println("Door Open");
if (!hasSentMessage) {
sendMessage();
}
} else {
Serial.println("Door Closed");
hasSentMessage = false;
}
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
}


void connectWifi() {
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.println("connecting");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.print("connected: ");

digitalWrite(LED_BUILTIN, HIGH);
}


void sendMessage() {

HTTPClient http;
http.addHeader("Content-Type", "application/json");
http.addHeader("Authorization", "Basic " + AUTH_TOKEN);
String postMessage = String("{\"src\":\"") + FROM_TELEPHONE + String("\", \"dst\":\"") + TO_TELEPHONE + String("\", \"text\":\"Main door is OPEN!\"}");
Serial.println(postMessage);
auto httpCode = http.POST(postMessage);
if (httpCode < 0) {
Serial.printf("POST failed, error: %s\n",
}
Serial.println(httpCode);
http.writeToStream(&Serial);
http.end();
hasSentMessage = true;
}

ViktorKjartansson
Автор

Hi Viktor; What is the name of the USB cable to the ESP 8266 called? Where can I purchase it? Thanks;Mike

michaelcarroll
Автор

Hello, I have used your approach; however, I get 400 Bad Request answer from PLIVO. Do you have an idea what might be wrong? Can you help me out, please?

Animace
Автор

And here is the credentials.h - you must put your credentials here
#define WIFI_SSID "YourWIFIName"
#define WIFI_PASSWORD "YourWIFIPassword"
#define AUTH_ID
#define AUTH_ID_TOKEN
#define AUTH_TOKEN
#define FROM_TELEPHONE
#define TO_TELEPHONE
#define FINGERPRINT

ViktorKjartansson
Автор

Is the code available somewhere? Thanks.

arniep
Автор

Has anyone developed a simple add on current sensor that detects current flow in the door bell wires when the doorbell button is pressed. When it senses the current it will send either a email or text message. Sort of a poor man DIY Ring Door bell for those that already have a camera looking at their front door.

nkkri
Автор

why do you need a breadboard? can't you connect it directly?

rootable
Автор

@
Viktor Kjartansson There is in the second line an #include <ESP8266HTTPClient.h> that is never shown in the tutorial who do we get that file or code?

WMCLComputers
Автор

sorry Viktor, i see no code, please help. Thankx

paulcowley