this post was submitted on 18 Feb 2024
79 points (97.6% liked)

homeassistant

11878 readers
1 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
 

I've had a laptop that I've never been able to get WoL (Wireless or otherwise) to work, no matter what I tried. Recently realized that the Bluetooth keyboard I used was able to wake it with a key press though.

I searched and found an ESP Home project that will make an ESP32 emulate a Bluetooth keyboard - https://github.com/dmamontov/esphome-blekeyboard

Now for $6 of hardware, I can wake my Laptop up remotely via HA, whenever needed. Definitely recommended!

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 24 points 8 months ago (3 children)

I must be too old school because my first thought when i read this was “with an old solenoid lying around and a few lines of code, an AtTiny could strike a key on the bluetooth keyboard, waking the laptop!

[–] [email protected] 7 points 8 months ago* (last edited 8 months ago) (1 children)

You could ditch the solenoid and use a ATMega32u4 that can act as a HID device to send a keypress signal.

[–] [email protected] 6 points 8 months ago (1 children)

I'm mildly surprised OP's laptop keeps the bluetooth radio powered up while asleep, but I would be a lot more surprised to find one that doesn't work with USB HID.

[–] [email protected] 2 points 8 months ago

I was a little surprised as well, but I think it's because the keyboard / mouse I use (and the ESP32) all use Bluetooth LE specifically.

I looked at USB solutions first actually, but then decided to try ESP Home solution since I was already familiar with the system.

[–] [email protected] 4 points 8 months ago (1 children)

I definitely thought about trying something physical like that too, but mostly as a fallback plan!

[–] [email protected] 4 points 8 months ago* (last edited 8 months ago)

My thoughts were a switchbot, for a non diy version. You put the bot on the laptop power button or keyboard.

[–] CameronDev 2 points 8 months ago

I was thinking of using an electro magnet to trigger the lid switch. Maybe we are just fans rube goldberg setups :D

[–] [email protected] 10 points 8 months ago

Have you tried

[–] [email protected] 8 points 8 months ago (1 children)

Simpler: use a smart wallplug, configure your bios to always start after powerloss.

[–] [email protected] 5 points 8 months ago (1 children)

I actually tried something like this, the laptop BIOS didn't have any settings to tweak for A/C power changes. However, it does wake from sleep after plugging in. The issue is, it immediately goes back to sleep (within seconds). Tried quite a few things to try to stop that behavior (e.g. running Power Toys Awake) but had no luck.

So that's when I switched to ESP Keyboard.

[–] [email protected] 3 points 8 months ago (1 children)

Ah yes, because it's a laptop, I know lots of desktop have the option tho.

[–] [email protected] 3 points 8 months ago

I think most laptop’s still have the option of whether to boot or not when you plug them in with a dead battery.

[–] [email protected] 7 points 8 months ago (1 children)

Why did you need final fantasy's Warrior of Light to wake up your laptop?

[–] [email protected] 2 points 8 months ago

Allagans secretly powering Home Assistant

[–] [email protected] 5 points 8 months ago (1 children)

That is for waking from sleep, or from shutdown?

[–] [email protected] 6 points 8 months ago* (last edited 8 months ago)

Oh yeah I should have specified this is to wake from sleep, not a complete shutdown. So not a complete replacement for WoL.

[–] [email protected] 2 points 8 months ago

Wire the power switch to a transistor and ESP