doorbell esp32 cam and windows
-
- Posts: 1
- Joined: Thu Nov 26, 2020 11:04 am
doorbell esp32 cam and windows
wonder if anyone can help what im trying to do is use the esp32 cam as a doorbell. i then need it to interrupt call of duty when someone presses bell as i tend to have earphone on cant hear normal doorbell any ideas
Re: doorbell esp32 cam and windows
Just send a notification to system tray:
- Create a nag app on Windows with the purpose of showing push notifications.
- Teach the ESP32 to send a Windows Push Notification to your app: https://docs.microsoft.com/en-us/window ... --overview
- Figure out how to permit Windows to show you the push notification during gaming.
Re: doorbell esp32 cam and windows
I just had a quick search on the internet to see if it might be possible to use Processing to act as a web server - I thought it unlikely but turns out it is really easy to do
see: https://processing.org/discourse/beta/n ... 28867.html
So you could modify the above Processing sketch to run on your PC which when the ESP32Cam sends a html request it triggers the processing sketch to alert you in whatever way you require. Maybe not a technically impressive solution but should be pretty quick/simple set up.
BTW - I have a sketch which I use as a starting point for my esp32cam projects which may be of interest if you are new to the esp32cam (and using ArduinoIDE): https://github.com/alanesq/esp32cam-demo
In this you would send such a request with a command in the format:
ip address, page to request, port to use (usually 80), maximum chars to receive
i.e. requestWebPage("192.168.1.100", "/?trigger1", 80, 600);
------
update:
I have modified the Processing sketch (below) so that if you add ?trigger1 or ?trigger2 on the end of the URL it pops up a message confirming the command was received
see: https://processing.org/discourse/beta/n ... 28867.html
So you could modify the above Processing sketch to run on your PC which when the ESP32Cam sends a html request it triggers the processing sketch to alert you in whatever way you require. Maybe not a technically impressive solution but should be pretty quick/simple set up.
BTW - I have a sketch which I use as a starting point for my esp32cam projects which may be of interest if you are new to the esp32cam (and using ArduinoIDE): https://github.com/alanesq/esp32cam-demo
In this you would send such a request with a command in the format:
ip address, page to request, port to use (usually 80), maximum chars to receive
i.e. requestWebPage("192.168.1.100", "/?trigger1", 80, 600);
------
update:
I have modified the Processing sketch (below) so that if you add ?trigger1 or ?trigger2 on the end of the URL it pops up a message confirming the command was received
Code: Select all
import processing.net.*;
String HTTP_GET_REQUEST = "GET /";
String HTTP_HEADER = "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n";
Server s;
Client c;
String input;
void setup()
{
s = new Server(this, 8080); // start server on http-alt
}
void draw()
{
c = s.available();
if (c != null) {
input = c.readString();
input = input.substring(0, input.indexOf("\n")); // Only up to the newline
if (input.indexOf(HTTP_GET_REQUEST) == 0) // starts with ...
{
c.write(HTTP_HEADER); // answer that we're ok with the request and are gonna send html
// reply html
c.write("<html><head><title>Processing demo</title></head><body>\n");
c.write("<h3>Processing trigger from web demo</h3>\n");
c.write("</body></html>\n");
// close connection to client, otherwise it's gonna wait forever
c.stop();
}
// actions triggered by web page request
// trigger by http://localhost?trigger1
if (input.indexOf("?trigger1") > 0) {
javax.swing.JOptionPane.showMessageDialog(null, "trigger 1 received"); // show a popup message
}
// trigger by http://localhost?trigger2
if (input.indexOf("?trigger2") > 0) {
javax.swing.JOptionPane.showMessageDialog(null, "trigger 2 received"); // show a popup message
}
}
}
Who is online
Users browsing this forum: MicroController and 95 guests