Thank you for a quick update!
Speaking about changes to Manual Alarm Panel and considering this info, it looks kind of reasonable to think if this alarm should implement the same set of states.
Also, I havenāt checked yet but those previous_state
/next_state
may be useful to some.
Still need to wrap my head around their arming_time
idea thoughā¦
@onkytonk, @greengolfer, @jamos and anyone using MQTT interface - I decided to create a new FR to discuss whatās required in terms of MQTT so please have a look and say what you think/share your ideas.
Iām also discussion an area
/(zone?) idea here - it comes up from time to time and I thought itās a good thing to try fighting out whatās required and how it could be implemented. I have no experience with this kind of alarms but happy to learn so the current functionality could be extended.
Not saying it will happen soon but itās good to plan ahead anyway.
This is my sort of work around for open sensor notifications.
I use an events all node, when the service is called, it triggers to send a notification if a particular sensor is open.
Not sure if there is a simpler way to implement this.
Thanks for keeping this alarm component up to date!
Hi, If itās of any use Iāve created a flow with functions to read in the immediate sensors from the bwalarm.yaml config file and output only those open sensors that correspond to what mqtt alarm_mode is sent. i.e. If Alarm_Away is set this flow will only output the open sensors that are configured from Away -Immediate section in BWalarm. It has the benefit of no additional nod red configuration if you add or remove sensors in the BWALARM config.
[{"id":"8d85fdee.d9d3","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"b2b0d1a4.64ef08","type":"yaml","z":"8d85fdee.d9d3","property":"payload","name":"","x":730,"y":280,"wires":[["2f2f022c.de0166"]]},{"id":"eb980ac.188b7f8","type":"file in","z":"8d85fdee.d9d3","name":"BWALARM File","filename":"/config/resources/bwalarm/bwalarm.yaml","format":"utf8","sendError":true,"x":560,"y":280,"wires":[["b2b0d1a4.64ef08"]]},{"id":"2f2f022c.de0166","type":"function","z":"8d85fdee.d9d3","name":"Get Friendly Names ","func":"const globalHomeAssistant = global.get('homeassistant');\nvar armed_mode = flow.get('arm_mode');\nvar entity,friendlyName=\"\";\nvar count = 0;\nvar listState=[];\nvar listfriendlyNames=[];\nvar sensorOn=\"false\";\nvar topic=msg.topic;\nvar mAway,mHome,mNight,msg2={};\n\n// Get list of immediate sensors from BWALARM for different alarm modes\nmAway=msg.payload.states.armed_away.immediate;\nmHome=msg.payload.states.armed_home.immediate;\nmNight=msg.payload.states.armed_night.immediate;\n\n// Set sensor list based on Alarm Mode\nif (armed_mode==\"ARM_AWAY\") {\n msg2=mAway;}\nif (armed_mode==\"ARM_HOME\") {\n msg2=mHome;}\nif (armed_mode==\"ARM_NIGHT\") {\n msg2=mNight;}\n\n// Loop through the Alarm sensors Array\nfor (var i = 0; i< msg2.length; i++) {\n entity=msg2[i];\n count +=1;\n //Get State of sensors in array\n listState[i] = globalHomeAssistant.homeAssistant.states[entity].state;\n //Get Friendly Names of sensors\n listfriendlyNames[i] = globalHomeAssistant.homeAssistant.states[entity].attributes.friendly_name;\n // Check if any sensor states are on and if so set sensorOn to true\n if (listState[i]== \"on\") {\n sensorOn=\"true\";\n // create a string of sensor Friendly Names that are on\n friendlyName = friendlyName + listfriendlyNames[i] +\", \";\n }\n}\n\n// set payload\nmsg.payload=friendlyName;\n//msg.data=sensorOn;\n\n// Return message if any Sensor states are on.\nif (sensorOn == \"true\") {\nreturn [msg];\n}else {\n return [null];\n}\n","outputs":1,"noerr":0,"x":900,"y":280,"wires":[["36260eb0.e9f6a2","dfcc7d4.70cd1"]],"info":"Generates a list of Friendly Names of Open Sensors from the immediate sensors in the BWALARM.yaml file.\n\nRequires Flow.Arm_Mode variable from Store Arm Mode Function "},{"id":"36260eb0.e9f6a2","type":"api-render-template","z":"8d85fdee.d9d3","name":"Last Alexa","template":"{{ states.sensor.last_alexa.state }}","resultsLocation":"lastalexa","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1110,"y":280,"wires":[["534c316c.34701"]]},{"id":"dbc0b540.f5b508","type":"function","z":"8d85fdee.d9d3","name":"Store Arm Mode","func":"var arm_mode = flow.get('arm_mode');\nvar msgt = msg.payload;\nflow.set('arm_mode',msgt);\nmsg.payload=arm_mode;\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":280,"wires":[["eb980ac.188b7f8"]],"info":"Sets Flow.Alarm_Mode variable from MQTT Payload for use in Get Sensors/Friendly Names Function"},{"id":"7f78d91b.3b6638","type":"mqtt in","z":"8d85fdee.d9d3","name":"","topic":"home/alarm/set","qos":"2","datatype":"auto","broker":"3f5c82ac.348636","x":200,"y":280,"wires":[["dbc0b540.f5b508"]]},{"id":"534c316c.34701","type":"api-call-service","z":"8d85fdee.d9d3","name":"OPEN Sensors TTS","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media","entityId":"","data":"{\"message\":\"ALARM Not Set, Please close {{payload}} , Then set the alarm \",\"data\":{\"type\":\"tts\"},\"target\":[\"media_player.hallway_echo_dot\"]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1288,"y":280,"wires":[[]]},{"id":"dfcc7d4.70cd1","type":"api-call-service","z":"8d85fdee.d9d3","name":"Notify Phone","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_j_iphone","entityId":"","data":"{\"data\":{\"push\":{\"sound\":{\"critical\":1,\"name\":\"default\",\"volume\":1}}},\"message\":\"{{payload}}\",\"title\":\"Open Sensors\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":340,"wires":[[]]},{"id":"3f5c82ac.348636","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Is anyone using MQTT Alarm Panel? I canāt seem to get it to Disarm BWalarm.
If I disarm from within HA, the alarm panel is disarmed, but not the other way around.
Any idea or suggestions please?
Iād suggest creating a new issue on Github.
Please set log level debug
for this component and add the relevant part of the HA log to the description.
There was no changes to the code recently so it should work unless something has changed in HA.
Well, I updated Supervisor first (and it rebooted itself) and then updated HA (and it restarted itself) and everything went through without any issues.
Iāve checked the logs. Seem like an issue with the passcode.
How do I forward the passcode from MQTT into Home Assistant, or do I need to enable āDisarm without passcodeā within BWalarm?
2020-06-14 21:23:41 DEBUG (MainThread) [custom_components.bwalarm.alarm_control_panel] [message_received] require passcode to disarm option: Enabled
2020-06-14 21:23:41 ERROR (MainThread) [custom_components.bwalarm.alarm_control_panel] [message_received] Failed to DISARM: passcode required
Iāve starting getting the below error in my log since either HA 0.110 or 0.111 (not sure exactly when it started). I think its to do with the recent changes to include pending states not fully linking to what s coming from my hard-wired alarm via MQTT.
Log Details (ERROR)
Logger: custom_components.bwalarm.alarm_control_panel
Source: custom_components/bwalarm/alarm_control_panel.py:1609
Integration: bwalarm (documentation)
First occurred: 14 June 2020, 15:44:58 (2 occurrences)
Last logged: 14 June 2020, 20:56:44[message_received] Ignore unsupported command āPENDINGā
I just rebooted my server and noticed this error as well:
Log Details (ERROR)
Logger: homeassistant.components.alarm_control_panel
Source: components/frontend/init.py:190
Integration: Alarm Control Panel (documentation, issues)
First occurred: 9:33:00 (1 occurrences)
Last logged: 9:33:00Error while setting up bwalarm platform for alarm_control_panel
Traceback (most recent call last): File ā/usr/src/homeassistant/homeassistant/helpers/entity_platform.pyā, line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File ā/usr/local/lib/python3.7/asyncio/tasks.pyā, line 442, in wait_for return fut.result() File ā/config/custom_components/bwalarm/alarm_control_panel.pyā, line 401, in async_setup_platform config={āalarmidā: āalarm_control_panel.houseā}, File ā/usr/src/homeassistant/homeassistant/components/panel_custom/init.pyā, line 140, in async_register_panel require_admin=require_admin, File ā/usr/src/homeassistant/homeassistant/components/frontend/init.pyā, line 190, in async_register_built_in_panel raise ValueError(f"Overwriting panel {panel.frontend_url_path}") ValueError: Overwriting panel alarm
This component has some documentation available.
MQTT is covered here.
There is override_code
option as well, check that out if you donāt want to use passcode with MQTT.
Have you checked whatās in the command topic?
Can we all agree that this topic is for discussions, questions but for reporting issues one should use Github?
Your error looks similar to this one.
Source: components/frontend/ init .py:190
I also had this problem, i reinstalled but same problem. I then removed following line from config:
panel_custom: !include panel_custom.yaml
I can now access my panel and no issues in log butā¦
I have no options like setting etc and I have the old interface (i think), HACS says 1.12.6
I donāt think this is a regular issue so hope itās ok to post here (to get some ideas whats wrong with my setup).
what config are we talking about?
Itās something horrible
Iām afraid dealing with any issue involves a lot of initial information about your setup (that you havenāt provided here, have you? so nobody will be able to help) and some conversation that will soon a) make this topic unusable and b) make the process of fixing bugs a nightmare (to me at least as itās so easy to lose track of them here).
Same goes to feature requests.
Thatās why I insist that people use Github to open issues/feature requests.
Hope it explains my position.
Hello,
First of all thank you for the Component. Great job!!
Is it possible to install 2 independent instances of the alarm, with 2 panels, different codes, and so on? I mean in the same HA.
I would like to have to different alarms, one for the house and another for the garage.
Maybe working with āzonesā can be the solution, but I didnāt find how to do it
Thanks!!
Currently this alarm does not support multiple instances or zones.
However, Iām collecting ideas and hope to add support for multiple instances in the future.
Everyone is welcome to read this topic and take part in the discussion on the matter.
Recently install v1.12.6. Is there a way to reset the admin password to enter Settings? I reset the password and I cannot not get back into settings. TIA
If the default password does not work, the only way I see is to edit resources/bwalarm/bwalarm.yaml
manually.