-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatelessProgrammableSwitch not triggering actions in Home App #73
Comments
Thanks for uding Cmd4.
I don't see anything specifically wrong. Try running Homebridge in debug
mode.
DEBUG=* homebridge -D
You will see the actual setCmd that is being executed, which you can try
yourself outside of Homebridge.
if you are really stuck, send me your config.json and any scripts you are
using and I will have a look.
TTFN,
John Talbot
ztalbot2000@gmail.com
…On Sun, Dec 27, 2020 at 3:22 AM gui28347 ***@***.***> wrote:
Not sure if I'm doing it correctly, after creating a Stateless button, I
can see it in homebridge with no issues.
I used my phone to associate an action to SINGLE_PRESS action (turn a
specific light on)
I'm executing the script:
State.js Set Button3 ProgrammableSwitchEvent 0
The scene is not being triggered. I tried using a different plugin (
https://github.com/jnvaldenaire/homebridge-http-programmableswitch/blob/master/index.js)
and it worked with no issue (same phone & same light).
Is the parameter or value I'm using incorrect ?
Thanks,
Gui
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#73>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSBCX2B4GWIRIAZG4BXAFDSW3VFRANCNFSM4VKTUQFA>
.
|
Let me know if you need any additional info. Gui |
Hi, I certainly don't know every device and every characteristic. I wrote this plugin just to see what the Home App on IOS could do without any devices. It has evolved into this do everything for everyone plugin. I achieved this by adding the following to your config.json |
Thanks for quick reply! I tried with your proposed change, so now I have in my config:
Thanks |
I believe I found, not sure yet where add it to your code to fix the issue. I found in the other plugin, they are using " self.triggerSwitch(i, 1); " to cause the trigger event to homebridge. I believe you are not using it. |
Couple changes and I got the button working. #1 - Add this function to index.js function readFSLastWrittenTime(a,b) #2 - Change the getvalue:function if (characteristicString == "ServiceLabelIndex")
#3 - Set polling to 3 seconds in your config file for button. This way it will monitor and if file modified date is less than 3 seconds it will trigger the action which the value of file contents. Feel free to re-use this code and add to your project if you want, or just close this issue. BTW: I moved read/write function to index.js so no external child process being created. You can still use State.js to read/write files, but for people using polling in multiple accessories or with high frequency polling the performance is much better without having to create external processes. Thanks |
Not sure if I'm doing it correctly, after creating a Stateless button, I can see it in homebridge with no issues.
I used my phone to associate an action to SINGLE_PRESS action (turn a specific light on)
I'm executing the script:
State.js Set Button3 ProgrammableSwitchEvent 0
The scene is not being triggered. I tried using a different plugin (https://github.com/jnvaldenaire/homebridge-http-programmableswitch/blob/master/index.js) and it worked with no issue (same phone & same light).
Is the parameter or value I'm using incorrect ?
Thanks,
Gui
The text was updated successfully, but these errors were encountered: