From f403b10f7a42fca7324a66ce168dd7b16ca08658 Mon Sep 17 00:00:00 2001 From: Eddie winter Date: Sat, 6 May 2017 09:21:55 -0700 Subject: [PATCH] MSA-1961: Slingtv app --- .../sony-blu-ray.src/sony-blu-ray.groovy | 77 +++++++++++++++++++ .../slingtv.src/slingtv.groovy | 52 +++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 devicetypes/eddie/sony-blu-ray.src/sony-blu-ray.groovy create mode 100644 smartapps/aenomads63-gmail-com/slingtv.src/slingtv.groovy diff --git a/devicetypes/eddie/sony-blu-ray.src/sony-blu-ray.groovy b/devicetypes/eddie/sony-blu-ray.src/sony-blu-ray.groovy new file mode 100644 index 0000000..7103358 --- /dev/null +++ b/devicetypes/eddie/sony-blu-ray.src/sony-blu-ray.groovy @@ -0,0 +1,77 @@ +/** + * Sony Blu-ray + * + * Copyright 2017 Eddie winter + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and limitations under the License. + * + */ +metadata { + definition (name: "Sony Blu-ray", namespace: "Eddie", author: "Eddie winter") { + capability "Acceleration Sensor" + capability "Buffered Video Capture" + capability "Location Mode" + capability "Media Controller" + capability "Refresh" + capability "Video Stream" + } + + + simulator { + // TODO: define status and reply messages here + } + + tiles { + // TODO: define your main and details tiles here + } +} + +// parse events into attributes +def parse(String description) { + log.debug "Parsing '${description}'" + // TODO: handle 'acceleration' attribute + // TODO: handle 'clip' attribute + // TODO: handle 'mode' attribute + // TODO: handle 'activities' attribute + // TODO: handle 'currentActivity' attribute + // TODO: handle 'stream' attribute + +} + +// handle commands +def capture() { + log.debug "Executing 'capture'" + // TODO: handle 'capture' command +} + +def setMode() { + log.debug "Executing 'setMode'" + // TODO: handle 'setMode' command +} + +def startActivity() { + log.debug "Executing 'startActivity'" + // TODO: handle 'startActivity' command +} + +def refresh() { + log.debug "Executing 'refresh'" + // TODO: handle 'refresh' command +} + +def startStream() { + log.debug "Executing 'startStream'" + // TODO: handle 'startStream' command +} + +def stopStream() { + log.debug "Executing 'stopStream'" + // TODO: handle 'stopStream' command +} \ No newline at end of file diff --git a/smartapps/aenomads63-gmail-com/slingtv.src/slingtv.groovy b/smartapps/aenomads63-gmail-com/slingtv.src/slingtv.groovy new file mode 100644 index 0000000..4e78439 --- /dev/null +++ b/smartapps/aenomads63-gmail-com/slingtv.src/slingtv.groovy @@ -0,0 +1,52 @@ +/** + * slingtv + * + * Copyright 2017 Eddie winter + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and limitations under the License. + * + */ +definition( + name: "slingtv", + namespace: "aenomads63@gmail.com", + author: "Eddie winter", + description: "Slingtv app ", + category: "Convenience", + iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png", + iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", + iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png") { + appSetting "play store" +} + + +preferences { + section("Title") { + // TODO: put inputs here + } +} + +def installed() { + log.debug "Installed with settings: ${settings}" + + initialize() +} + +def updated() { + log.debug "Updated with settings: ${settings}" + + unsubscribe() + initialize() +} + +def initialize() { + // TODO: subscribe to attributes, devices, locations, etc. +} + +// TODO: implement event handlers \ No newline at end of file