As of: 4th May 2024 ... This entire walkthrough for WOL using D1 mini works a treat AND using JSON V7 (even though the readme states V5 and not V6). All compiled absoutely fine and uploaded. Telegram worked straight away. THANK YOU!!!! amazing tutorial :D
@UnexpectedMaker
5 жыл бұрын
9k subs! Congrats mate!
@BrianLough
5 жыл бұрын
Thanks! And congrats on passing 6k!
@karinyafields9651
5 жыл бұрын
I just set the bios setting for wake on mains power restore to on so that when the mains power is turned on my PC starts up. Then I have a sonoff wifi wall socket that I can remotely turn on via the app on my phone. Then I can remote to my computer via google remote desktop or teamview to do what I need. Need to add that I have Windows PC's and it works for all of them. Cool idea, thanks for the video. Regards, Matthew
@TheJay6621
5 жыл бұрын
That's cool
@doniorlando167
Жыл бұрын
Hello friends, for now the code for sending to telegram doesn't work, would you please update it? Thank you
@TheDefpom
5 жыл бұрын
Macs have a wake on lan option built into the energy saver preferences
@andymouse
5 жыл бұрын
Clear and concise ....cheers!
@BrianLough
5 жыл бұрын
Cheers Andy!
@jerril42
5 жыл бұрын
Thanks Brian. Great video. Good to see you getting going again, I look forward to your videos (for instance that keyboard macro thingy, that sounded cool too). Take care.
@mveldt
5 жыл бұрын
Nice project. Think the driver setting is just the setting to not signal the network card too turn off when shutting down. I always check if network lights keep on when pc is off, that's mostly the indication it's still listening. Not all network hardware acts the same.
@ChunkySteveo
5 жыл бұрын
Nice little tutorial Brian! Great stuff.
@MertC.-xo4ie
4 ай бұрын
My BIOS has WoL. I can also set the Power settings to magic packet only. But under advanced -> Property I can no find Wake on Magic Packet. Is there a way to fix this?
@danielegalluccio40
Ай бұрын
I don't know if you still read these comments, but requiring a password from the user before using the /wol command could be useful, everyone who knows the bot name could turn on your devices.
@BrianLough
Ай бұрын
The best way to handle this is to check the telegram id of who sends the message, and only allow specified people do it
@yusufensarbalc6221
3 ай бұрын
ESP8266WiFi.h: No such file or directory i have a esp 32 and im getting this error what should i do?
@michaelknauth943
5 жыл бұрын
I only use WoL to wake my devices when they're powered off. Waking from a powered off state has nothing to do with OS settings. Something you can try is to use a WoL app (Windows, Linux or Phone) to isolate the issue. I use Fing on my phone, and a standard WoL tool on Linux to reliably wake PCs, laptops and NASs. It's important to note that Apples do not support WoL from a powered off state. If the tools work to wake your device from powered off, I'd be looking at the library for tweaks - maybe something as simple as sending 3 WoL packets.
@michaelknauth943
5 жыл бұрын
Forgot to add that it needs to be performed on a cabled network device, not a wireless adapter.
@BrianLough
5 жыл бұрын
So I haven't dug into it a huge amount, but from brief looking it seemed to be it was a Windows thing. From the wake on LAN wiki: "The ability to wake from a hybrid shutdown state (S4) or a fully powered off state (S5) is unsupported in Windows 8 and above" ... "This is because of a change in the OS behavior which causes network adapters to be explicitly not armed for WOL when shutdown to these states occurs. WOL from a sleep state (S3) or non-hybrid hibernation state (S4) is supported." So as I said, I'm not sure, but that's what I based it on
@NIKOLA_KOLOSOV
5 жыл бұрын
I have the same problem, i can not wake up my pc when it completely off. This is not windows problem, i use linux. I think it is not OS problem. OS not working when your PC is turned off or in sleep mode. I think it is bios/hardware bug/feature.
@youtoeric
Жыл бұрын
I found a problem. It shows "Compilation error: 'sendWOL' is not a member of 'WakeOnLan'" 5:23 If someone could help me. Thanks.
@very9000
Жыл бұрын
Hi 🤝 help please. How to configure wake up from sleep mode? I found the entrance through the iPhone in the browser, but how to exit to set the time and he woke up?
@josharafol450
2 жыл бұрын
I have a question about this. Can this work by just having a external power switch and will automatically send packet in wake on lan thing. I want to power on my pc by having to just press an external button like a mechanical switch from a mechanical keyboard or something.
@forgottenone1973
3 жыл бұрын
To be able to wake a completely shut down computer with Win10 you can try to find "S5Wake" with regedit and set it to "1".
@bikerboys1106
Жыл бұрын
damn thx. its a bit slow but tha doesnt matter
@TheDefpom
5 жыл бұрын
Nice
@very9000
Жыл бұрын
Привет 🤝 помоги, пожалуйста. Как настроить выход из спящего режима ? Вход через айфон в браузере нашел, но как выйти, чтобы поставить время и он проснулся ?
@AndyCallaway
5 жыл бұрын
Some computers have a Power On Lan option, but it's in the BIOS. It's pretty rare though, I think.
@HolyGarbage
5 жыл бұрын
Rare? I built the same thing with an Arduino MKR1000 recently and I managed to boot up every single computer in my household and their mothers. (1 desktop, 1 server/NAS, and 2 laptops). I thought it was just standard in most motherboards.
@AndyCallaway
5 жыл бұрын
@@HolyGarbage Maybe - I haven't looked recently TBH. I only remember when we were ordering new desktops at work we had to specify this function otherwise it wouldn't be included. Mind you, this was at least 15 years ago, so my information is out of date.
@cghera
Жыл бұрын
I am not so knowledgeable on arduino. Do I need just an ESP8266 for all this to work ? Or this module needs a base arduino board to work?
@blackrat9712
Жыл бұрын
u just need the esp
@ragavansuresh5035
4 жыл бұрын
Thank you!
@demioss4014
5 жыл бұрын
So pewdiepie gave you a shoutout congrats :)
@makmakmp
2 жыл бұрын
Hello thanks for this tutorial!!! Code in arduino keeps crashing in "WakeOnLan::sendWOL(computer_ip, UDP, devices[index].mac, sizeof devices[index].mac);" with the error message : 'sendWOL' is not a member of 'WakeOnLan'. Any advise will be appreciated!!
@chuchumb3r918
Жыл бұрын
got the same problem, got a solution ?
@federicoferrara125
5 жыл бұрын
client.setInsecure(); mi dice che class axTLS::WiFi client secure has no member named 'set insecure'.Che devo fare grazie
@BrianLough
5 жыл бұрын
Try comment that line out, it's only for esp8266 version 2.5 or higher
@federicoferrara125
5 жыл бұрын
ok grazie
@federicoferrara125
5 жыл бұрын
Ho riprovato e alla riga client.setInsecure() mi da' errore class axTLS::WiFi client secure has no member named 'set insecure'.
@federicoferrara125
5 жыл бұрын
Ecco lo sketch :// ---------------------------- // Standard Libraries - Already Installed if you have ESP8266 set up // ---------------------------- #include #include #include // ---------------------------- // Additional Libraries - each one of these will need to be installed. // ---------------------------- #include // Library for sending the WOL magic packet // Needs to be installed from GitHub // github.com/koenieee/WakeOnLan-ESP8266 #include // Library for interacting with the Telegram API // Search for "Telegegram" in the Library manager and install // The universal Telegram library // github.com/witnessmenow/Universal-Arduino-Telegram-Bot #include // Library used for parsing Json from the API responses // NOTE: There is a breaking change in the 6.x.x version, // install the 5.x.x version instead // Search for "Arduino Json" in the Arduino Library manager // github.com/bblanchon/ArduinoJson // ---------------------------- // Replace the following! // ---------------------------- char ssid[] = "SSID"; // your network SSID (name) char password[] = "password"; // your network password // Get from the "botFather" on telegram #define TELEGRAM_BOT_TOKEN "12345679:XXXXXXXXXXXXXXXXXXXXXXXXXXXX" struct targetDevice { byte mac[6]; //The targets MAC address String deviceName; }; // Add or remove devices from this list // To get mac address On windows, // - open cmd // - type "ipconfig /all" // - copy the value for "physical address" (highlight and right click to copy) targetDevice devices[] ={ {{ 0xBC, 0x5F, 0xF4, 0xFF, 0xFF, 0xFF }, "Old PC"}, //BC-5F-F4-FF-FF-FF {{ 0x04, 0xD9, 0xF5, 0xFF, 0xFF, 0xFF }, "New PC"} //04-D9-F5-FF-FF-FF }; // Change to match how many devices are in the above array. int numDevices = 2; //------- ---------------------- ------ WiFiUDP UDP; /** * This will brodcast the Magic packet on your entire network range. */ IPAddress computer_ip(255,255,255,255); void sendWOL(); // This is the Wifi client that supports HTTPS WiFiClientSecure client; UniversalTelegramBot bot(TELEGRAM_BOT_TOKEN, client); int delayBetweenChecks = 1000; unsigned long lastTimeChecked; //last time messages' scan has been done void setup() { Serial.begin(115200); // Set WiFi to station mode and disconnect from an AP if it was Previously connected WiFi.mode(WIFI_STA); WiFi.disconnect(); delay(100); // attempt to connect to Wifi network: Serial.print("Connecting Wifi: "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(500); } Serial.println(""); Serial.println("WiFi connected"); Serial.print("IP address: "); Serial.println(WiFi.localIP()); // Required on 2.5 Beta or above. client.setInsecure(); XXXXXXXXXX questa e' la riga dove mi da' l'erroreXXXXXXXX // longPoll keeps the request to Telegram open for the given amount of seconds if there are no messages // This hugely improves response time of the bot, but is only really suitable for projects // where the the initial interaction comes from Telegram as the requests will block the loop for // the length of the long poll bot.longPoll = 60; UDP.begin(9); } void handleNewMessages(int numNewMessages) { for (int i = 0; i < numNewMessages; i++) { // If the type is a "callback_query", a inline keyboard button was pressed if (bot.messages[i].type == F("callback_query")) { String text = bot.messages[i].text; Serial.print("Call back button pressed with text: "); Serial.println(text); if (text.startsWith("WOL")) { text.replace("WOL", ""); int index = text.toInt(); Serial.print("Sending WOL to: "); Serial.println(devices[index].deviceName); WakeOnLan::sendWOL(computer_ip, UDP, devices[index].mac, sizeof devices[index].mac); } } else { String chat_id = String(bot.messages[i].chat_id); String text = bot.messages[i].text; if (text == F("/wol")) { // Keyboard Json is an array of arrays. // The size of the main array is how many row options the keyboard has // The size of the sub arrays is how many coloums that row has // "The Text" property is what shows up in the keyboard // The "callback_data" property is the text that gets sent when pressed String keyboardJson = "["; for(int i = 0; i< numDevices; i++) { keyboardJson += "[{ \"text\" : \"" + devices[i].deviceName + "\", \"callback_data\" : \"WOL" + String(i) + "\" }]"; if(i + 1 < numDevices){ keyboardJson += ","; } } keyboardJson += "]"; bot.sendMessageWithInlineKeyboard(chat_id, "Send WOL to following devices:", "", keyboardJson); } // When a user first uses a bot they will send a "/start" command // So this is a good place to let the users know what commands are available if (text == F("/start")) { bot.sendMessage(chat_id, "/wol : returns list of devices to send WOL to ", "Markdown"); } } } } void loop() { if (millis() > lastTimeChecked + delayBetweenChecks) { // getUpdates returns 1 if there is a new message from Telegram int numNewMessages = bot.getUpdates(bot.last_message_received + 1); if (numNewMessages) { Serial.println("got response"); handleNewMessages(numNewMessages); } lastTimeChecked = millis(); } }
@sharukhrahman7925
3 жыл бұрын
How to make it work on shutdown?
@NIKOLA_KOLOSOV
5 жыл бұрын
I want to make device (esp+relay) and connect relay to power button wires. This solution will fix problem to turn on PC when it completely turned off.
@karinyafields9651
5 жыл бұрын
See my comment above for how I do it.
@NIKOLA_KOLOSOV
5 жыл бұрын
@@karinyafields9651 It is a good solution, but it is not what I actually want to do)
@xlarin
5 жыл бұрын
Thank you
@viniciusnoyoutube
5 жыл бұрын
Cool.
@doc3824
3 жыл бұрын
not working anymore :-( My bad, it works . Must be some telegram downtime ...
@RaccoonTech
Жыл бұрын
Bro, it's a little silly) You haven't even done a security check in the telegram bot!) Your computer can turn on any user in telegram if you send him this command! Make a check on the user ID in telegram!
@RaccoonTech
Жыл бұрын
and error, after run your code: 🥱 error: 'sendWOL' is not a member of 'WakeOnLan' 140 | WakeOnLan::sendWOL(computer_ip, UDP, devices[index].mac, sizeof devices[index].mac);
@RaccoonTech
Жыл бұрын
p.s. all libraries installed and included...
@Linuxe_d
3 жыл бұрын
me who is gonna directly hook esp32 to motherboard to make it restart and wake up . Disclaimer: WOL is not a feature on my pc
@_________________404
3 жыл бұрын
lol
@eddie6584
2 жыл бұрын
I'm confused how the ESP8266 is actually connected to the PC?
@dontlookatmyname5439
Жыл бұрын
its not connected to the pc, its connected to the wireless network, thats why it needs the network ssid and password. The pc for the most part is off but after enabling the settings the network interface card is on a low power mode so it can listen for the magic packet that is sent over the network.
@natesmith3844
2 ай бұрын
@@dontlookatmyname5439 so it is a WOL, which is purely done through the WiFi?
@MrREIVAX2
4 жыл бұрын
no funciona ha dejado de funcionar
@robnickmans4600
4 жыл бұрын
The Wemos clone isn't available anymore on Aliexpress. Can you give me an alternative link?
@Iamroot1492
4 жыл бұрын
how to do it in Linux? thanks.
@BrianLough
4 жыл бұрын
Sorry Benny I'm not sure, just Google wake on Lan and your distro and you should find plenty of stuff
Пікірлер: 62