Dimming pocket outlet that remembers last set level?


(Keith) #1

Does anyone know if there is a pocket outlet that will keep its last set level when it is turned off and back on?


(Paul) #2

Do you want to describe your use case? Might help us to understand if you could achieve your objective using something like CoRE?


#3

If i understand you correctly, all of mine do. If the dimmer is set to 50% when it’s turned off, it goes back to 50% the next time I turn it on. I have several GE/Jasco pocket sockets.


(Keith) #4

I’m using CoRE now with the official ST dimming pocket outlet and its not working… so using CoRE to solve my issue is not an option. But here is the use case just in case :wink:

I’ve got a pair of dumb lights in the headboard of our bed, each on their own circuit. I’m looking for a pocket outlet that I can plug these into (via a power strip). Using CoRE, I have a piston setup that during different Modes, these lights are set at different levels. I also have a motion sensor that when triggered, increases the level.

The piston works fine, but when the lights are turned off (set to happen when Mode changes to Night) and then back on (in Night Mode and motion is detected at 25% level per the piston), instead of coming on at 25%, they come on at 100% for a split second before the piston kicks them down the correct 25%.

With out a piston, if I set them at 50% and turn them off via the ST app and then back on, they turn on at 100%.


(Keith) #5

Thanks, I’ll look into those. The ST one I bought is all but useless to me since it does not remember it’s last level setting.


#6

I’m actually glad you ask the question. I learned something too. I did not know that the ST ones did not do that.


(Keith) #7

Do you have a link to the model you have that does remember the level setting?


#8

I got mine from eBay and I can’t go to that site here at work. Here is a link from Amazon but you might want to shop the model around as there might be a better price elsewhere.


(Keith) #9

Thanks, I will.


(Keith) #10

Anyone know if there is a difference between the JASCO 45702 posted above and the GE 12718?

And on a side note, how you do post links that show the image and short description like that?


(Paul) #11

Just paste the URL and the image will follow. You can also drag and drop pictures from explorer/finder.


(Keith) #12

So don’t use the hyperlink button, just paste the url directly in the comments?


#13

You could fix this with a custom DTH. I wrote this to simulate on/off fade dimming for GE ZigBee switches. I would guess this should work for you. Available from my jhamstead/jhamstead GitHub as well (updated there).

GitHub:
https://raw.githubusercontent.com/jhamstead/jhamstead/master/devicetypes/smartthings/enhanced-ge-zigbee-dimmer-power.src/enhanced-ge-zigbee-dimmer-power.groovy

As a note, when using the ZigBee attribute to turn on at a specific level, this changes the off behavior. When turning a switch off it will report the dimmer level as 0% but will turn on to the last level.

Also you may need to add this fingerprint:

fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "4257050-ZHAC"

#14

If you try this DTH out and this works for you, I can work on modifying the DTH to use he default on/off functions as fade to on/off is enabled in your device.

That way it more closely follows the default DTH.


(Keith) #15

Thanks for the DTH and the offer to modify one if needed. I did contact ST support about this dimmer not staying at the set level and they said mine is not working the way it should be. Let me hear back from them to see what they say/want to do first.


#16

Quick question. When turning your outlet off does it go to 0% dim level? If it does, the turn on to level ZigBee attribute must be somehow set on your outlet. That would make your outlet behave like you are describing.


(Keith) #17

As a matter of fact, it does go to 0% then completely turns off.


#18

Create a custom DTH based on the default and I’ll send some code for you to add to the refresh method. Run it once to disable that attribute and you should be good afterward. Give me a few to get it together. Got a 9 month old to put to bed.


#19

I’ve just attached the entire DTH. Hopefully after you use this DTH and hit refresh, you will no longer have the issue. You should be able to go back to the default DTH afterward.

/**
 *  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.
 *
 *	SmartPower Dimming Outlet (CentraLite)
 *
 *	Author: SmartThings
 *	Date: 2013-12-04
 */
metadata {
	definition (name: "SmartPower Dimming Outlet", namespace: "smartthings", author: "SmartThings") {
		capability "Switch"
		capability "Switch Level"
		capability "Power Meter"
		capability "Configuration"
		capability "Refresh"
		capability "Actuator"
		capability "Sensor"
		capability "Outlet"

		fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "4257050-ZHAC"

	}

	// simulator metadata
	simulator {
		// status messages
		status "on": "on/off: 1"
		status "off": "on/off: 0"

		// reply messages
		reply "zcl on-off on": "on/off: 1"
		reply "zcl on-off off": "on/off: 0"
	}

	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:"#79b821", 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:"#79b821", nextState:"turningOff"
				attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
			}
			tileAttribute ("device.level", key: "SLIDER_CONTROL") {
				attributeState "level", action:"switch level.setLevel"
			}
			tileAttribute ("device.power", key: "SECONDARY_CONTROL") {
				attributeState "power", label:'${currentValue} W'
			}
		}

		standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
			state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
		}

		main "switch"
		details(["switch", "refresh"])
	}
}

private getCLUSTER_LEVEL() { 0x0008 }
private getLEVEL_ATTR_ON_LEVEL() { 0x0011 }

// Parse incoming device messages to generate events
def parse(String description) {
	log.debug "description is $description"

	def event = zigbee.getEvent(description)
	if (!event) {
		log.warn "DID NOT PARSE MESSAGE for description : $description"
		log.debug zigbee.parseDescriptionAsMap(description)
	} else if (event.name == "power") {
		/*
			Dividing by 10 as the Divisor is 10000 and unit is kW for the device. Simplifying to 10 power level is an integer.
		*/
		event.value = event.value / 10
	}

	return event ? createEvent(event) : event
}

def setLevel(value) {
	zigbee.setLevel(value)
}

def off() {
	zigbee.off()
}

def on() {
	zigbee.on()
}

def refresh() {
	zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.electricMeasurementPowerRefresh()
    return zigbee.writeAttribute(CLUSTER_LEVEL, LEVEL_ATTR_ON_LEVEL, 0x20, zigbee.convertToHexString(255,2))
}

def configure() {
	refresh() + zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.electricMeasurementPowerConfig()
}

(Keith) #20

Okay, I installed your new DHT, edited the device to use it and hit Update. It still turns on at 100% no matter what the last set level was. Also, now when I turn it off it dims down 2% and pauses for just a second, then dims to 0% and off. Now when I turn it on, it dims up to 2% and then all the way up to 100% (the bulb is actually at 100% while the app does that little pause at 2%).

Switching back to the default DHT does the same thing.