[OBSOLETE] Trend Setter

You could try adding the dimmer to the same group as the lights, and turning on the Bidirectional option under the Experimental section in the Group settings. Obviously it’s experimental and I can’t be sure of the behaviour it’d have.

Has this been updated to work with the new app?

I did update the group device handlers to have the new bits that should make the devices show as the correct type in the new app but I haven’t tested it particularly.

The GitHub says no changes have been made for 3 years?

Will miss this smartapp if it doesn’t work in the new app :frowning:

[Update - New Contact Sensor Device Type for Trend Setter]

[Sorry - was drafting release notes and published by mistake - this is not out yet but should be soon]

[Update - New Contact Sensor Device Type for Trend Setter - Beta]

Hello all - Trend Setter is one of my favorite apps.

The other day I was working on my ActionTiles set up for a very small Fire tablet and was wishing I had one tile that would show “All Front Windows Closed” (for example) without having to look at all of them.

Something like this:

image

If even one of the windows were open - I wanted this

image
so I could then go to my Doors and Windows Panel to see what was open.

With @Kriskit Chris’ kind encouragement I’ve created a Contact Sensor Device Type (based loosely on his power meter). This is what it looks like in SmartThings Classic

How to update (written assuming you already have Trend Setter up and running)

a. Update the kriskit-trendsetter : Group SmartApp by either updating from Kriskit’s repo if you have it connected it or obtaining it from Trend Setter Group App and adding to your SmartApps. Version will now be 2.3.1. Remember to publish it.

b. Add the Contact Sensor Group Device handler either from the Repo update process or by getting from Trend-setter Contact Sensor Group Device

c. The kriskit-trendsetter : Trend Setter app itself does not need to be updated. (As long as you are at the most recent version which was updated over a year ago - Trend Setter app

Once this is done, when you go to create a new group in Trend Setter - you will now have an option to pick Contact Sensors -

General information

a. I have tested it with:

  • early generation SmartThings Multi sensors
  • Quirky Trippers using both custom and generic
  • Visonic sensors
    Have had no trouble with any of these. It should work with anything with capability “contact sensor” that returns “open” or “closed” status in the DTH

b. Currently the secondary statuses are “All Closed, One Open, Some Open if less than 75%, Most Open if more than 75% but not all are open, All Open” I wonder if this is overkill, but I was having fun with it. Thoughts?

c. I did not do extensive testing (e.g., I tested for 3 minutes), but it seems to work ok in the new SmartThings app

d. Before you ask, I don’t think there is a way to list the group members in the device screen. If anyone has a proven way to do it - would be happy to hear.

e. There’s often a second or two delay in it’s updating, which makes sense given it has to check all.

f. It should be obvious, but unlike most of the other device types, there is no “controller” feature here (I’d have to motorize all my windows! :slight_smile: ) It’s just reporting states.

I appreciate feedback on the design/functionality and confirmation that it works on other open/closed sensors. I’m not an expert groovy coder and am just riding on @Kriskit’s coattails to do this. I’ve been using it regularly for a few weeks now and it seems to be very reliable.

Enjoy!
Alec

**Update ** Chris figured out why the repo wasn’t working for the contact sensor group device - was a file naming thing. Please use either repo (which should be working now) or new link above to copy/paste the device.

4 Likes

I’ve recently been receiving this error when I attempt to create new group. I may have by habit inadvertently published the DTHs. Would this cause for error? How do I ‘unpublish’, if this is possible? If I delete all SmartAps and DTHs associated with TrendSetter, will I lose my current groups?

Great app, and was working well for some time!

As a long time C++ guy, I am not the smoothest Groovy code smith, but took a shot at updating the dimmer to support both switches and dimmers. Appears to work with Alexa and ActionTiles. You just need to make changes to the Group app. Great App BTW.

Changed type from ‘switchLevel’ to just ‘switch’:


      [
        	id: "switchLevel",
        	type: "switch", 
            singular: "Dimmer", 
            plural: "Dimmers", 
            groupDeviceType: "Dimmer Group Device",
            inherits: "switch",
            experimental: true,
            attributes: [
            	[name: "level"]
            ]
        ],

And added hasCommand checks in the sets loops.

private $performCommand(target, command, args) {
    switch(args?.size()) {
    	default: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"()
        break
    
    	case 1: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0])
        break
        
		case 2: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1])
        break
        
		case 3: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2])
        break
        
		case 4: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3])
        break
        
		case 5: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3], args[4], args[5])
        break
        
		case 6: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3], args[4], args[5], args[6])
        break
        
        case 7: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
        break
        
        case 8: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
        break
        
        case 9: 
        	for(it in target) if(it.hasCommand("$command")) it."$command"(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9])
        break
    }
}
1 Like

Hello,

I’ve published my devices and it’s not broken anything before. I think you are at risk for losing groups if you totally uninstall and reinstall the app and device handler. (It’s odd, the groups remain in the background if you look in the hub, but the app doesn’t link up to the old groups).

Question - does it give you this message for whatever type of device you try to install? Or only for certain devices? In that case I’d check if you have that particular device handler installed.

Alec

Alec, appreciate the thoughts! I receive this error when choosing to create a new group – no matter the type. It is the next screen.

I will take your advice, and not delete ad reinstall this SmartApp. Thanks for your feedback and thoughts.

Another thing to check -

Look in your trendsetter and group apps and in your device type handlers - particularly at the namespace.

I once ended off with a mismatch between Kris’ early files (before he’d set up in github repo) and after. Older ones have namespace: “kriskit.trendSetter”. Currently they all should have namespace: “kriskit-trendsetter”. (so a dash rather than a period).

If you do have the older trendsetter app, copy the new one from the repo over your existing app - that way it probably will remember the groups. (I had trouble with that).
(So don’t just reinstall the app, if you know what I mean - you want to replace it).

Good luck!
Alec

How does the power meter group work? My hope was that it’d create a device that’d calculate the total power for all devices within that group, but not only isn’t it doing that but it’s not doing anything else. It shows off, but you can’t switch it on by tapping it and turning the individual switches within the group has no effect either. @Kriskit?

Hi,

It should just work as you say… I just tried it with some lights and it works for me.

I can only suggest looking at the live logs in the IDE to see if it’s erroring or something.

No errors but still no luck either. I’ve gone ahead and copied and pasted code for this particular handler from your repo into IDE just to confirm and doesn’t change.

On a separate note what is the method for removing Trend Setter devices? Usually with devices you need to remove the device before you can remove a SmartApp so I tried that but then went into Trend Setter smart app and when I click the device in there to remove it just get this and have to force close SmartThings app every time.

Is this app still functional? On a first time install I get a spinning circle when selecting “Create Group” for the first time. Have to force close the app.

You can also go to the Things list, select your device, click on the cog in the upper right of the screen and remove the device there.

Still works fine for me. Have you kept the code up-to-date?

Considering I installed it just yesterday I’d assume the code is up to date, unless I missed something simple.

Can you take a screenshot of the Smartapps you installed in IDE?