[OBSOLETE] Hue B Smart (Groups & Scenes) - Remove Popcorn Effect!

Yes, I get to the first screen, but the button never shows up nor does any devices. Thanks!

yea you have the problem people are getting, working on a fix

1 Like

OKay thanks.

Am I correct by just copying the code in RAW and pasting it in the mysmartapps section?

need all the devices added too

What do you mean by devices? I have several lights added through the hue app.

you need to add all the device handlers to my device handlers

Oh, that my be the problem. I have no idea what that is at all :confused:

Also,

This is the code that I copied, enable OAuth and published. That’s all I did.

https://raw.githubusercontent.com/tmleafs/Hue_B_Smart/master/smartapps/info-fiend/hue-b-smart.src/hue-b-smart.groovy

1 Like

need to do the same with all of these https://github.com/tmleafs/Hue_B_Smart/tree/master/devicetypes/info-fiend

1 Like

Okay, do I put those the the new device handler section. Just past the raw for each one?

yup thats correct

Thanks for being so patient to re-post the installation method again! :slight_smile:
awaiting fix to linked hub. got stuck on the same screen trying to find devices to link

I have been doing some digging in the hue debug console and ihueconnect have done something extremely clever which looks very promising so that dynamic scenes can be triggered from smartthings.

Their lighting animations or dynamic scenes are uploaded to the bridge via a combination of rules, scenes, sensors and schedules.

To run one, all you need to do is send a “put” command to one of the sensors to change its value to (generally) 1 and the dynamic scene plays. A “put” of zero stops the scene.

Hopefully it is just a matter of working out which “sensor” the “put” command needs to work with.

Is it possible for this app to send “put” commands?

I will upload extracts of the relevant hue files.

My coding is limited, but happy to try to take a look. This function would be awesome. It may be that the app needs a new DH for these sensors which operates as a push button. That said, this may be a lot of work especially if no-one else uses the ihueconnect app…

I could add it

Or we could use webcore

I have worked out how the dynamic scenes work:

  1. A rule monitors integers stored in two sensors. The first sensor is used as on / off switch to run the rules. The second number fluctuates depending on which scene should be run (e.g. if there are four scenes, the numbers will fluctuate from 1 to 4).

  2. When the conditions for the first rule is triggered (broadly the first sensor is set to “1” although it may be a different number in some cases), two things happen (i) the rule runs a scene and (ii) the rule runs a schedule.

  3. The schedule is set to run after 10 seconds when it will change the number / status in the second sensor which in turn means that the second rule is triggered (i.e. which runs a new scene and sets a new schedule).

  4. This repeats until the first sensor is set to off.

For example, a dynamic scene which comprises four scenes with transitions between them will need six rules (it is not entirely clear to me why six rules are needed rather than just four), two sensors and four scenes.

Code from the bridge for this example scene is:

Sensor code:

"37": {
		"state": {
			"status": 0,
			"lastupdated": "2018-01-06T19:18:07"
		},
		"config": {
			"on": true,
			"reachable": true
		},
		"name": "XFDani[9]sn:state",
		"type": "CLIPGenericStatus",
		"modelid": "AnimationSensor",
		"manufacturername": "xfiredesigns",
		"swversion": "1.0",
		"uniqueid": "XFDani[9]sn:state",
		"recycle": false
	},
	"38": {
		"state": {
			"status": 3,
			"lastupdated": "2018-01-06T19:18:11"
		},
		"config": {
			"on": true,
			"reachable": true
		},
		"name": "XFDani[9][1]sn:step",
		"type": "CLIPGenericStatus",
		"modelid": "AnimationSensor",
		"manufacturername": "xfiredesigns",
		"swversion": "1.0",
		"uniqueid": "XFDani[9][1]sn:step",
		"recycle": false
	}
}

Rules code:

    "30": {
    		"name": "XFDani[9][1]3E60E4ED-853D-4747-A",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:10",
    		"lasttriggered": "2018-01-06T19:18:01",
    		"timestriggered": 2,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/sensors/37/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/38/state/status",
    				"operator": "eq",
    				"value": "2"
    			},
    			{
    				"address": "/sensors/38/state/lastupdated",
    				"operator": "dx"
    			}
    		],
    		"actions": [
    			{
    				"address": "/schedules/18",
    				"method": "PUT",
    				"body": {
    					"status": "enabled"
    				}
    			},
    			{
    				"address": "/groups/9/action",
    				"method": "PUT",
    				"body": {
    					"scene": "j7oCRI-NWegObur"
    				}
    			}
    		]
    	},
    	"31": {
    		"name": "XFDani[9][1]B12F9EC5-9EB7-4C6F-A",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:10",
    		"lasttriggered": "2018-01-06T19:17:31",
    		"timestriggered": 1,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/sensors/37/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/38/state/status",
    				"operator": "eq",
    				"value": "3"
    			},
    			{
    				"address": "/sensors/38/state/lastupdated",
    				"operator": "dx"
    			}
    		],
    		"actions": [
    			{
    				"address": "/schedules/19",
    				"method": "PUT",
    				"body": {
    					"status": "enabled"
    				}
    			},
    			{
    				"address": "/groups/9/action",
    				"method": "PUT",
    				"body": {
    					"scene": "lL2Sqd0P0n9QmBM"
    				}
    			}
    		]
    	},
    	"32": {
    		"name": "XFDani[9][1]773FB65E-34B0-4EAA-B",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:11",
    		"lasttriggered": "2018-01-06T19:17:41",
    		"timestriggered": 1,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/sensors/37/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/38/state/status",
    				"operator": "eq",
    				"value": "4"
    			},
    			{
    				"address": "/sensors/38/state/lastupdated",
    				"operator": "dx"
    			}
    		],
    		"actions": [
    			{
    				"address": "/schedules/20",
    				"method": "PUT",
    				"body": {
    					"status": "enabled"
    				}
    			},
    			{
    				"address": "/groups/9/action",
    				"method": "PUT",
    				"body": {
    					"scene": "HT-aLm6PdTw9vLj"
    				}
    			}
    		]
    	},
    	"33": {
    		"name": "XFDani[9][1]7292271E-C0C1-4A18-8",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:11",
    		"lasttriggered": "2018-01-06T19:17:51",
    		"timestriggered": 1,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/sensors/37/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/38/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/38/state/lastupdated",
    				"operator": "dx"
    			}
    		],
    		"actions": [
    			{
    				"address": "/schedules/17",
    				"method": "PUT",
    				"body": {
    					"status": "enabled"
    				}
    			},
    			{
    				"address": "/groups/9/action",
    				"method": "PUT",
    				"body": {
    					"scene": "Ypl3xm5FQOC4QEH"
    				}
    			}
    		]
    	},
    	"34": {
    		"name": "XFDani[9][1]rl:start",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:11",
    		"lasttriggered": "2018-01-06T19:17:11",
    		"timestriggered": 1,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/sensors/37/state/status",
    				"operator": "eq",
    				"value": "1"
    			},
    			{
    				"address": "/sensors/37/state/lastupdated",
    				"operator": "dx"
    			}
    		],
    		"actions": [
    			{
    				"address": "/schedules/17",
    				"method": "PUT",
    				"body": {
    					"status": "enabled"
    				}
    			},
    			{
    				"address": "/groups/9/action",
    				"method": "PUT",
    				"body": {
    					"scene": "Ypl3xm5FQOC4QEH",
    					"bri": 178
    				}
    			}
    		]
    	},
    	"35": {
    		"name": "XFDani[9]rl:stop",
    		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
    		"created": "2018-01-06T19:17:11",
    		"lasttriggered": "none",
    		"timestriggered": 0,
    		"status": "enabled",
    		"recycle": false,
    		"conditions": [
    			{
    				"address": "/groups/9/state/any_on",
    				"operator": "eq",
    				"value": "false"
    			}
    		],
    		"actions": [
    			{
    				"address": "/sensors/37/state",
    				"method": "PUT",
    				"body": {
    					"status": 058
    				}
    			}
    		]
    	}
    }

**Schedules code:**

"17": {
		"name": "3E60E4ED-853D-4747-AA18-394_G9_1",
		"description": "XFDani[9][1]3E60E4ED-853D-4747-A",
		"command": {
			"address": "/api/95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD/sensors/38/state",
			"body": {
				"status": 2
			},
			"method": "PUT"
		},
		"time": "PT00:00:10",
		"created": "2018-01-06T19:17:05",
		"status": "disabled",
		"autodelete": false,
		"starttime": "2018-01-06T19:17:51",
		"recycle": false
	},
	"18": {
		"name": "B12F9EC5-9EB7-4C6F-A0A9-DE3_G9_1",
		"description": "XFDani[9][1]B12F9EC5-9EB7-4C6F-A",
		"command": {
			"address": "/api/95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD/sensors/38/state",
			"body": {
				"status": 3
			},
			"method": "PUT"
		},
		"time": "PT00:00:10",
		"created": "2018-01-06T19:17:05",
		"status": "disabled",
		"autodelete": false,
		"starttime": "2018-01-06T19:18:01",
		"recycle": false
	},
	"19": {
		"name": "773FB65E-34B0-4EAA-B1A2-9A1_G9_1",
		"description": "XFDani[9][1]773FB65E-34B0-4EAA-B",
		"command": {
			"address": "/api/95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD/sensors/38/state",
			"body": {
				"status": 4
			},
			"method": "PUT"
		},
		"time": "PT00:00:10",
		"created": "2018-01-06T19:17:07",
		"status": "disabled",
		"autodelete": false,
		"starttime": "2018-01-06T19:17:31",
		"recycle": false
	},
	"20": {
		"name": "7292271E-C0C1-4A18-8844-53D_G9_1",
		"description": "XFDani[9][1]7292271E-C0C1-4A18-8",
		"command": {
			"address": "/api/95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD/sensors/38/state",
			"body": {
				"status": 1
			},
			"method": "PUT"
		},
		"time": "PT00:00:10",
		"created": "2018-01-06T19:17:08",
		"status": "disabled",
		"autodelete": false,
		"starttime": "2018-01-06T19:17:41",
		"recycle": false
	}
}

Scenes code:

"Ypl3xm5FQOC4QEH": {
		"name": "W1-Animation",
		"lights": [
			"12",
			"13",
			"15",
			"16",
			"17"
		],
		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
		"recycle": true,
		"locked": true,
		"appdata": {
			"version": 1,
			"data": "3E60E4ED:CA09000"
		},
		"picture": "",
		"lastupdated": "2018-01-06T19:17:08",
		"version": 2
	},
	"j7oCRI-NWegObur": {
		"name": "W2-Animation",
		"lights": [
			"12",
			"13",
			"15",
			"16",
			"17"
		],
		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
		"recycle": true,
		"locked": true,
		"appdata": {
			"version": 1,
			"data": "B12F9EC5:CA09000"
		},
		"picture": "",
		"lastupdated": "2018-01-06T19:17:09",
		"version": 2
	},
	"lL2Sqd0P0n9QmBM": {
		"name": "W3-Animation",
		"lights": [
			"12",
			"13",
			"15",
			"16",
			"17"
		],
		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
		"recycle": true,
		"locked": true,
		"appdata": {
			"version": 1,
			"data": "773FB65E:CA09000"
		},
		"picture": "",
		"lastupdated": "2018-01-06T19:17:09",
		"version": 2
	},
	"HT-aLm6PdTw9vLj": {
		"name": "W4-Animation",
		"lights": [
			"12",
			"13",
			"15",
			"16",
			"17"
		],
		"owner": "95LLt3k-znnMbuA096ANfBUdPKy6MdSitBXQIYsD",
		"recycle": true,
		"locked": true,
		"appdata": {
			"version": 1,
			"data": "7292271E:CA09000"
		},
		"picture": "",
		"lastupdated": "2018-01-06T19:17:10",
		"version": 2
	}

There may be two ways to implement this?

The first would be to establish a way for the app to import these dynamic scenes but this is probably very complicated.

The second might be to have a DH which when pushed sends a “PUT” command to the bridge. The “PUT” command would need to know the “sensor” ID and the trigger value to turn on the rule (e.g. “1” in the example above). This information could be input into the DH by the user and as such would hopefully not require as much code as the first option. Implementing this option would not require the app to learn or understand how these scenes work.

I will have a look at how hue dynamic scenes in hue labs work - if they work on a similar basis, this ought to work for them too.

I should also add why I am interested in being able to trigger dynamic scenes from ST - in a nutshell, I would like to be able to trigger these scenes from switches which are not hue dimmers and also from AT. I will try IFTTT with webcore to see if that can integrate with this, although I recall that only allows running a presumably static “scene”.

This is my notification screen, it keeps trying to discover from the two hue hubs all day/night. Is this normal? All my hue bulbs and bridges are going through hue b smart.

Hue to smartthings is a pull service every 5mins it pulls information from the Hue bridge

1 Like

Hey - is there still an issue with not being able to discover the Hue Bridge?

Thanks!

for some people yes I cant recreate the error so cant fix it till someone offers me access to a ST Hub

Happy to do that

contact me by PM