NEEOInc / neeo-sdk

NEEO Brain SDK
https://neeoinc.github.io/neeo-sdk/
MIT License
48 stars 17 forks source link

Control Feature Enhancement #157

Closed carp3-noctem closed 5 years ago

carp3-noctem commented 5 years ago

Hey Team NEEO, is it possible to code teh following Features with the SDK? If so, did i miss it somewhere? If not, is it possible to implement them?

If further Informations should be required, let me know.

pfiaux commented 5 years ago

Long press Short answer is it's not implemented at the moment, the long answer is

Conditions Not sure what you mean here. Can you give more details?

Reading values You could use the action forwarding to read some values: https://github.com/NEEOInc/neeo-sdk-examples/tree/master/scripts/forwardaction

Currently the SDK doesn't expose device/sensor information, but that could be done similar to the recipe code (the other scripts example)

carp3-noctem commented 5 years ago

Long Press would be good to see all use cases available ;-) If you can assign them in the sdk and a user doesn't like the command, he should be also able to change it via the Menu. This should also be possible for IR Command sets and all other available devices (e.g. when using TV recipe, user can define to hold down the Menu button to activate the Ceiling lights - a specific scenarion)

Conditions I've seen that this is allready possible, when the values are delivered to NEEO as a sensor (e.g. Powerstate) thats what i mean, but i was unable to link the sensor value to this feature.

Reading Values OK, forward action is one way to fullfill something, but i personaly try to avoid this feature for SDK drivers, as this needs Configuration from user and also another step when using SDK Drivers. With the look towards SDK DRivers running on the Brain, also sensor values should be readable from an Driver (e.g. Temparature (from available devices), Powerstate, Sun Intensity, ...) I know that this require an expose from all available values at an endpoint, but it would be great to have it and use it for automation routines (e.g. If Sunintensity at location (Sensor Balcony) is higher then (value 60) then Perform action (close of shutter/ blind)

pfiaux commented 5 years ago

You have to use a special call for the power state: https://neeoinc.github.io/neeo-sdk/#lib-device-devicebuilder.js-addpowerstatesensor If you already have a switch you use for power on/off you should be able to pass the same controller function to the power state to get the desired outcome.

To push the notifications from SDK to Brain you have to combine it with https://neeoinc.github.io/neeo-sdk/#lib-device-devicebuilder.js-registersubscriptionfunction

pfiaux commented 5 years ago

I created #160 as a follow up for the sensors, we're already tracking custom mappings like for the MENU button internally (the feature would be needed in the firmware first).