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

Lightweight support for multiple edge devices #563

Closed
ivelin opened this issue Feb 17, 2021 · 2 comments · Fixed by #757
Closed

Lightweight support for multiple edge devices #563

ivelin opened this issue Feb 17, 2021 · 2 comments · Fixed by #757
Assignees
Labels
enhancement New feature or request released wontfix This will not be worked on

Comments

@ivelin
Copy link
Contributor

ivelin commented Feb 17, 2021

Is your feature request related to a problem? Please describe.
It is currently not possible to manage multiple ambianic edge devices via the UI PWA.

The workaround is for users to keep separately a list of Edge Device IDs and plug them in the UI each time they want to connect to a single device via the PWA.

It is a commonly requested capability to be able to manage multiple edge devices via the PWA. Users expect to use 3-5 edge devices to cover key areas of an average household.

Describe the solution you'd like
There is currently an open issue for simultaneous timeline feed and management of multiple edge devices. However we realized that it will be an involved process that spans the webrtc and UI layers.

We can take a meaningful step in that direction, by implementing a lightweight version of multi-device management. The idea is to keep the webrtc and UI layers mostly unchanged. The UI will continue to actively work with one edge device at at a time, but it will be able to switch between multiple known/managed devices.

The UI would allow the user to add another device, but under the hood, the UI will simply save the latest state of the currently managed device (if any) and continue to add a new device with the same UI flow as adding the very first managed device.

Once the user has added more than one managed devices, they can switch between them.

The logic for switching between two known devices would be essentially the same as connecting to a new Remote Peer ID (edge device).

There will be some changes required to accomodate local discovery of multiple devices on the same WiFi network. The webrtc peer management layer (pnp) would now have to be aware of previously discovered local devices. Instead of connecting to the first non-self peer found in the local peer room, the logic would now have to do a couple of steps:

  1. Remove from the local peer room candidates any previously saved peer IDs.
  2. From the remaining candidates, find the first that presents itself as a proper ambianic edge device. Ignore other peers such as other ambianic UI apps running on the same wifi at the time of discovery. This step is will also close this pending issue.

Describe alternatives you've considered
A more sophisticated implementation would allow simultaneous active connections with multiple devices, which webrtc supports. Including a single timeline view with merged events from all managed edge devices. This is essentially the goal we are moving towards: #408.

In this interim step, the timeline will only show events from one device. It will simply refresh each time a new device is added or the user switches between known devices. The behavior will be consistent with the current way a connects to an alternative edge device. Only now they will have the option to pick from a list of known devices instead of manually entering the remote id of the device they want to switch to.

Ambianic UI Multiple Edge Device Management

@stale
Copy link

stale bot commented Oct 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 11, 2021
ivelin pushed a commit that referenced this issue Nov 3, 2021
Closes #757 
Closes #758 
Closes #753
Closes #741 
Closes #711 
Closes #705 
Closes #660 
Closes #659 
Closes #601 
Closes #595 
Closes #589 
Closes #563 
Closes #408 
Closes #370 
Closes #329 
Closes #327 
Closes #302 
Closes #299
github-actions bot pushed a commit that referenced this issue Nov 3, 2021
# [2.21.0](v2.20.0...v2.21.0) (2021-11-03)

### Features

* manage multiple edge devices in PWA ([#757](#757)) ([72f72ba](72f72ba)), closes [#758](#758) [#753](#753) [#741](#741) [#711](#711) [#705](#705) [#660](#660) [#659](#659) [#601](#601) [#595](#595) [#589](#589) [#563](#563) [#408](#408) [#370](#370) [#329](#329) [#327](#327) [#302](#302) [#299](#299)
@ivelin
Copy link
Contributor Author

ivelin commented Nov 3, 2021

🎉 This issue has been resolved in version 2.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ivelin ivelin added the released label Nov 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants