This is meant to be run on a SBC, this will simply do WOL in your network from telegram
- Copy
example.env
to.env
and add your bot token how to obtain bot token. - Copy
devices.example.json
todevices.json
and add your devices macaddr here how you can find that - Get chat id by using command
/id
- Put chatId into
.env
AUTHED_CHAT
- to install :
pnpm install
- to run deving:
ts-node index.ts
- to run forever: use
forever
,pm2
or any other tools
/wake
command will show you buttons and you can wake up a server
/status
command will let you ping an ip
This is good for a Plex setup at home that is sleeping, it may have auto sleep that sleeps the server if disk and network is idle. Telegram is basically used as a proxy to wake it up from a PI or other SBC in your network
index.ts
basically all the codewol.ts
wol code from ts-woldevices.json
an object with key=name and value=macaddr- Example:
[
{
"name": "pc1",
"mac": "00:00:00:00:00:00",
"ip": "192.168.0.1"
},
{
"name": "pc1",
"mac": "00:00:00:00:00:00",
"ip": "192.168.0.2"
}
]