akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
80 stars 31 forks source link

Mqtt do not working after upgrading to 0.103.2 #63

Closed rrbarrero closed 4 years ago

rrbarrero commented 4 years ago

Your components (from Alarm/Settings/About): Alarm Panel: v1.11.1

Platform & Browser: Raspbian GNU/Linux 10 (buster) Python virtualenv HA version | 0.103.2 This integration: v1.11.1 Tryed with Python: 3.7.1, 3.7.6 and 3.8.1. Currently with 3.7.6

Describe the bug No issues without using MQTT integration of the Hass-Custom-Alarm

2019-12-19 19:21:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 406, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 132, in coro
    res = yield from await_meth()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 433, in async_subscribe
    async_remove = await hass.data[DATA_MQTT].async_subscribe(
KeyError: 'mqtt'

To Reproduce Steps to reproduce the behavior: Upgrade to HA version 0.103.2

Expected behavior Continue working as always with mqtt support.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Tryed with Python: 3.7.1, 3.7.6 and 3.8.1. Currently with 3.7.6 Mqtt broker is working ok and also tryed in HA. Working as expected. If I disable mqtt at resources/bwalarm/bwalarm.yaml it load and work successful.

blackvrs commented 4 years ago

Same issue. After change mqtt to false on bwalarm.yaml and restart ha working again.

Dawnes commented 4 years ago

Same behaviour in hassio. Last known good for me is 0.102.3.

akasma74 commented 4 years ago

My 103.0 is working fine. Anyway, I'll look into it if they don't fix in the next release as it's more likely their bug and I can only provide a workaround - not the best way imo.

mperci commented 4 years ago

Same issue for me. Every time I enable MQTT the alarm panel breaks. Easy enough to turn it off, but I use the MQTT outputs with nodered to do a lot of things.

bwalarm_mqtt

e2m32 commented 4 years ago

Issue still persists in 0.103.5

e2m32 commented 4 years ago

My 103.0 is working fine. Anyway, I'll look into it if they don't fix in the next release as it's more likely their bug and I can only provide a workaround - not the best way imo.

Just downgraded to 0.103.0, and it is working for me as well 👍

@akasma74 Thank you for all your hard work in maintaining this project!

e2m32 commented 4 years ago

Tested 0.103.1 Looks like that's where it broke. 0.103.0 is good, anything above is busted.

kmycek commented 4 years ago

Upgraded to HA 0.104.2, and it's still broken. Before the upgrade, I had MQTT enabled in BWAlarm. I use it with a custom node red alarm dashboard. Downgrading back to 0.103.0 for the time being...

akasma74 commented 4 years ago

The fix is not included in the release, hence this issue's status. Check that out.

e2m32 commented 4 years ago

Just updated to 0.105.2 and MQTT is broken :(

With your fix, everything was working in 0.104.x After updating to 0.105.1, I don't see any errors and the alarm works without MQTT, but alarm doesn't respond to MQTT messages. I have confirmed that my MQTT Panel is still sending messages correctly.

The alarm does correctly publish the state, it just doesn't respond to the home/alarm/set topic.

akasma74 commented 4 years ago

it's a completely different issue, isn't it? please open a new one.

akasma74 commented 4 years ago

should be fixed in v1.12