All Zigbee buttons showing 0% Batteries (7 September 2018) Solved


(Eric) #1

All my buttons show 0% battery from last night. They all are working and changing the battery makes no difference.


[Release] SHM Delay Version 2.0
(Bob Kerr) #2

What DTH are you using?


(Eric) #3

Stock ZigBee Button.


(www.smartukhome.co.uk) #4

I Believe they have made backend changes which is causing math calculations to be wrong or bad code has now become errors. My smartapp is now full of errors


(Brad) #5

There was a change yesterday which is causing this for devices using the zigbee-button, nyce-motion-sensor, or nyce-open-closed-sensor device handler. It may also be impacted custom devices which use this:

result.value = Math.min(100, (int) pct * 100)

The above can be changed to

result.value = Math.min(100, (int) (pct * 100))

Or

result.value = Math.min(100, Math.round(pct * 100))

We’re looking at a hotfix and I’ll keep this thread updated.


(Luke - Backend Engineer) #6

We upgraded major versions of Groovy yesterday for executing SmartApps and DeviceTypeHandlers, which included some rather major changes to the language.

If you want to DM me I’d be happy to help you dig into the issues that you are experiencing


Platform Changes to Groovy (6 September 2018)
(Jimmy) #7

This…seems like something that may have been good to commmunicate.


(Bob Kerr) #8

Don’t you know that Samsung’s slogan is to “always be proactive, after the fact”?


(www.smartukhome.co.uk) #9

wouldn’t it be more useful to start a topic with whats been deprecated/added/updated

There appears to be quite a few apps & dh that are now getting errors

currently my error is
org.codehaus.groovy.runtime.typehandling.Groovy…[TRUNCATED]


(Brad) #10

What’s the full error?


(www.smartukhome.co.uk) #11

thats all i get in the ide logs


(Eric) #12

Support has been fantastic and it looks like a fix is in the works.


(Brad) #13

A hotfix was deployed. If your device is still reporting 0%, try tapping the “Refresh” tile in the Classic app or remove/re-add the batteries.


(Eric) #14

Can confirm all is good now. THANK YOU!! :+1:


(Brad) #15

Hmm, I took a look but nothing is standing out.

If anyone is seeing strange behavior since about 2018-09-06 12pm EDT yesterday, please flag it. We’re working to address other issues such as this but may miss the obscure errors.


(www.rboyapps.com - Make your home your butler!) #16

What version of groovy is it using now?
Anything devs need to watch out or change for a smooth transition ?


(Brad) #17

Version 2.5.6


(www.rboyapps.com - Make your home your butler!) #18

Thanks. Looking at the release notes I came across this:

  • The extension methods for the java.util.Date class are now in a separate groovy-dateutil module which isn’t included by default when using the groovy-all pom dependency. Add the additional module as a dependency if you need it or consider migrating to the java.time JSR-310 classes (similar Groovy extension methods exist for those classes and they are included by default when using the groovy-all pom dependency).

Any changes required to SA/DTH using Date class methods or is that compatibility inclusion/naming handled internally by the platform?


(Glen King) #19

C’mon guys. Why can’t you communicate this stuff - or better yet, not make changes that destroy basic functionality??


(Jimmy) #20

i would hope they keep the code base update. but communication is nice. Did SmartThings ever update to Grails or whatever they were thinking about back in the day?