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

Tyxal alarm: can we use a numpad rather than a hardcoded code in the configuration ? #170

Open
jerry34ha opened this issue Jan 24, 2024 · 2 comments

Comments

@jerry34ha
Copy link

Hi,

14 months ago I tried to integrate my Delta Dore installation with mqtt2tydom in my HA and I gave up: too many things not working.

A year later, I try again and everything works! Lights, cover, dvi, alarm.

Good job!

One things bothers me: deactivating the alarm does not require the user to enter a code. I see this as a problem when my HA dashboard is mounted next to the front door.

Is there a way to request that the user enters the code?

@jerry34ha
Copy link
Author

Version 3.4.2 by the way.

I look at the mqtt diagnostics and see:
"state": { "entity_id": "alarm_control_panel.tyxal_alarm", "state": "disarmed", "attributes": { "code_format": null, "changed_by": null, "code_arm_required": false,

So with code_arm_required false, panel is not shown.

So I looked into the code (no knowing what I'm doing, of course):

app/sensors/Alarm.py shows:

 if self.alarm_pin is None:

            self.config['code'] = self.alarm_pin

            self.config['code_arm_required'] = 'true'

So I guess that if I do not setup an alarm code in mqtt2tydom configuration, then the 'code_arm_required' is set to true and the alarm panel card will show the numpad.

BUT, if I don't setup a code, the alarm entity is not created and there is an error in the homeassistant.log complaining about a code set to 'None':

2024-01-25 17:27:26.470 ERROR (MainThread) [homeassistant.components.mqtt.mixins] Error 'string value is None for dictionary value @ data['code']' when processing MQTT discovery message topic: 'homeassistant/alarm_control_panel/tydom/xxxxx/config', message: '{'name': None, 'unique_id': 'xxxxx', 'device': {'manufacturer': 'Delta Dore', 'model': 'Tyxal', 'name': 'Tyxal Alarm', 'identifiers': 'xxxxx'}, 'command_topic': 'alarm_control_panel/tydom/xxxxx/set_alarm_state', 'state_topic': 'alarm_control_panel/tydom/xxxxx/state', 'code_arm_required': 'true', 'code': None, 'json_attributes_topic': 'alarm_control_panel/tydom/xxxxx/attributes', 'platform': 'mqtt'}'

If I do setup a code, then no error in the log, and I can turn on/off the alarm, but without a code.
For completeness, here is the log when I setup a code:

2024-01-25 17:40:15.712 DEBUG (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('alarm_control_panel', 'tydom xxxxx') '{'name': None, 'unique_id': 'xxxxx', 'device': {'manufacturer': 'Delta Dore', 'model': 'Tyxal', 'name': 'Tyxal Alarm', 'identifiers': 'xxxxx'}, 'command_topic': 'alarm_control_panel/tydom/xxxxx/set_alarm_state', 'state_topic': 'alarm_control_panel/tydom/xxxxx/state', 'code_arm_required': 'false', 'json_attributes_topic': 'alarm_control_panel/tydom/xxxxx/attributes', 'platform': 'mqtt'}'

2024-01-25 17:40:15.712 DEBUG (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: alarm_control_panel.tyxal_alarm

xxxxx are anonymization of the serial number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant