SmartThingsCommunity / SmartThingsPublic

SmartThings open-source DeviceType Handlers and SmartApps code

Home Page:https://developer-preview.smartthings.com/docs/devices/hub-connected/get-started

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fibaro Double Switch 2 ZW5: NumberFormatException changing settings

rockberte opened this issue · comments

I try to change the "Switch type" setting either in classic or in the new SmartThings app.

Doing this results in the following error in the SmartThings Live Logging after leaving the settings page of the device.
java.lang.NumberFormatException: For input string: "5.0" @line 171 (doCall)

The settings don't get applied with this issue.

@rockberte did this device ever use a different DTH or was it always on the default DTH that we publish?

Well I'm not sure - I connected the device long time ago. Maybe I used a different DTH at this time, but I really can't remember.
I didn't change anything since that time.

Because of your question I used the Groovy IDE and took a look at the settings of the device.
Looking at the DTH code I figured out that there are some settings that might lead to that effect:

ch1pulseTime = 5.0
ch2pulseTime = 5.0
periodicEnergyReports = 3600.0
periodicPowerReports = 3600.0

I changed them inside the Groovy IDE to the following values:

ch1pulseTime = 5
ch2pulseTime = 5
periodicEnergyReports = 3600
periodicPowerReports = 3600

After that I run into another issue which is currently related to my hardware setup.
I need to change the HW setup first to completely test these changes.

Yesterday I was able to change my hardware setting and could test this with my changes mentioned in the previous post.
With the changes in the attributes I was able to change the "Switch type" without any error.

I really don't know where I got the invalid values from.
Anyway the isse is solved for me.