Skip to content

Add support for SecureOn password#38

Merged
remcohaszing merged 4 commits into
remcohaszing:mainfrom
mib1185:add-secureon-password-support
May 24, 2026
Merged

Add support for SecureOn password#38
remcohaszing merged 4 commits into
remcohaszing:mainfrom
mib1185:add-secureon-password-support

Conversation

@mib1185
Copy link
Copy Markdown
Contributor

@mib1185 mib1185 commented May 22, 2026

This adds support for adding a SecureOn password to the magic packet. The password is provided after a / as delimiter (so the mac and password are a tuble). The main intention is to add support for WoL with SecureOn password to Home Assistant.

@remcohaszing
Copy link
Copy Markdown
Owner

Thanks! This looks great!

CI fails, because the GitHub actions were outdated. I fixed this in the main branch. You can resolve this by updating your branch.

My only concern is that I don’t have the hardware to test this. The tests use mocks. They are great for catching regressions, but they don’t prove the functionality actually works. Did you test this by waking up an actual machine that uses SecureOn?

@mib1185
Copy link
Copy Markdown
Contributor Author

mib1185 commented May 24, 2026

Hi @remcohaszing
I've update the branch and resolved the merge conflict in the readme.
I don't have a device supporting SecureOn, so I derived the implementation based on the description on wikipedia and from this WakeOnLan java implementation. But I can ask the creator of the original feature request to test it with a real device.

EDIT:
I asked for testing in https://github.com/orgs/home-assistant/discussions/3845#discussioncomment-17042401

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (649aa42) to head (4983732).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #38   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           43        55   +12     
  Branches        14        23    +9     
=========================================
+ Hits            43        55   +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@erkr
Copy link
Copy Markdown

erkr commented May 24, 2026

Is there a stand alone version that I can use the test it with a real device?!

@mib1185
Copy link
Copy Markdown
Contributor Author

mib1185 commented May 24, 2026

Hi @erkr
you could checkout the branch https://github.com/mib1185/pywakeonlan/tree/add-secureon-password-support, than install it via poetry install (you may need first to install poetry via pip install poetry) and finally use the cli version like:

wakeonlan <mac-address>/<secureon-hex-password>

example: wakeonlan 00:00:1c:ab:cd:ef/aa:bb:cc:dd:ee:ff

@remcohaszing
Copy link
Copy Markdown
Owner

Since it’s also a standalone script with no dependencies, you could even just download and run https://github.com/mib1185/pywakeonlan/blob/add-secureon-password-support/wakeonlan/__init__.py directly if that’s easier for you.

@mib1185
Copy link
Copy Markdown
Contributor Author

mib1185 commented May 24, 2026

@erkr In which format is the password configured on the device? as a 6 character long string or as hex?

@erkr
Copy link
Copy Markdown

erkr commented May 24, 2026

I will give that a try on my PC

@erkr
Copy link
Copy Markdown

erkr commented May 24, 2026

@erkr In which format is the password configured

as 6 hex characters (standard magical packet plus 6 bytes)

@mib1185
Copy link
Copy Markdown
Contributor Author

mib1185 commented May 24, 2026

so from a UX perspective it would be ok to ask the user entering the SecureOn password in a format like a mac address (eq. ff:ff:ff:ff:ff:ff or ffff.ffff.ffff or ffffffffffff)?

@remcohaszing
Copy link
Copy Markdown
Owner

I think it would be better to ask for the password as regular characters, so ff:ff:ff:ff:ff:ff/passwd.

But this is my gut feeling. Do we have another tool that uses a similar way to format the tuple/password?

From an API perspective it may even be better to support a tuple in addition to a slash-separated string.

The string format would still be nice for the CLI interface.

@erkr
Copy link
Copy Markdown

erkr commented May 24, 2026

Since it’s also a standalone script with no dependencies, you could even just download and run

@remcohaszing Thanks, that was manageable for me :-)

@mib1185 Initially I thought it was failing, but once I added the broadcast IP argument it worked !

python __init__.py -p 54123 ec:43:f6:aa:78:6a/35:20:ef:32:56:c6 -i 192.168.178.255

logged:

WoL: 192.168.178.211 wakes COBRA

Nice job!

@erkr
Copy link
Copy Markdown

erkr commented May 24, 2026

I think it would be better to ask for the password as regular characters, so ff:ff:ff:ff:ff:ff/passwd.

No, that won't work as SecureOn allows for 6 arbitrary HEX values (Exactly the same format as the MAC)
Mine is 35:20:ef:32:56:c6

@remcohaszing
Copy link
Copy Markdown
Owner

Thanks! I really appreciate both the PR and the feedback ❤️

@remcohaszing remcohaszing merged commit 990a61b into remcohaszing:main May 24, 2026
15 checks passed
@mib1185 mib1185 deleted the add-secureon-password-support branch May 24, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants