Trying to get a device handler working for the Horstmann / Secure SIR 321 switch - basically a switch for turning on a heating load (towel radiator, immersion heater etc). It’s a fairly basic device that broadly acts as a zwave switch but also has the ability to run for a defined period of time. The physical button can set it to run for 30, 60 or 120 minutes but via zwave you are supposed to be able to run it for between 1 minute and 1 day (1440 minutes).
Now I know I could achieve the same scheduling functionality using Smartthings and the scheduling options available however I was trying to get the native zwave functionality working, however I can’t for the life of me get it to work.
Although the zwave scheduling is quite complex this device only really accepts a very simple variant - basically you set the schedule to start now and how long you want it to run for.
Looking at the zwave specs you have to send the following command:
However I can’t figure out in Smartthings how to do this. The right command looks to be to return one or more physicalgraph.zwave.commands.schedulev1.CommandScheduleSet statements, however the spec for that seems to be missing the last element of the zwave spec - i.e. the actual commands you want the device to run (available options are:
Based on the zwave spec I think I basically need to send it a binaryswitch on event (so command class 0x25, command 0x01 and value 0xFF (for on)). I’ve tried guessing there is an undocumented property with a few obvious guesses (e.g. cmdBytes, cmd) but no joy. Trying using the useridentiifer (which is not in the zwave spec but is in Smartthings interpretation) doesn’t seem to work either. The device will respond to a schedule get command and basically shows no schedule set irrespective of what commands I sent it!
Has anyone had any luck using the zwave schedule specific commands? Anyone from the Smarthings team clarify how this should be set?
sidjohn - that definitely looks like a useful DTH and I’ll double check, however I think the issue is more how to send the info to the device rather than what it supports.
I managed to find out that if I select the button on the device which makes it run for say 30 minutes then run a CommandScheduleReport I get a valid response showing the schedule has been set. However I have my suspicion ST hasn’t properly implemented the schedule command class - the response I get is:
It’s actually doing nothing with the last four bytes. The 03 is giving the length of the binary switch command in bytes, which ST isn’t parsing. When you tried adding the command to the end of the formatted zwave command, did you include the length byte? Based on the spec, you should be appending “032501FF” to the formatted set schedule command.
Also, note that the spec says that startYear, startHour, and startMinute need to be set to 255, 31, and 63 as shown in the ST parse if they’re not being used.
My best guess would be to give this a try as your formatted zwave command for a 30 minute run time:
yes you are right in terms of it failing to parse the last four. And yes I did add the 03 byte count as well. I wasn’t setting any start times etc as per the zwave spec because it only supports a ‘start immediately’ and the spec says:
184.108.40.206 Start Time option: Start now
The start now option is used to make a configured schedule start immediately (upon reception of the
Schedule Set Command).
A node that supports the start now option, MUST support the creation of a schedule starting
immediately when all start time fields are left unspecified.
However your suggestion on the star times seems to have done the trick - can I ask where you saw that?
You’re welcome! A little further down in 220.127.116.11, for example:
Start Year (8 bits)
This field is used to set the year for which the schedule is to start. This field MUST be in the range 0…99 or set to 0xFF. Values in the range 0…99 MUST indicate the actual year last 2 digits. A node MUST accept a value lower than the current year to allow schedules starting in the next century. The value 0xFF MUST be used to indicate that the start year is unspecified.
It lists values for other fields when unspecified, but these are the only three that are nonzero. They’re also the only three where a zero value has meaning, so it makes sense why they went this route. It would be nice if the ST object defaulted to the unspecified value for these instead of zero though.