Zigbee Energy Reporting Switch Jasco 45856 / GE 45856GE

I am a 5+ yr SmartThings user trying out HE and this is my first week. Apologies if this is a basic question but I was unable to find any information with my many searches.

I am building out the Zigbee mesh netwok with in-wall Zigbee switches in my 3 attics. There will be 3 lights switches and 2 dedicated to HVAC units (I'll have the old school toggle in series with the zigbee switch to avoid any trouble with HVAC servicing crews).

While energy reporting may be of lesser value for the lights, I am interested in energy reports for my HVAC units. The purpose of installing the switches in the first place is to automatically power off the HVAC if the smoke alarms go off. This is to stop the fast spread of smoke in the event of a fire.

Question: What driver do I use? The Generic Zigbee Switch driver does not appear to support energy reporting. None of the others that I tried, like the zigbee energy metering outlet, do either even though the energy reporting option appeared. I also tried the ST DTH (after tiny edit to make it work) and it doesn't report it either. I looked at the logs to see if anything was being reported and all I see is on/off logs.

Can anyone kindly point me in the right direction?

Jasco, but they are also commonly available rebranded as GE, and possibly Honeywell.

Did you edit the title? Because I totally didn't see that at first. :slight_smile:

The generic driver will display the energy usage if the device supports it. For example, i use the same driver for my peanut plugs with no energy reporting and my iris that do. The energy usage only displays on the iris. I am not aware of whether the generic would support the GE in-wall switch but it could be added if you capture the footprint when it's paired.

Tagging @mike.maxwell to confirm that this is correct and if he already knows whether or not it is supported.

I do have a few other zigbee energy reporting devices I could use to test this but I am not sure I want to, or am ready to, rip them out the ST zigbee mesh network. I have been searching for the "Generic Zigbee Switch" driver code but have yet to find the repo. If public, it appears to be well hidden :wink:

It should report, an outlet and a switch have the same capabilities, so there isn't any loss in functionality by using the zigbee outlet driver for a switch.

The power reporting preferences do not display for certain known devices that don't report power, but this switch obviously isn't in that list.
0B04 is the power reporting cluster, so if it exists the device should be capable of reporting power.

It's important in general, but in particular in this case that when switching to the outlet driver that configure be executed, without doing this it won't report for sure.

When I select the outlet driver I see an extra option on the threshold over which to report power. I set it to 1W for test purposes but nothing shows up in the events list, logs or tile. I did press the configure button, and also on and off a few times. Sames goes for the Generic Zigbee Switch driver but the power reporting preference goes away.

Looking at the ST driver I noticed that the fingerprint for the JASCO / GE 45856 switches has 0B05 instead of 0B04.

0B05 is the diagnostics cluster, if the device doesn't have 0B04 which is the power reporting cluster, it won't report power using the HE driver, I don't know of any clusters that report power other than 0B04...

Weird.... I just found where the clusters the device reported was stored:

{"01":{"endpointId":"01","profileId":"0104","inClusters":"0000,0003,0004,0005,0006,0B05,0702","outClusters":"000A,0019","manufacturer":"Jasco Products","model":"45856"},"02":{"endpointId":"02","profileId":"0104","inClusters":"0000,0003,0B05","outClusters":"0003,0006","manufacturer":null,"model":null}}

0B04 is not listed hover the switch is sold stating it has an "Energy Reporting" feature. I can add one to ST and see what it does there and report back.

Just saw this one I didn't recognize, its Smart Energy Metering, which isn't one I've looked into, so its quite possible it's using this cluster, however none of our current drivers are configured to use it.
I can do some testing at some point and see what it's about...

2 Likes

Seems like there are missing endpoints, not just the driver based on this thread:

What? What you are saying doesn't really make any sense. Endpoints are defined by the device. Each cluster is part of an endpoint. I'm not quite sure what you think is missing other than what Mike already identified.

I was just repeating what was said in the other thread without fully understanding the meaning. Please see the linked message discussing the supposedly missing end points.

This is the DTH that works for ST. I changed "physicalgraph" to "hubitat" and do not get any errors however it does not work so there must be a number of other changes needed.

/**
 *	Copyright 2015 SmartThings
 *
 *	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: "ZigBee Switch Power", namespace: "smartthings", author: "SmartThings", 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"
		capability "Light"

		// Generic
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0B04"
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702"

		// Aurora
		fingerprint profileId: "0104", inClusters: "0000, 0702, 0003, 0009, 0B04, 0006, 0004, 0005, 0002", outClusters: "0000, 0019, 000A, 0003, 0406", manufacturer: "Develco Products A/S", model: "Smart16ARelay51AU", deviceJoinName: "Aurora Smart Inline Relay"
		fingerprint profileId: "0104", inClusters: "0000, 0702, 0003, 0009, 0B04, 0006, 0004, 0005, 0002", outClusters: "0000, 0019, 000A, 0003, 0406", manufacturer: "Aurora", model: "Smart16ARelay51AU", deviceJoinName: "Aurora Smart Inline Relay"

		// GE/Jasco
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "0003, 000A, 0019", manufacturer: "Jasco Products", model: "45853", deviceJoinName: "GE ZigBee Plug-In Switch", ocfDeviceType: "oic.d.smartplug"
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "000A, 0019", manufacturer: "Jasco Products", model: "45856", deviceJoinName: "GE ZigBee In-Wall Switch"

		// INGENIUM
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0B04", outClusters: "0000, 0004", manufacturer: "MEGAMAN", model: "SH-PSUKC44B-E", deviceJoinName: "INGENIUM ZB Smart Power Adaptor", ocfDeviceType: "oic.d.smartplug"

		// Ozom
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702", outClusters: "0000", manufacturer: "ClimaxTechnology", model: "PSM_00.00.00.35TC", deviceJoinName: "Ozom Smart Plug", ocfDeviceType: "oic.d.smartplug"

		// Philio
		fingerprint manufacturer: " ", model: "PAN18-v1.0.7", deviceJoinName: "Philio Smart Plug", ocfDeviceType: "oic.d.smartplug" //profileId: "0104", inClusters: "0000, 0003, 0006, 0702", outClusters: "0003, 0019",

		// Salus
		fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702", manufacturer: "SALUS", model: "SX885ZB", deviceJoinName: "Salus miniSmartplug"
	}

	tiles(scale: 2) {
		multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
			tileAttribute ("device.switch", key: "PRIMARY_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"
			}
			tileAttribute ("power", key: "SECONDARY_CONTROL") {
				attributeState "power", label:'${currentValue} W'
			}
		}
		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) : 10
			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 = 5
	def cmds = zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh()
	if (device.getDataValue("manufacturer") == "Jasco Products") {
		// Some versions of hub firmware will incorrectly remove this binding causing manual control of switch to stop working
		// This needs to be the first binding table entry because the device will automatically write this entry each time it restarts
		cmds += ["zdo bind 0x${device.deviceNetworkId} 2 1 0x0006 {${device.zigbeeId}} {${device.zigbeeId}}", "delay 2000"]
	}
	cmds + zigbee.onOffConfig(0, reportIntervalMinutes * 60) + zigbee.simpleMeteringPowerConfig() + zigbee.electricMeasurementPowerConfig()
}

def configure() {
	log.debug "in configure()"
	if ((device.getDataValue("manufacturer") == "Develco Products A/S") || (device.getDataValue("manufacturer") == "Aurora"))  {
		device.updateDataValue("divisor", "1")
	}
	if (device.getDataValue("manufacturer") == "SALUS") {
		device.updateDataValue("divisor", "1")
	}
	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()
}

Edit: I cleaned out the code above a bit, and the error I get seems related to what @storageanarchy was talking about.

groovy.lang.MissingMethodException: No signature of method: com.hubitat.zigbee.Zigbee.simpleMeteringPowerRefresh() is applicable for argument types: () values: [] on line 68 (configure)

Line 68 is:

def cmds = zigbee.onOffRefresh() + zigbee.simpleMeteringPowerRefresh() + zigbee.electricMeasurementPowerRefresh()

yeah, simpleMeteringPowerRefresh() doesn't exist in Hubitat
Interesting driver, just configure both 0B04 and 0702 then "assume" that no device on the planet could possible implement both...
Anyway, to configure the 0702 cluster for reporting you're going to have to do it the hard way, bind to it, then configure the reporting parameters, this is beyond what I can assist with in the forum.

If only I knew what all that meant... BTW, is there any programming documentation or guide I can learn from?

Honestly even if there was verbose documentation on this, you would still be pulling your hair out, Zigbee drivers aren't the simplest to write to begin with, particularly when you are dealing with the lack of helper commands (in the case here).
We have a dedicated driver for the dimmer, so I will try to get reporting for that as well as a dedicated driver for the switch including reporting, this will not make platform 2.1.6, and I will at least try to get these into 2.1.7...

1 Like

I can attests to that. the more I learn the more I realize I have left to learn.

Thanks Mike!!!

1 Like

Looking forward to it. Thank you.

I've written a driver for it...so we'll see if Hubitat beats me to it, or I release it first.

It's been working well for me so far, this is power and energy monitoring for my dishwasher:

@asj - Would you mind sharing it with the community? I know the challenge might be that you do not, or cannot, take on support for users benefiting from your driver - if that were the issue, maybe a statement saying "as is, no support" might do it. I try to fix my own issues but at times they are beyond my knowledge.