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

Filter connected devices by its type #5

Open
murilopolese opened this issue Aug 29, 2018 · 0 comments
Open

Filter connected devices by its type #5

murilopolese opened this issue Aug 29, 2018 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers nodejs Nodejs SDK python Python SDK

Comments

@murilopolese
Copy link
Contributor

Instead of filtering out all the available/connected devices every time it would be good to have a method that returns all the devices of a specific type and get the first available device from a type.

Something like:

// List all available motion sensors
DeviceManager.listMotionSensors()
.then((devices) => {
  console.log(devices.lenght, 'motion sensors were found')
});
// Get first available motion sensor
DeviceManager.getMotionSensor()
.then((msk) => {
  console.log('motion sensor found');
});
# List all available motion sensors
devices = list_motion_sensors()
#  Get first available motion sensor
msk = get_motion_sensor()
@murilopolese murilopolese added enhancement New feature or request python Python SDK nodejs Nodejs SDK good first issue Good for newcomers labels Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers nodejs Nodejs SDK python Python SDK
Projects
None yet
Development

No branches or pull requests

1 participant