Comments (6)
Agreed, that would be cool
from openhab-alexa.
So i have started thinking about this one, my thoughts so far as sample items would be:
Group TestAlarm "Alarm" {alexa="SecurityPanelController"}
String TestAlarmModeCommand "Alarm" (TestAlarm) { alexa="SecurityPanelController.command" [ARMED_AWAY="away",ARMED_STAY="stay",ARMED_NIGHT="night",DISARMED="disarm",pinSupport=true,supportsArmInstant=true] }
String TestAlarmModeState "Alarm" (TestAlarm) { alexa="SecurityPanelController.armState" [ARMED_AWAY="away",ARMED_STAY="stay",ARMED_NIGHT="night",DISARMED="disarm"] }
Switch TestAlarmBurglaryAlarm "Burglary in Alarm" (TestAlarm) {alexa="SecurityPanelController.burglaryAlarm"}
Switch TestAlarmFireAlarm "FIre in Alarm" (TestAlarm) {alexa="SecurityPanelController.fireyAlarm"}
Switch TestAlarmCarbonMonoxideAlarm "Carbon Monoxide in Alarm" (TestAlarm) {alexa="SecurityPanelController.carbonMonoxideAlarm"}
Switch TestAlarmWwaterAlarm "Water in Alarm" (TestAlarm) {alexa="SecurityPanelController.waterAlarm"}
Number TestAlarmExitDelayInSeconds "Exit Delay In Seconds" (TestAlarm) {alexa="SecurityPanelController.exitDelayInSeconds"}
@jsetton didn't know if you had started working on this, I have a rough sketch out of the capabilities and properties, but not much more at this point.
For pin support when sending a command, I was thinking we could append the pin to the command if enabled, so when arming we would send "away:1234" as a string. If there is a better idea, i'm all ears :-)
from openhab-alexa.
Since you had this one assigned to yourself, I left that one last 😄 I was going to aim at range, toggle and time hold capabilities next.
Your sketch looks good. A couple things to note:
-
The group endpoint needs to match the display category. Strange enough, the main documentation that lists all their existing categories isn't up to date. Anyway, the category for this one is
SECURITY_PANEL
. So, the endpoint group should beEndpoint.SecurityPanel
and we will need to add camel case reformatting when handling a group category. -
To handle the difference between alarm mode command and state, we should use the item sensor concept (end of section) I added to accomplish that type of scenario instead of creating an extra non-documented property. This is similar to lock control. Not every users may have two different channels to get current state. So using that concept gives that flexibility.
-
For the arm mode, we should probably allow
Number
item type as well similar to thermostat mode support (e.g.[DISARMED=0, ARMED_STAY=1, ARMED_AWAY=2, ARMED_NIGHT=3]
). -
In regards to the pin code support, I am fine with the format but we would only allow it for
String
item type. I would also call the parametersupportsPinCodes
for consistency purpose. -
For the exit delay workflow, having two separate items will be a pain in the current workflow and also cost an extra rest call. I think we should have a parameter with the delay amount such as
exitDelay=<delay>
and will probably need to append the delay value to the command<mode>:<delay>:<pin>
. Again, this would only be supported withString
item type. The delay would be determined asdirective.payload.isArmInstant == true ? 0 : (parameter.exitDelay || 0)
Here is my revise sketch:
Group TestAlarm "Alarm" {alexa="SecurityPanel"}
String TestAlarmMode "Alarm" (TestAlarm) {alexa="SecurityPanelController.armState" [ARMED_AWAY="away",ARMED_STAY="stay",ARMED_NIGHT="night",DISARMED="disarm",exitDelay=300,supportsArmInstant=true,supportsPinCodes=true,itemSensor="TestAlarmModeStatus"]}
String TestAlarmModeStatus "Alarm Status" (TestAlarm)
Switch TestAlarmBurglaryAlarm "Burglary in Alarm" (TestAlarm) {alexa="SecurityPanelController.burglaryAlarm"}
Switch TestAlarmFireAlarm "Fire in Alarm" (TestAlarm) {alexa="SecurityPanelController.fireAlarm"}
Switch TestAlarmCarbonMonoxideAlarm "Carbon Monoxide in Alarm" (TestAlarm) {alexa="SecurityPanelController.carbonMonoxideAlarm"}
Switch TestAlarmWaterAlarm "Water in Alarm" (TestAlarm) {alexa="SecurityPanelController.waterAlarm"}
from openhab-alexa.
Thank @jsetton for the feedback, going to work on this today.
from openhab-alexa.
At this point, I would say you should wait for my refactoring PR. Although you can start thinking about the logic 😄 but a lot of the enhancement I added will make this very easy to implement. I am aiming to get the PR out by the end of the day.
from openhab-alexa.
Sounds good, I definitely have other things to work on. If you already have this thought through or think it would be easier for you to incorporate , feel free to take it.
from openhab-alexa.
Related Issues (20)
- feature request: support personal profiles HOT 3
- Thermostat Setpoints Not Allowed Above 100 Degrees HOT 3
- Arabic Language Support HOT 2
- Window Covering Rollershutter Item No Control Page in Alexa App HOT 1
- missing several display categories HOT 2
- Window Covering Rollershutter percentage values are inverted HOT 1
- Cooking Device Capabilities Support
- Dimmer percentage commands broken HOT 2
- Support remote video player interface HOT 2
- Television device not discovered if Channel item type is string HOT 4
- Adding transitional states to Custom Semantic Catalog HOT 2
- Can say "Light On" but not "Fan Medium" in an Alexa group without full thing name "Bedroom Fan Medium" HOT 2
- Keep getting [Error]: CliError: The CloudFormation deploy failed for Alexa region "default": Access Denied HOT 6
- AlexaSkillFunction[AWS::Lambda::Function] CREATE_FAILED HOT 1
- MainUI How To Examples
- "message": "Required parameter(s) missing in the request." HOT 4
- The Command "Stop" does not stop the Rollershutter in German HOT 1
- Television.Channel - Mapping names to number not working HOT 1
- devices discovery is terminated without new devices HOT 3
- Fail to deploy (skill not found) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openhab-alexa.