-
Notifications
You must be signed in to change notification settings - Fork 94
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
MQTT ARM_AWAY does not work #49
Comments
Same issue here |
The issue would seem to be the syntax changes for async functions in .82. I was able to avoid the bug by updating as follows:
|
@adipose Are you able to PR this fix? Happy to test on my system as well |
@danobot I could do that, but I have to be honest: my alarm is not updating when the mqtt messages arrive. I believe my update is correct, insofar as the new syntax for async has changed. If this change is not made, HA will not even boot because it gets stuck in the event loop. What's very strange, though, is the manual_mqtt alarm does not have the async_setup_platform set up as an async method. Everywhere else in the code base async_setup_platform is type async, except for manual_mqtt. Thus I speculated that bwalarm would also need to be non-async, but doing that results in the hang of HA. I will PR my fix, if I get mqtt working. For now, if you want to use my patch, you simply need to edit your bwalarm.py and remove all the lines that say: @asyncio.coroutine Then the "def" that immediately follows should be prefixed with "async." |
It's working now. I had to turn all the internal calls to async_ but leave the outer async_setup_platform without the async prefix. |
It's working now with override_code aswell. I needed that since my mqtt alarm panel doesn't have code for arming, only for disarming. |
Hi,
I am on HA v0.81.0 and bwalarm v1.0.4.
When sending an MQTT message to arm the alarm, I am getting this error in the logs:
The MQTT message is send from within a script:
My configuration is based on the default:
Can confirm the
alarm_disarm
script works as expected. Calling thealarm_arm_away
script causes this error. Tried isolating the problem as well by calling the MQTT publish service directly using these parameters:Same error:
This is a critical error because HA is unable to recognise the alarm panel afterwards. (the following log is generated when clicking on the ARM Away button in the alarm panel frontend.
The text was updated successfully, but these errors were encountered: