Trying to use a Virtual Shade to simulate a gate opening and closing in Homekit, but I can’t seem to override the Opening and Closing status once the process has started. The driver has a button for “Stop Position Change”, but nothing seems to override the action once triggered.
This command is meant for use with Start Position Change, where it will gradually raise or lower until the Stop Position Change command or the extreme of the range is reached. It sounds like you might be trying to use it another way?
Thanks for the reply. I’ve actually tried several methods, one of which was the Start Position Change, however nothing seemed to change when I would set the parameter to the opposite position of the shade’s current state, and click the Run button. A also just tried it from Rule Maker, using the startPositionChange custom action with the parameter set to the string open, and that didn’t seem to work either.
C8 Pro - 2.5.0.159
Still struggling with the Virtual Shade. "Start Position Change" does not seem to work at all, and "Set Level" does not use the "Duration" parameter, it just uses the "Transition Time" specified in Preferences.
Looking at the "Virtual Shade" driver more closely, I see the startPositionChange() and stopPositionChange() commands are just not implemented. If you checked Logs, you should see the driver log this information, too, when you try (or in Past Logs after the fact). These commands are a bit odd for a virtual devices since there's no real level to slowly change, but I some slow change could be simulated if that would be useful for anything.
There does appear to be an issue where the duration parameter is ignored with setLevel(). This is again a bit odd since setLevel() basically just an alias for setPosition(), and setPosition() doesn't allow a level parameter. The "Transition time" preference is effectively used as the duration the change should take, allowing you to simulate real-world devices that move (or at least report) slower or faster, in line with many that don't actually let you control the speed of any specific change.
If you explain more about what the use is for needing to do anything specific or have the device report in a specific way, I can see if any changes might help, or you can try a custom virtual driver, which (not having real devices behind them) tend to be relatively simple to write and would allow you whatever customization might be helpful on the driver side -- or maybe a different driver would be more appropriate for your case (Virtual Garage Door or something else?).
Thanks. I'm using it to simulate an automatic gate for my driveway. The garage door might be a better choice from a functional standpoint, but my primary goal is to get it into Homekit, and I don't want it to have the same icon and animation as our actual garage doors. My reason for wanting the ability to use a Duration with Set Level is so I can immediately override the Transition Time preference, and set the "gate" as opened or closed depending on the contact sensor status. The gate controller itself (Mercury 310) does not have any feedback as to position or status (or at least well above my electronics know-how), so the contact sensor is my only feedback. Unless it is set in latch mode, the gate automatically closes after a set duration of being opened, so I'm not sure as well if that would play nice with the Garage Door apps. (I currently have the Zooz Garage Door app controlling mine). Thanks again.