[OBSOLETE] Simple Device Viewer

I deleted that post because I just realized he was using a community DTH created by mitchpond and there have been multiple releases since I sent those changes to him.

Which DTH are you using with it?

Thanks for looking into it.

Jordan

try this,

under:

log.debug “Parse returned $results”

add:

log.debug “Parse returned $results”
// send event for heartbeat
def now = new Date()
sendEvent(name: “heartbeat”, value: now)

Like this?

How long before I should start seeing events rolling in?

I think the other user had to use polling because the battery reporting wasn’t reliable with that DTH, but the device didn’t reliably report back at regular intervals so adding something to the parse method wouldn’t work.

Some of that DTH has been re-written since I last looked at it so it’s possible your recommendation will work now, but I recommend using something like “lastCheckin” instead of “heartbeat” because heartbeat is an actual zigbee attribute that has a different purpose. I also recommend declaring the attribute that is used.

That code needs to go between the "log.debug “parse returned…” line and the “If (description…” line.

1 Like

This?

Yes that’s the correct location.

I’m not sure if this is necessary, but if you want to be able to open the device from the IDE and see that value, add the following line in between "capability “tamper” and "command “configure” near the top of the page.

attribute "lastCheckin"

I’m still not sure if those changes will work, but it’s worth a shot.

groovy.lang.MissingMethodException: No signature of method: script1483032521350917247008.attribute() is applicable for argument types: (java.lang.String) values: [lastCheckin]
Possible solutions: attribute(java.util.Map), attribute(java.lang.String, java.lang.String), attribute(java.lang.String, java.lang.String, java.util.List), tileAttribute(java.lang.String), attributeState(java.lang.String) @ line 25

Sorry about that, it should have been:

attribute “lastCheckin”, “String”

1 Like

I just installed the Simple Device Viewer earlier today and each time I try to access the All - Device States it times out, in the log I see java.util.conncurrent.timeoutexception: Execution time exceeded 20 app execution seconds:???@ line 928, although that line number changes with each execution, 636 was another.

Smartthings has a 20 second limit to run smart apps. How many devices do you have?

SmartApps can only run for 20 seconds at a time and if they exceed that, an exception is thrown from whatever line it was on at that time.

The All Device Status screen tries to get the data for each attribute for every device and if you have a lot of devices selected it will run out of time. I didn’t include that screen in the web dashboard because of that problem.

Will this allow me to send a push or sms one day of the week at a specified time with the battery status of things?

No. There’s another SmartApp on the forum called something like Device Monitor and I think it might provide the functionality you’re looking for.

Thanks, I guess I have too many devices for that function.

I’m still working out some kinks in my new Simple Event Logger SmartApp, but after that I plan on adding some new capabilities to this SmartApp . (light, humidity)

While I’m making those changes I’ll see if I can make some optimizations to the code in order to get that section to work for users with a lot of devices. I now have enough devices to experience the same problem which will make it a lot easier to troubleshoot.

Can you provide a view of energy monitors? I can select my energy monitor in the Sensor list in device selection, but don’t see a way to view it’s activity in your app.

I’ll add that to the list for the next release.

Light and humidity are already on the list, but if there are other capabilities anyone would like to see, now is the time to ask.

1 Like

I just released a new version that adds the capabilities listed below, but I didn’t have time to find/create images for them so for now, it just displays their values.

  • Energy Meter
  • Illuminance Measurement
  • Power Meter
  • Relative Humidity Measurement
  • Valve

These capabilities are available for viewing, but they are not included in the notification feature.

3 Likes