Aeon SmartStrip - Follow Individual Simulated Switches?


#1

1) Give a description of the problem
I just bought the AEON SmartStrip which has 4 individually switchable outlets. It shows up as a single device, but it has 4 switchable tiles, one for each outlet. I have set up 4 virtual switches, one for each switchable outlet. I would like them to follow each other…I feel dumb just for posting this, because I feel it’s a very common one to ask but I didn’t come across any other posts. I did figure out one way to do it…but it seems very inefficient and, yes, I know, “if it works why not just use it”…well I also like using these opportunities to learn how to do a particular task better and it seems crazy to me to copy paste this 4 times, if there’s some nifty way I can do it all in one. Screenshot below of my first test piston for just one switch.

2) What is the expected behavior?
Virtual Switches 1 - 4 follow Physical Switches on the SmartStrip and vice versa.

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
I need to do this, but for 4 total switches

edit: yes, I realize there is a bug in the screenshot on line 32, it’s only supposed to be “Aeon SmartStrip”


#2
define
   device pSwitches = pSw1, pSw2, pSw3, pSw4
   device vSwitches = vSw1, vSw2, vSw3, vSw4
   device cSwitch
   int i
end define

on event from vSwitches
   set i = indexOf(vSwitches, string($currentEventDevice))
   set cSwitch = arrayItem(i, pSwitches)
   with cSwitch
      set switch to $currentEventValue
   end with
end on

on event from pSwitches
   set i = indexOf(pSwitches, string($currentEventDevice))
   set cSwitch = arrayItem(i, vSwitches)
   with cSwitch
      set switch to $currentEventValue
   end with
end on

you probably need this as well if there is an option to switch on the strip with one tile:

on event from aeon smartstrip
   with vSwitches
      set switch to $currentEventValue
   end with
end on

Dimmers + Hues, need initial guidance
#3

That looks like it will work the way I need. The one problem is the the SmartStrip is only a single device with addtributes:
switch (controls all 4), switch1, switch2, switch3, switch4

I’m assuming I can alter this a bit to instead to somehow use the i variable to set the according switch# attribute.


#4

right. thats what the last on event block is for.

didnt quite get what you mean. this mirrors 4 physical switches to 4 virtual switches and vice-versa. did you need something else?


#5

Yeah. The problem with the Aeon SmartStrip is that it is only a single physical device…but it has 4 switchable tiles on the handler. So I have 4 virtual switches that need to control the 4 attributes on the SmartStrip, I’m assuming it will have to use the custom commands. I’m not sure if there’s a way to say something like

with
    Aeon SmartStrip
do
    on{i}()

The Device Handler has custom commands that can be used:
on1(), on2(), on3(), on4()
off1(), off2(), off3(), off4()

And custom attributes:
switch1, switch2, switch3, switch4
power1, power2, power3, power4
energy1, energy2, energy3, energy4

And then the device has your standard functions of on and off and switch attribute which controls all 4 switches at the same time.

Sorry if I’m leading you in the dark here.


#6

thats good and exactly as i expected. the snippet of code i put in above should do exactly what you are looking for, at least as i understand it now. :slight_smile:

give it a try.

yes this is what the last on event snippet is for above.


#7

Yeah, I 100% understand that last snippet, that’s not the problem.

The problem is this part:

device pSwitches = pSw1, pSw2, pSw3, pSw4

The SmartStrip only shows up as a single physical device in SmartThings, not 4. So I can’t populate that Devices Variable. Since I’m not controlling 4 physical devices. it’s 1 physical device but it has 4 switch attributes.


#8

ahh, so it has these as attributes not actual switches. update the DTH? :smiley:

can you trigger a piston with one of the switches and log this in wC and share?

'A:' + $currentEventAttribute + '^ D:' + $currentEventDevice + '^ DI:' + $currentEventDeviceIndex + '^ DP:' + $currentEventDevicePhysical + '^ U:' + $currentEventUnit + '^ V:' + $currentEventValue + '^ S:' + $currentState + '^'

put that in the expression field not value.


#9

Ok, give me a sec. It might take me a few minutes haha


#10

no worries. trigger that test piston once with the main switch and then once for one of sub switches and share both please.


#11

This is literally the worst device handler I have ever seen. This may not even be possible with how the device handler is behaving. I might have to submit a bug to SmartThings to have them fix this handler.

Piston used to produce the data:

Test1:
Starting with the device having all 5 switches ON (master and sw1-4). I turned OFF master switch:
1

Test2:
With all 5 switches OFF. I turned on the master switch:
2

Test3:
With all 5 switches ON. I turned OFF switch1. Apparently for some reason if one switch turns off, the handler turns the master switch off…but switches 2,3,4 stayed on…that’s terrible
3

Test4:
With all 5 switches OFF. I turned ON switch1. And apparently for some reason, if one switch turns on, the handler turns the master wtich on…but switches 2,3,4 stayed off…also terrible
4


#12

wait before i look at log data if you are able to select switch1 in an on event you should be also able to use it in a device variable. no?


#13

No, because it’s not a device, it’s a device attribute. I can only add AeonSmartStrip to the device variable one time.


#14


#15

ok, that should get fixed.

on test1 you turned off the master switch all switches on and you got 2 logged events, not 1 or 5?


#16

I got 2 because i’m only following the master switch attribute and the switch1 attribute. I’m not following 2,3 or 4. So those didn’t get logged, otherwise I would have gotten 5 events logged.

So when I turned off the master switch there were two events…one for turning off switch1 (which the DH did, not me) and one for turning off the master switch (which was my action)


#17

this DTH is a bit nuts. let me think of piston.


#18

Agreed. I think I will submit a bug to SmartThings to update it. Because in my head, it should only turn off the master switch if all 4 switches are off. And it should turn on the master switch when any one of them turns on. And that’s it.

I’m not very familiar with DTH code yet, so I don’t know if I’ll do it myself. I’m only familiar with my Zigbee bulb DTH because it’s pretty simple. The ZWave ones are complicated to me.


#19

well zwave is like dvd regions. any protocol that works worldwide is no good. :wink:


#20

If you can’t think of a good solution, I can always stick with my original post and just copy paste that 4 times. I honestly don’t care about the master switch as it has no value to me for what I’m doing. The whole reason I’m doing this is because I want to treat the strip as if it were 4 individual physical switches.

I wish the strip just acted that way and had the ability to add it as 4 individual z-wave switches.