Bug report


I wrote a very simple app for testing: Each time a contact sensor is opened, I toggle a switch. This app was coexisting with “The Flasher” & “Let There Be Light” applications. So I have the 3 following actions each time the SmartSense Multi widows opens:

  • Hue Lightstrips flash 3 times (1 sec on / 1sec off with “The Flasher” default values).
  • Hue Bulb 1 is switched on (with “Let There Be Light”).
  • Hue Bulb 2 is toggled (my app).

Each time the SmartSense Multi widows closes:

  • Hue Bulb 1 is switched off (with “Let There Be Light”).

However sometimes I observe something different, so I used Wireshark to understand the source of the problem.

I noticed, for example, that the sequence OFF-ON-OFF-ON-OFF is sent via HTTP PUT commands to the Lightstrip. So the light only blinks 2 times: The first ON command seems to be eaten.

Another strange point: in order to decrease the traffic, I removed my app on my iPhone. However, it was still running and I had no idea how to remove it. Finally I succeeded by going into “My SmartApps” and removing “CSEM” in Locations of my appli. After that, the behavior of the 2 remaining Apps was better. I re-installed my app and again the behavior was degraded. Then, I was able to remove my app with my iPhone, re-install it, remove it without problem. My app is annexed.

If you are interested, I can send you the Wireshark trace. I have some problem to decode the messages between the cloud and my hub.

Best regards,


preferences {
	section("Window opens") {
        input "contact1", "capability.contactSensor", title: "Which sensor?"
    section("Light to switch on"){
		input "switch1", "capability.switch", title: "Which light?"

def installed() {
	log.debug "Installed"
	subscribe(contact1, "contact", switchOnHandler)

def updated() {
	log.debug "Updated with settings: ${settings}"
	subscribe(contact1, "contact", switchOnHandler)

// event handlers
def switchOnHandler(evt) {
   	log.debug "Switching $state.toggle"
	if (evt.value == "open") {
    	if (state.toggle == 0) {
    		state.toggle = 1
   			log.debug "Switching on"
        else {
    		state.toggle = 0
   			log.debug "Switching off"

private defaultState() {
	state.toggle = 0;