-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
idle_*.cmd scripts are no longer called #618
Comments
Hello. To have this work, I just added the following lines to hasp_dispatch.cpp, under line 1359 (the end of function dispatch_idle_state):
I don't know the purpose of the "source" parameter to dispatch_run_script, and it looks like it is not actually used for anything, so I just passed the uint8_t "state". |
Hey @oklona aren't the filenames incorrect? Based on the docs those are supposed to have Even if the names are different, did that fully work? |
Yeah, I just copied it from the "dispatch_idle" function below in the source file, which I don't see being called from anywhere. I didn't research much, but it seems to me that "dispatch_idle" was previously used, but was replaced by "dispatch_idle_state". Therefore I assumed I had simply misunderstood the docs. So I did change my file names to use underscore instead of dash. -But apart from that, it worked 100%. Obviously, changing the underscore to dash in the source code would do the same, but during debug I see that underscore is used also for mqtt_on.cmd, mqtt_off.cmd and such. So to me it seems like at some point developers have decided to use underscore. |
Oh yeah!!! It works 😄. Thanks for that, I guess it would be great to create a PR to the repo. |
It could be wise to check with the reason behind the revert commit mentioned above. It moved the script calls to |
Agreed. This looks like it has been forgotten somewhere (I cannot find anywhere in the code actually calling |
Created pull request |
PR accepted, tested, closing the issue. |
Perform all steps below and tick them with [x]
Describe the bug
with today's git HEAD (8d5ae79), the following has arisen:
The
idle_*.cmd
scripts are no longer called. Very likely due to this commit and #601Right now, I have
MQTT PUB: idle => long
in the logs, but noMSGR: Loading L:/idle_long.cmd
To Reproduce
idle_long.cmd
Expected behavior
upon idle_long, the idle_long.cmd script should be called. (same for and idle_short, and idle_off)
Screenshots or video
none
The text was updated successfully, but these errors were encountered: