Closed arkadicolson closed 1 year ago
Hi,
On your IOS device, you would have to trigger the GarageDoor to be opened for a "Set" command to occur. I just noticed you did this, so let's continue. A GarageDoor does not request to change the "CurrentDoorState". instead it sends a "TargetDoorState" of OPEN or CLOSED I think you got this too. The problem I see is the debug log of "Setting ( Cached ) Garagepoort_2 TargetDoorState 0" The key issue being "Cached" which is not executing your script.
I think you need to poll for "lockTargetState" which I believe resolve the issue.
You should see CMD4 displaying a debug log that it is executing your script.
You should also to remember to always exit the script properly. exit 0
Ttyl, John
On Fri, Oct 14, 2022 at 9:08 AM arkadicolson @.***> wrote:
Assigned #132 https://github.com/ztalbot2000/homebridge-cmd4/issues/132 to @ztalbot2000 https://github.com/ztalbot2000.
— Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/132#event-7590249694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5C26Z6KSLCJQRUF7DWDFLM7ANCNFSM6AAAAAARFHHOYY . You are receiving this because you were assigned.Message ID: @.***>
Hello again.
Did you have any success?
In the homebridge-cmd4 distribution in the sub path of Extras/Cmd4Scripts there is a javascript file called State.js. Every possible "Get/Set" option is listed there and it could be used as a state_cmd. What is also important is that it handles persistence of TargetDoorState and Setting currentDoorState afterwards, so the door does not get stuck openning. I might have misspoke with polling for "lockTargetState" it might have been "targetDoorState". The state.js file has the proper documentation, as does the Homebridge-Cmd4 github documentation. If your still stuc, just ask and I'll create a proper config.json and send it to you.
Ttyl, John
On Fri, Oct 14, 2022 at 9:30 AM John Talbot @.***> wrote:
Hi,
On your IOS device, you would have to trigger the GarageDoor to be opened for a "Set" command to occur. I just noticed you did this, so let's continue. A GarageDoor does not request to change the "CurrentDoorState". instead it sends a "TargetDoorState" of OPEN or CLOSED I think you got this too. The problem I see is the debug log of "Setting ( Cached ) Garagepoort_2 TargetDoorState 0" The key issue being "Cached" which is not executing your script.
I think you need to poll for "lockTargetState" which I believe resolve the issue.
You should see CMD4 displaying a debug log that it is executing your script.
You should also to remember to always exit the script properly. exit 0
Ttyl, John
On Fri, Oct 14, 2022 at 9:08 AM arkadicolson @.***> wrote:
Assigned #132 https://github.com/ztalbot2000/homebridge-cmd4/issues/132 to @ztalbot2000 https://github.com/ztalbot2000.
— Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/132#event-7590249694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5C26Z6KSLCJQRUF7DWDFLM7ANCNFSM6AAAAAARFHHOYY . You are receiving this because you were assigned.Message ID: @.***>
Here is a config.json for a working GarageDoorOpener { "type": "GarageDoorOpener", "name": "My_GarageDoorOpener", "displayName": "My_GarageDoorOpener", "manufacturer": "GarageDoorMan", "currentDoorState": "OPEN", "targetDoorState": "OPEN", "obstructionDetected": "FALSE", "lockCurrentState": "UNSECURED", "lockTargetState": "UNSECURED", "polling": [ { "characteristic": "currentDoorState" }, { "characteristic": "targetDoorState" }, { "characteristic": "obstructionDetected" }, { "characteristic": "lockCurrentState" } ], "stateChangeResponseTime": 10, "state_cmd_prefix": "node", "state_cmd": ".homebridge/Cmd4Scripts/State.js" },
The State.js file as I previously mentioned is distributed with Cmd4. If you still have problems, just reopen the issue.
Take care, John
Hi
Sorry for the late answer but it works again. Polling lockTargetState did the trick. Thanks for your help!
Arkadi
On 15/10/2022 12:18, John Talbot wrote:
WAARSCHUWING: Deze mail is afkomstig van buiten Smartbit. Klik niet op links en open geen bijlagen, tenzij je deze mail verwacht en hij afkomstig is van een betrouwbare bron.
Hello again.
Did you have any success?
In the homebridge-cmd4 distribution in the sub path of Extras/Cmd4Scripts there is a javascript file called State.js. Every possible "Get/Set" option is listed there and it could be used as a state_cmd. What is also important is that it handles persistence of TargetDoorState and Setting currentDoorState afterwards, so the door does not get stuck openning. I might have misspoke with polling for "lockTargetState" it might have been "targetDoorState". The state.js file has the proper documentation, as does the Homebridge-Cmd4 github documentation. If your still stuc, just ask and I'll create a proper config.json and send it to you.
Ttyl, John
On Fri, Oct 14, 2022 at 9:30 AM John Talbot @.***> wrote:
Hi,
On your IOS device, you would have to trigger the GarageDoor to be opened for a "Set" command to occur. I just noticed you did this, so let's continue. A GarageDoor does not request to change the "CurrentDoorState". instead it sends a "TargetDoorState" of OPEN or CLOSED I think you got this too. The problem I see is the debug log of "Setting ( Cached ) Garagepoort_2 TargetDoorState 0" The key issue being "Cached" which is not executing your script.
I think you need to poll for "lockTargetState" which I believe resolve the issue.
You should see CMD4 displaying a debug log that it is executing your script.
You should also to remember to always exit the script properly. exit 0
Ttyl, John
On Fri, Oct 14, 2022 at 9:08 AM arkadicolson @.***> wrote:
Assigned #132 https://github.com/ztalbot2000/homebridge-cmd4/issues/132 to @ztalbot2000 https://github.com/ztalbot2000.
— Reply to this email directly, view it on GitHub
https://github.com/ztalbot2000/homebridge-cmd4/issues/132#event-7590249694, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSBCX5C26Z6KSLCJQRUF7DWDFLM7ANCNFSM6AAAAAARFHHOYY . You are receiving this because you were assigned.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/132#issuecomment-1279713460, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT22SE6EBKJISMHN7COYITWDKAIDANCNFSM6AAAAAARFHHOYY. You are receiving this because you authored the thread.Message ID: @.***>
Hi
I'm trying to get garagedoor working with this config
I just started with this simple test script:
Get commands are displayed in /tmp/homebridge_scripts.log but I do not see any Set commands when pushing the garagedoor in the home app
I do see this in the homebridge log:
but I cannot catch it in my state_cmd script. Any idea why? Something cache related?