Please help me to migrate ST device handler to HE

I would like to ask for help to convert/migrate ST device handler to be usable on HE.
The device handler is located on below link:

The reason why I need this device handler instead of Generic Z-wave Contact Sensor because the custom one (ST) have ability to set up wakeup time for contact sensor. I have installed sensors on windows that are not quite often open and after 24 hours of inactivity sensors are reporting inactive status. By above custom device handler I can initiate wakeup on contact sensors to keep them in active state.

I replaced physicalgraph with hubitat and device handler start running but I still have issues with the CONFIGURE cmd that reporting the below error:

errorgroovy.lang.MissingMethodException: No signature of method: user_driver_krlaframboise_Neo_Coolcam_Door_Sensor_609.sendHubCommand() is applicable for argument types: (java.util.ArrayList, java.lang.Integer) values: [[8405, delay 500, 3002, delay 500, 8002, delay 500, 700501, ...], ...]
Possible solutions: sendHubCommand(hubitat.device.HubAction), sendHubCommand(hubitat.device.HubMultiAction) on line 162 (executeConfigure)

I think most of the built-in handlers set the wake up interval to 12 hours and I read something about the latest hub update forcing state change on battery reports which will most likely solve the problem you've been having with the built-in handler...

If not, replace the sendCommands code block with that code block from one of my other Hubitat handlers on GitHub like the Zooz Remote Switch...

2 Likes

@krlaframboise Thanks for the help. I changed the device handler according to your instruction.
Some of the contact sensors successfully updated and everything is set as it should be:

Current States

  • battery : 100*
  • checkInterval : 129900*
  • contact : closed*
  • lastCheckIn : 11/20/2020 05:03:33 PM*
  • syncStatus : Synced*

State Variables

  • lastUpdated : 1605888173817*
  • configVal1 : 0*
  • wakeUpInterval : 43200*
  • configVal2 : 255*
  • refreshSensors : false*
  • lastBattery : 1605888213899*
  • refreshConfig : false*

But some of the contact sensors were updated partially where wakeUpInterval is missing and also sync was not initiated :frowning:
I initiated manual wake up on each one but did not fix the issue.

Current States

  • battery : 100*
  • contact : closed*
  • lastCheckIn : 11/20/2020 05:20:03 PM*
  • syncStatus : 2 Pending Changes*

State Variables

  • lastUpdated : 1605890641029*
  • configVal2 : 255*
  • refreshSensors : true*
  • lastBattery : 1605889200348*
  • refreshConfig : false*

I still don't see the need to use a custom handler for this device.

The device's factory wake up interval is most likely either 12 or 24 hours and if the built-in handler is changing it then it's most likely changing it to either 12 or 24 hours. It only has 2 other settings and they're both related to associations which is a feature you're not using. Basically all this handler does is create a bunch of extra events that aren't necessary...

FYI, you have to manually refresh the web page to see changes to the state variables and "checkInterval" is part of a ST capability so it will disappear every time you refresh the page. Clicking refresh might clear the stored config values causing it to change back to showing 2 pending changes.

I used the default Generic Z-Wave Contact Sensor on all of my Neo Coolcam contact sensors but in case window was not open for more then 24 hours the contact sensor was marked as inactive.
I also don't see any activities in Event logs of contact sensors nor in "Last Update Time", "Last Activity At".
In the Generic device handler there is no "REFRESH" option so in case I'm using your ST device handler I'm able to initiate "Refresh" via webCoRE on devices where I was not able to set up "wakeUpInterval".

The handler can't communicate with the device when it's sleeping so all the refresh command does is set a flag that causes the handler to request information from the device the next time it wakes up...

Ahhh, ok. Thanks for the information.
I wasn't aware how this whole thing communicating. What I discovered is when piston found inactive device, it just sent "Refresh" cmd to it what updated the table "Last Activity At" with fresh/current date/time and this update prevented device to be marked as inactive.
I never interested about the communication between the hub and z-wave devices as it was working fine on ST but on HE I'm having issues due to the inactive windows contact sensors that following get in state "FAILED" in "Z-Wave Details". This is the only thing that not really working for me on HE :frowning:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.