Cobra
March 4, 2018, 6:09pm
1
@mike.maxwell
Mike I just tried to use you zone motion manager app from ST
Seemed to import the code for the driver and app ok
When I try to create a new zone I get a server error "Error 500"
EDIT:
I had forgotten to add the child app!
But.. now when I try to add a new zone the app is blank
Any Ideas?
Andy
The built-in Motion Lighting app doesn’t work for you? Just curious why you needed the zone motion manager instead.
Cobra
March 4, 2018, 6:27pm
3
I use it to aggregate motion between a number of motion sensors.
It creates a virtual sensor that I can use in my other apps
Does your real-time log give you any further details? Open a new tab on your log page and leave it open. It’s probably a code change from Smartthings to Hubitat that’s missing.
Cobra
March 4, 2018, 6:36pm
5
Nothing that actually helps
“2018-03-04 18:33:38.002:errorCannot get property ‘device’ on null object on line 46”
There is nothing on line 46 in the child or parent or Driver which relates to ‘device’
It’s probably the call that line feeds back to that is missing a designation. Can you post the source, or link to it?
Cobra
March 4, 2018, 6:40pm
7
You’ve changed all instances of physicalgraph to hubitat already?
Cobra
March 4, 2018, 6:42pm
9
Nope… 1st try at importing something…
How do I do that?
Is there a link to some info somewhere?
Yeah. Open your code, search for “physicalgraph” and replace every instance with “hubitat” instead.
Cobra
March 4, 2018, 6:48pm
11
There was only one instance on line 47
But still no go.
Still getting the same error message, or something different?
Cobra
March 4, 2018, 6:55pm
13
Almost identical
it just says line 47 now not 46
Cobra
March 4, 2018, 6:57pm
14
This is the section of code it relates to:
def getHubID(){
def hubID
if (myHub){
hubID = myHub.id
} else {
def hubs = location.hubs.findAll{ it.type == hubitat.device.HubType.PHYSICAL }
// log.debug "hub count: ${hubs.size()}"
if (hubs.size() == 1) hubID = hubs[0].id
}
//log.debug "hubID: ${hubID}"
return hubID
}
Line 47 is the 1st line after the else statement
Yep, you’ll have to wait for one of the resident experts to get back to you then. I’m good for basic find and replace to get the process started.
Cobra
March 4, 2018, 6:59pm
16
I’m not sure what the getHubID method is for
It’s not called from anything that I can see
Cobra
March 4, 2018, 7:01pm
17
Thanks for the tips anyway
It’s called at line 69 and line 218. It’s how the child device communicates with the parent app, as far as I can tell.
Cobra
March 4, 2018, 7:08pm
19
Don’t know how I missed that!
Perhaps a different method of sending variables to the parent is used with hubitat?
Here's what Mike said below and I am patiently waiting. I don't think I can tolerate my ST motion sensors without this app.
Yes, Zone Motion Manager will be built in at some point, it’s really only waiting for me to create the user manual, given that it’s a bit of a niche app. I’m currently running a slightly newer version, virtually unchanged from the original, except the Hubitat version uses our built in virtual motion driver.