Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matter POC for remote Relay #18575

Merged
merged 1 commit into from
May 3, 2023

Conversation

s-hadinger
Copy link
Collaborator

@s-hadinger s-hadinger commented May 3, 2023

Description:

Matter: Proof of Concept for a remote Tasmota relay. This allows to use an ESP32 based Matter device to control a relay from another ESP8266 based Tasmota device, through pure HTTP communication.

This is just a POC without bridged support, which means that adding a remote relay requires to remove the Matter device from the controller and pair it again. In the future, using "bridged" mode should make it possible to dynamically add endpoints.

Parameter: <relay_index>,<url>:

  • <relay_index> contains the index of the relay (0 based, so substract 1 to the actual Relay GPIO number)
  • <url> contains either the IP address (ex: 192.168.1.100) or a full HTTP domain (ex: http://192.168.1.100/)

Example:

image

Also includes a refactoring of the scheduler for the updates of shadow attributes.

Current limitations:

  • a future optimization will be needed in the same remote Tasmota device is used in several endpoints (like multiple relays) so as to group HTTP requests and reduce Wifi traffic
  • add exponential backoff if a device is not reachable (timeout)
  • HTTP client timeout is 1000 ms, it needs to be reduced but it does not seem possible with the current library
  • ideally implement asynchronous web client (not sure it's easy enough)

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.8
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger s-hadinger merged commit c26ec44 into arendst:development May 3, 2023
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.

1 participant