Closed LouPaloma closed 5 years ago
Could you provide your config details?
My config: Home Assistant: v0.92.1 This Panel: v1.3.6_ak74 Component (Bwalarm): v1.1.4_ak74 Python: v(3,7,3,final,0)
No issues with or without MQTT.
Home Assistant: v0.92.1 This Panel: v1.3.6_ak74 Component (Bwalarm): v1.1.4_ak74 Python: v(3,5,6,final,0)
No issues without MQTT
Don't think this is a configuration issue. I think HA has deprecated the MQTT message approach. Looking at the code for the standard alarm component there are relevant changes there. See: HA PR #21959.
I'd fork your repo and test the code change myself, but my day job prevents me from getting to this before the weekend...
You're more than welcome to test it yourself. I checked 0.92.1 breaking changes and there's nothing about MQTT (but following your link I can see it's already there from 0.90.. hmm..). However, I updated my HA to 0.92.1 and cannot reproduce the issue.
Anyway, I've just uploaded a new version of alarm_control_panel.py, could you check it out? Mine works fine, I was able to arm my alarm via MQTT.
So I've upgraded to HA 0.92.2 and to your latest version (v1.1.5_ak74 per source code, but UI still shows 1.1.4_ak74), but the integration still doesn't work. I am seeing a different error on the logs now, though:
2019-05-05 10:22:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib64/python3.5/asyncio/tasks.py", line 240, in _step result = coro.send(None) File "/usr/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 363, in _async_add_entity await entity.async_added_to_hass() File "/usr/lib64/python3.5/asyncio/coroutines.py", line 223, in coro res = yield from await_meth() File "/usr/lib/python3.5/site-packages/homeassistant/components/mqtt/__init__.py", line 375, in async_subscribe async_remove = await hass.data[DATA_MQTT].async_subscribe( KeyError: 'mqtt'
I was having this same problem with the same versions as you, @LouPaloma. In troubleshooting something completely unrelated, I removed the “deps” directory from /config and restarted HA. This fixed the MQTT problem above. Worth a shot.
Huh.. my /config/deps
is completely empty anyway, wonder if anyone of you guys had something in there..
The deps directory is populated by HA upon startup. Mine was full of files. Deleting them only delayed HA startup until it could reinstall them. The issue remained.
However, I've set up a new conda environment using Python 3.7.3. Running HA under that version seems to resolve the issue. Still testing, though...
Any news on that?
Been a week of running fine. I'd say close the ticket. Thanks.
Hello! Can you help with this. I think its the same problem but not fixed changing Python version:
HA version | 0.103.2 Alarm Panel: v1.11.1 This integration: v1.11.1 Tryed with Python: 3.7.1, 3.7.4 and 3.8.1. No issues without MQTT
Traceback (most recent call last):
File "/srv/homeassistant-3.8.1/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 406, in _async_add_entity
await entity.async_added_to_hass()
File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 136, in coro
res = yield from await_meth()
File "/srv/homeassistant-3.8.1/lib/python3.8/site-packages/homeassistant/components/mqtt/__init__.py", line 433, in async_subscribe
async_remove = await hass.data[DATA_MQTT].async_subscribe(
KeyError: 'mqtt'
Error message its the same with all version (3.7.1, 3.7.4 and 3.8.1).
and my config of mqtt:
mqtt:
enable_mqtt: true
payload_arm_night: ARM_NIGHT
override_code: true
command_topic: home/alarm/set
qos: '0'
payload_arm_home: ARM_HOME
payload_disarm: DISARM
payload_arm_away: ARM_AWAY
pending_on_warning: false
state_topic: home/alarm
Without mqtt works fine.
could you please open a new issue as this one is closed?
Sure, thank you.
Describe the bug Enabling MQTT causes the alarm not to load and a log entry of "Signature of MQTT msg_callback 'custom_components.bwalarm.alarm_control_panel.message_received' is deprecated"
To Reproduce Steps to reproduce the behavior:
Expected behavior MQTT integration should work. Alarm module should work
Screenshots If applicable, add screenshots to help explain your problem.
Browser (please complete the following information):
Additional context Home Assistant 0.92.1