For building this project, there is only really two steps:
- Import the flows.json into the existing NodeRed setup
- Configure the NodeRed Alexa blocks and telegram blocks
- Configure the IP addresses of the Wake on LAN and TCP blocks
- Change the IP and port number of the main.py script to match your preference and PC.
- Change "PROJECT_PATH" variable as well to have the log file log in the wanted directory
- Modify the runSOLScript.bat to point to the repository main.py python script and the python executable
- Setup Virtual Environment and install requirements.txt
- Setup Task Scheduler to run the main.py the runSOLScript.bat on boot
- Enable Wake on LAN in BIOS and Windows; when doing this it is recommended to have wake on a magic packet to prevent accidental pings waking up the PC
For understanding how to use the Task Scheduler, please follow the link listed below:
C:\Users\smgib_161\AppData\Local\Programs\Python\Python312\python.exe -m venv ./.venv # Hate windows :(
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
In order to set up the wake on LAN correctly, you will need to change the BIOS settings alongside the windows settings. The snippets below are for Windows 10 and the ASUSPX979.
Sometimes the PC will not respond properly to WoLAN Packets, this could be causes by the PC entering hibernation. This is a kind of deep sleep in which the PC wont respond to the packets to prevent it follow this screenshot:
Another feature that might interrupt the sleep Link State Power Management. It can be disabled by doing the following:
Another recommended thing I found was to disable the power off hard drive feature
Read the conversation here
Another settings that may need to be set in Windows is the NetBIOS over TCP/IP settings it can be done through advanced TCP/IP Settings:
Some people on reddit reported that their network had to be set to private in order for the wake on LAN packet to work:
When setting the network to private I noticed that the firewall prevented the TCP port from opening and thus I had to make a rule to allow connections on that port:
Finally, another reddit post reported that the wake on LAN packet was not being sent due to the router forgetting the IP address, this shouldnt happen as my PC was set to static in the router settings. However you can broadcast it to everything on the network at 255.255.255.255
.