Subscription to double tapped buttons

Please follow my instructions first using built in components, then move on to other testing.

HE supports loading user apps. if it does not work with an user app its an issue … yes?

this user app is about as simple as it gets. if it does not work with this … does it really matter if it only works with built in components?

thank you.

definition	(
    name: "rooms test app",
    namespace: "bangali",
    author: "bangali",
    description: "rooms test app",
    category: "My Apps",
    iconUrl: "https://cdn.rawgit.com/adey/bangali/master/resources/icons/roomOccupancy.png",
    iconX2Url: "https://cdn.rawgit.com/adey/bangali/master/resources/icons/roomOccupancy@2x.png",
    iconX3Url: "https://cdn.rawgit.com/adey/bangali/master/resources/icons/roomOccupancy@3x.png"
)

preferences {
	page(name: "roomsTest", title: "Rooms Test")
}

def roomsTest()     {
	dynamicPage(name: "roomsTest", title: "Rooms Test", install: true, uninstall: true)      {
        section("")      {
            input "roomButton", "capability.doubleTapableButton", title: "Button?", required: true, multiple: false
        }
    }
}

def installed()     { 
	log.debug "installed"    
    initialize() 
}

def updated()       {
    log.debug "updated"
    initialize()
    subscribe(roomButton, "doubleTapped", buttonEvent)
	subscribe(roomButton, "doubleTapped.1", buttonOnlyEvent)
}

def	initialize()    {
    log.debug "intialized"
    unsubscribe()
    unschedule()
}

def buttonEvent(evt)        {
    log.debug "buttonEvent $evt.name:$evt.value"
}

def buttonOnlyEvent(evt)    {
    log.debug "buttonOnlyEvent $evt.name:$evt.value"
}

The vindication thing, was really just a joke.
I sincerely appreciate your's and the Hubitat staff’s work. It’s all very exceptional.

1 Like

I did as you suggested. Using the Button Controller app, I assigned the Virtual Button doubleTap.1 to turn on a light.

The doubleTapped event shows in the logs, the light does not come on and nothing for the Button Controller application shows in the logs.

The event subscription exists in the Button Controller app as expected, however.

Event Subscriptions

Source Event Handler Filter
TestVirtualButton pushed.1 buttonHandler true
TestVirtualButton doubleTapped.1 buttonHandler true

From a subscription pov there's no difference between a user app and a system one.

I would have to check, but I don't think bc produces any log output.
We would like to look into this further, please submit a ticket on this if you haven't done so already.

As further info, I cold booted the hub and it got stuck at 70% on init. I had to yank the plug again. It rebooted fine after that.

I decided to try rolling back to *.119 and test it. The problem remained.
So I restored the latest again.

One more note, after restoration to the latest version, the Devices were all as expected, but the Apps were not. Apps I have removed more than a couple days ago, are back and the Button Controller app is not installed now.

Reinstalled the Button Controller app and tested the doubleTap and it worked for Button Controller, but not for Room Manager.

Not sure why doubleTap didn't work at all previous, but it seems to be working with the native applications, I will therefor not submit a ticket as it doesn't appear to be a problem with HE platform at this time.

Ok, it sounds like we detected a corrupted db on startup and resorted from backup, hence rolling back your apps, that was likely the issue with bc, partial db corruption.

I deleted another room, and caught this.

[app:151](http://REDACTED/logs#app151)2018-08-12 09:53:35.700:errorgroovy.lang.MissingMethodException: No signature of method: app15340839169391812031379.getChildDevices() is applicable for argument types: (java.lang.Boolean) values: [true] on line 5743 (uninstalled)

[app:23](http://REDACTED/logs#app23)2018-08-12 09:53:35.493:errorgroovy.lang.MissingMethodException: No signature of method: app1534083867660279932680.unsubscribe() is applicable for argument types: (com.hubitat.app.ChildDeviceWrapper) values: [Mezzanine] Possible solutions: subscribe(java.lang.Object, java.lang.String, java.lang.Object) on line 1079 (unsubscribeChild)

As I suspected...

I went ahead and migrated all the simple motion rules from rule manager to Simple Lighting so I can move forward with removing Room Manager.

I then deleted all the rooms (which was a pain because there's a bug that doesn't remove the child devices). Then I removed both smart apps from the hub entirely. Next I re-installed the smart apps and rebuilt the room manager configuration with the room I have been testing the Foyer Antechamber.

Boom! There's my subscriptions.

Event Subscriptions

Source Event Handler Filter
Wind Song (Location) mode modeEventHandler false
Foyer Motion Sensor motion.active motionActiveEventHandler true
Foyer Motion Sensor motion.inactive motionInactiveEventHandler true
Foyer Chandelier doubleTapped.1 buttonPushedEventHandler true
Foyer Chandelier doubleTapped.2 buttonPushedAsleepEventHandler true
Wind Song (Location) sunrise scheduleFromToTimes false
Wind Song (Location) sunset scheduleFromToTimes false

At long last it works.

Setting up a room I got this:

  dev:6812018-08-12 12:46:37.897:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateVentIndC() is applicable for argument types: (java.lang.Integer) values: [-1] Possible solutions: updateFanIndC(java.lang.Object) (updateVentIndC)
dev:6812018-08-12 12:46:37.505:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateOutTempIndC() is applicable for argument types: (java.lang.Integer) values: [-1] (updateOutTempIndC)
dev:6812018-08-12 12:46:37.007:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateContactRTIndC() is applicable for argument types: (java.lang.Integer) values: [-1] Possible solutions: updateContactRTInd(java.lang.Object), updateContactInd(java.lang.Object) (updateContactRTIndC)
dev:6812018-08-12 12:42:28.265:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateVentIndC() is applicable for argument types: (java.lang.Integer) values: [-1] Possible solutions: updateFanIndC(java.lang.Object) (updateVentIndC)
dev:6812018-08-12 12:42:28.145:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateOutTempIndC() is applicable for argument types: (java.lang.Integer) values: [-1] (updateOutTempIndC)
dev:6812018-08-12 12:42:27.649:errorgroovy.lang.MissingMethodException: No signature of method: dev1534083809267882146425.updateContactRTIndC() is applicable for argument types: (java.lang.Integer) values: [-1] Possible solutions: updateContactRTInd(java.lang.Object), updateContactInd(java.lang.Object) (updateContactRTIndC)

did you also remove the rooms occupancy driver code and reinstall it with the apps code?

No forgot about that.

ok … thats the reason for those error messages.

Silly me forgot all about the device.
Thanks

no worries … dont delete the rooms. just install the driver then go in and save each room.

a lot of trial and error with this double tapped thing for you … hopefully its resolved soon.

Everything is working as intended this far. I don’t know exactly the cause. I do see some correlation though.

I wasn’t keeping the device driver up to date. Granted after rebuilding everything even before updating the device driver seemed to solve the double tap issue, I can’t help but believe the hodgepodge updates I applied might have lended toward the problem.

I will also say that in recreation of all the rooms I noticed the devices were not created after the initial done click. I had to go back into the each child app and click done again. Then the app would create all the requisite devices.

Anyway. Thanks very much for your help! I apologize for any waisted debugging time spent if it was in fact my own fault.

that's awesome to hear!

we gave it a good beating and that highlighted a couple of things I need to fix:

  • one is remove room should work cleanly without needing to go to portal
  • the child device creation I need to take a look at and see why it needed a second done to create it

thanks for your patience in working thru this.

enjoy! :slight_smile:

1 Like

@doug waiting on this to get remove room working right:

till then you will need to:

  1. go to devices and remove the room occupancy device from the portal
  2. go to rooms manager and remove that room

thanks for finding this issue.

1 Like