Dette er en intergrasjon laget av en tredjepart. Vi har dessverre ingen support på dette.
Support:
Problemet med feilmåling for Eva Apex smart 16A-pluggen til Samsung Smartthings skyldes at applikasjonen legger til pluggen som feil type. Ved å logge inn på smartthings-kontoen i 'mine enheter'-fanen kan du endre den til 'Zigbee Metering Plug', så vises både wattmåling og strømforbruk korrekt.
Førstegangsinstallasjon for å parre Eva Apex Smart plug med SmartThings
- Login på Groovy sidene til SmartThings huben
- Velg «My Device Handlers»
- Klikk på «Create New Device Handler»
- Velg “From Code”
- Lim inn koden nedenfor, trykk «Save» og «publish – for me»
- Gå inn på «My Devices»
- Velg enheten fra listen og klikk på «Edit»
- Velg «Apex Smart Plug 16A» fra nedrykkslisten
- Klikk på update
/**
* Copyright 2021 Thorsteinn Tomas Broddason
*
* 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: "Apex Smart Plug 16A", namespace: "steinibrodda", author: "Thorsteinn Tomas Broddason", ocfDeviceType: "oic.d.switch", runLocally: true, minHubCoreVersion: '000.019.00012', executeCommandsLocally: true, genericHandler: "Zigbee") {
capability "Actuator"
capability "Configuration"
capability "Refresh"
capability "Power Meter"
capability "Sensor"
capability "Switch"
capability "Health Check"
// Apex
fingerprint profileId: "0104", inClusters: "0000, 1000, 0402, 0003, 0009, 0B04, 0006, 0004, 0005, FEE1, FEED", outClusters: "0000, 0019, 000A, 0003, 0406", manufacturer: "Datek Wireless", model: "ELKO1", deviceJoinName: "Apex 16A Switch" //Aurora Smart Inline Relay
}
tiles(scale: 2) {
multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
tileAttribute ("power", key: "PRIMARY_CONTROL") {
attributeState "power", label:'${currentValue} W'
}
tileAttribute ("device.switch", key: "SECONDARY_CONTROL") {
attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#00A0DC", nextState:"turningOff"
attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#00A0DC", nextState:"turningOff"
attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
}
}
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
}
main "switch"
details(["switch", "refresh"])
}
}
// Parse incoming device messages to generate events
def parse(String description) {
log.debug "description is $description"
def event = zigbee.getEvent(description)
if (event) {
if (event.name == "power") {
def powerValue
def div = device.getDataValue("divisor")
div = div ? (div as int) : 1
powerValue = (event.value as Integer)/div
sendEvent(name: "power", value: powerValue)
}
else {
sendEvent(event)
}
}
else {
log.warn "DID NOT PARSE MESSAGE for description : $description"
log.debug zigbee.parseDescriptionAsMap(description)
}
}
def off() {
zigbee.off()
}
def on() {
zigbee.on()
}
def refresh() {
Integer reportIntervalMinutes = 4
def cmds = zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh()
cmds + zigbee.onOffConfig(0, reportIntervalMinutes * 60) + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
}
def configure() {
log.debug "in configure()"
return configureHealthCheck()
}
def configureHealthCheck() {
Integer hcIntervalMinutes = 12
sendEvent(name: "checkInterval", value: hcIntervalMinutes * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
return refresh()
}
def updated() {
log.debug "in updated()"
// updated() doesn't have it's return value processed as hub commands, so we have to send them explicitly
def cmds = configureHealthCheck()
cmds.each{ sendHubCommand(new physicalgraph.device.HubAction(it)) }
}
def ping() {
return zigbee.onOffRefresh()
}
Kommentarer
0 kommentarer
Logg på hvis du vil legge inn en kommentar.