turlvo / KuKuHarmony

SmartApp allowing you to control each 'Device' in Logitech Harmony Hub using Harmony-API
MIT License
52 stars 108 forks source link

Hubitat Port #2

Closed xxKeoxx closed 6 years ago

xxKeoxx commented 6 years ago

I am attempting to port this over to hubitat, and I am running into an issue where I get a 500 error when I attempt to select devices. I have been trying to figure out what is going on for 3 days now.

Can you give me any advice on how to debug this?

Here is the debug info I've added. Hopefully it helps you.

app:1732018-03-07 23:38:05.653:debug Line 818: [basement]
app:1732018-03-07 23:38:05.650:debug Line 810: discoverHubs_response: basement
app:1732018-03-07 23:38:05.649:debug Line 808: [hubs:[basement]] and [basement]
app:1732018-03-07 23:38:05.648:debug Line 803: discoverHubs_response >> [hubs:[basement]]
app:1732018-03-07 23:38:05.640:debug Line 107: KuKu Harmony Version
app:1732018-03-07 23:38:05.638:debug Line 104: harmony Devices
app:1732018-03-07 23:38:05.635:debug Line 95: discoverHubs
app:1732018-03-07 23:38:05.630:debug Line 89+: Harmony Hub List
app:1732018-03-07 23:38:05.625:debug Line 83+: dynamic main page
app:1732018-03-07 23:38:05.624:debug Line 78: atomicState = [basement]
app:1732018-03-07 23:38:05.617:debug Line 828: getHubAction>> ********:8282, /hubs, discoverHubs_response
app:1732018-03-07 23:38:05.616:debug Line 796: discoverHubs
app:1732018-03-07 23:38:05.612:debug Line 77: Running discoverHubs.
app:1732018-03-07 23:38:05.609:debug Line 71: Main Page
app:1732018-03-07 23:38:05.606:debug Line 64: parent Or Child Page
turlvo commented 6 years ago

hm... Would you give me more logs(Full log)? It seems that there is no log when you select device. Did you means that ‘select device’ is ‘Select Device’ menu after ‘Add a device’ -> ‘Select Hub’?

xxKeoxx commented 6 years ago

That is correct. So I add the harmony api server IP and port, then the menu to add devices shows up. I click on add Devices and immediately get a 500 error.

Let me see if there is a way to get more information from the logs.

turlvo commented 6 years ago

Well... Although hubitat' is almost same architecture with SmartThings, it seems that there is a little difference at SDK.

The code you mentioned is below.

        section("") {
            app( name: "harmonyDevices", title: "Add a device...", appName: "KuKu Harmony", namespace: "turlvo", multiple: true, uninstall: false)
        }
xxKeoxx commented 6 years ago

Yeah. I found that line, but I couldn't figure out which function was being called to create the list of devices. Or even what was causing the 500 error.

turlvo commented 6 years ago

At the main page if you select 'Add a device...', below page is executed.

// ------------------------------ // Pages realted to Child App def mainChildPage() { ... // finding hub by requesting harmony-api discoverHubs(atomicState.harmonyApiServerIP) ... //after selecting hub and requesting device list to harmony-api discoverDevices(selectHub)

xxKeoxx commented 6 years ago

Where is that function called from here:

section("") {
            app( name: "harmonyDevices", title: "Add a device...", appName: "KuKu Harmony", namespace: "turlvo", multiple: true, uninstall: false)
        }

I have a debug line in mainChildPage and that never shows up in the log, so I am inclined to believe it is not running.

turlvo commented 6 years ago

Hello,

Great!!. You did porting to Hubitat. I saw your github and hubitat commnunity post.

I’ll close this issue. Thank you.