Skip to content
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

Scheduled Jobs not functioning with MQTT Gateway disabled #3404

Closed
2 of 3 tasks
anjanms opened this issue Nov 3, 2023 · 1 comment · Fixed by #3409
Closed
2 of 3 tasks

Scheduled Jobs not functioning with MQTT Gateway disabled #3404

anjanms opened this issue Nov 3, 2023 · 1 comment · Fixed by #3409
Labels
bug Something isn't working

Comments

@anjanms
Copy link

anjanms commented Nov 3, 2023

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Docker

Z-Wave JS UI version

9.3.1

ZwaveJS version

12.2.3

Describe the bug

Having previously disabled the MQTT Gateway, as I'm using the websocket with Home Assistant. I created scheduled jobs to get some Z-Wave specific tasks out of HA. Over the next few days I realized the scheduled jobs were not running, but the code would correctly perform its task when ran manually via Driver Function.

After watching the logs and reading the source, I realized the scheduled jobs were not being created at runtime due to me having disabled MQTT. Enabling the MQTT Gateway brought the scheduled jobs to life.

I did not see anything in the docs about this dependency, however I don't think this is intentional.

To Reproduce

Create a scheduled job, such as one that runs every minute and logs a message. Observe logs to see that scheduled job functions. Then toggle on the Disable MQTT Gateway switch. Observe logs to see that no scheduled jobs function.

Expected behavior

Scheduled jobs should function irrespective of the enabled/disabled state of MQTT.

Additional context

Relocating the event binding and having the event handler for _onDriverStatus check this.mqttEnabled like _onNodeInited does is one solution.

Assuming I haven't missed some actual MQTT dependency somewhere.

@anjanms anjanms added the bug Something isn't working label Nov 3, 2023
@robertsLando
Copy link
Member

I can look at this issue on Monday, thanks for the detailed report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants