Skip to content

Conversation

@cetygamer
Copy link
Contributor

@cetygamer cetygamer commented Sep 5, 2025

Fixes #1456

Key notes:

  • Sonoff uses custom method of sending an advertisement: by using 0x05 advertisement (Complete list of 32-bit UUIDs) along with the data itself. Added workaround for catching those messages for Sonoff MAC.
  • MAC address for all Sonoff devices is the same: 66:55:44:33:22:11 (AFAIK a lot of ESP32 based devices use this default MAC). So instead of MAC I am using 4-byte Device ID (prepending it with 2 zero bytes) to get unique MAC-like identifier for the integration.
  • Tested on my S-MATE2. I don't have access to R5 or original S-MATE, so it would be great if someone could test those.

References:

Screenshot:

ScreenShot Tool -20250905094822
@cetygamer cetygamer changed the title Add Sonoff S-MATE and R5 switches #1456 Add Sonoff S-MATE and R5 switches Sep 5, 2025
@cetygamer
Copy link
Contributor Author

Hi, @Ernst79. Could you please take a look? I tried my best to provide a complete PR with tests and documentation, ready to be merged.

Copy link
Collaborator

@Ernst79 Ernst79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM. However, two tests seem to fail. Not sure if Altbeacon is using the same UUID?

Ernst79

This comment was marked as duplicate.

Copy link
Collaborator

@Ernst79 Ernst79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altbeacon test now fail. We need to check why. They also use 0xFFFF as identifier

@cetygamer
Copy link
Contributor Author

cetygamer commented Sep 17, 2025

@Ernst79, should be fixed now. Can you re-ran the tests?

Copy link
Collaborator

@Ernst79 Ernst79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thx. They now pass the test

@Ernst79 Ernst79 merged commit 7028af1 into custom-components:master Sep 17, 2025
6 checks passed
@cetygamer cetygamer deleted the sonoff branch September 23, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants