DewGew/Domoticz-Google-Assistant

Pin code not recognized when arm/disarm Security System

mealgi opened this issue · 0 comments

mealgi commented

Describe the bug:
When activating/disactivating the security system the pin code is not recognized correctly

Expected behavior:
When activating/disactivating the security system the pin code is to be recognized

Logs:

Paste the dzga logs here.

Desktop (please complete the following information):
Context :
Version: 2024.2 (build 15866)
Build Hash: d7e442ae0-modified
Compile Date: 2024-01-20 16:18:19
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
DZGA version 1.23.12

Smartphone (please complete the following information):

  • Device: iPhone6

Additional context, screenshot:

Proposed solution:
in trait.py
line 6 insert :
import hashlib

line 893:
replace :
seccode = challenge.get('pin')

by :
seccode_raw = challenge.get('pin')
seccode_md5 = hashlib.md5(seccode_raw.encode())
seccode=seccode_md5.hexdigest()