I am trying to Intergrate some sercomm icamera 2c on my dashboard. I found a driver that looks like it would do the job. The problem is after adding the virtual video device, I can no longer edit that device or get to the devices page. I click on devices, and when I click on the virtual video driver, it just sits like it is trying to load the page, but it never loads. I click on my dashboard, and it will not load. I tried to remove the driver, but it says it is in use. But I cannot delete the virtual video driver device. HALP! I put the driver code in so anyone that is an expert may be able to help. I am by no means an expert and am just getting started with Hubitat.
Thank you
/**
* Virtual Video driver
*
* Copyright 2018 Chris Wilson
*
* 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.
*
*
*
*
*/
preferences {
input "video1", "text", title: "URL 1", description: "urL 1", required: true, displayDuringSetup: true
input "video2", "text", title: "URL 2", description: "URL 2", required: true, displayDuringSetup: true
}
metadata {
definition (name: "Virtual Video Driver", namespace: "cw", author: "cwwilson08") {
capability "Switch"
attribute "video", "text"
attribute "video2", "text"
}
}
def on() {
sendEvent(name: "motion", value: "active")
sendEvent(name: "switch", value: "on")
sendEvent(name: "video", value: "<iframe type=\"text/html\" frameborder=\"0\" width=\"480\" autoplay=\"true\" height=\"394\" src= \"${video1}\" allowfullscreen allowautoplay></iframe>")
sendEvent(name: "video2", value: "<iframe type=\"text/html\" frameborder=\"0\" width=\"480\" autoplay=\"true\" height=\"394\" src= \"${video2}\" allowfullscreen allowautoplay></iframe>")
}
def off() {
sendEvent(name: "switch", value: "off")
}
def installed() {
on()
}
9