Aeon Labs Smart Switch (2nd Edition) - DSC24


(James Pansarasa) #1

I received the engineering spec from Aeotec, so I was able to write a functional device type for the .
Aeon Labs DSC24 Smart Switch. This is the newer version of the Aeon Labs Smart Energy Switch DSC06 that adds the ability to monitor current and voltage in addition to watts and total energy (kWh). This device type remains ACTIVE so no need to poll the device from a SmartApp to keep it reporting.

Here are some of the preferences I have implemented for the device:

  • Enable/Disable the remote switch if you only care about energy monitoring
  • Set the interval that device reports to the SmartThings hub
  • Enable/Disable power events in the Activity log for the device
  • Adjust how the switch responds to the “Switch All” command
  • Turn on/off the debugging for the device though the UI

I also commented all of the possible configuration values in the code if someone wants to subvert the device to their own will.

Enjoy.


Laundry Monitor
(Keith Croshaw) #2

Everything looks nice so far. I haven’t really gotten to test it under load and in conjunction to SmartApps yet though.


(Keith Croshaw) #3

I can further report that this device type works great, shows me more power values, and works with my powerMeter SmartApp!
Thanks @jpansarasa!


(Chris) #4

Hi James,

Thank you for developing this device type. I’ve got ten of these Aeotec Smart Switches and thanks to you, now I can see how much power the attached appliances are using. I also appreciate the addition of the preference configs for the device within the app.

How can I get the watts/amps to poll more frequently within the app (less than a minute)? I tried hitting the refresh button. Do I need to modify the code?

Also, any chance you’d be willing to generate a similar device type for the Aeotec Smart Dimmer, 2nd Edition (DSC25)?

Thanks again!


(James Pansarasa) #5

Chris,

You would have to change the code to refresh faster than 1 minute. It should be easy enough to do by removing the minute scaling at the top of the configure() method.

def configure() {
    //Get the values from the preferences section
    def reportIntervalSecs = 60;
    if (reportInterval) {
	//reportIntervalSecs = 60 * reportInterval.toInteger()
	reportIntervalSecs = reportInterval.toInteger()
    }

My one concern about that might be flooding the hub with updates and I am not sure of the refresh rate of the phone apps.

Good luck,
James


(Anuj79) #6

of late the displace on the app is not updating and i have it logging it to google spreadsheet and even thats not updated
when i do a manual refresh it shows up in the log but the tile is not updated

2:13:51 PM: debug Parse returned [‘name’:‘switch’, ‘value’:‘on’, ‘type’:‘physical’, ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘PowerMeter1’, ‘descriptionText’:PowerMeter1 switch is on]
2:13:51 PM: debug BasicReport(value:255)
2:13:51 PM: debug cmd: “BasicReport(value: 255)”)
2:13:51 PM: debug Parse(description: "zw device: 04, command: 2003, payload: FF ")
2:13:41 PM: debug Parse returned [‘name’:‘energy’, ‘unit’:‘kWh’, ‘displayed’:true, ‘value’:6.951, ‘isStateChange’:false, ‘linkText’:‘PowerMeter1’, ‘descriptionText’:PowerMeter1 energy is 6.951 kWh]
2:13:41 PM: debug MeterReport(deltaTime:0 secs, meterType:Electric, meterValue:6.951, previousMeterValue:6.951, scale:energy(0), precision:3, rateType:1)
2:13:41 PM: debug cmd: “MeterReport(deltaTime: 0, meterType: 1, meterValue: [0, 0, 27, 39], precision: 3, previousMeterValue: [0, 0, 27, 39], rateType: 1, scale: 0, scale2: false, scaledMeterValue: 6.951, scaledPreviousMeterValue: 6.951, size: 4)”)
2:13:41 PM: debug Parse(description: "zw device: 04, command: 3202, payload: 21 64 00 00 1B 27 00 00 00 00 1B 27 ")
2:13:40 PM: debug Parse returned [‘name’:‘switch’, ‘value’:‘on’, ‘type’:‘digital’, ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘PowerMeter1’, ‘descriptionText’:PowerMeter1 switch is on]
2:13:40 PM: debug SwitchBinaryReport(value:255)
2:13:40 PM: debug cmd: “SwitchBinaryReport(value: 255)”)
2:13:40 PM: debug Parse(description: "zw device: 04, command: 2503, payload: FF ")


(Uriel A Colon) #7

Hello, toph24
have you found a similar device handler for the (DSC25)?
i have looked but to no avail.