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

ZHA alarms incompatible with keyfobs because of requirement for pin code #195

Open
M0ORY opened this issue Sep 4, 2024 · 8 comments
Open

Comments

@M0ORY
Copy link

M0ORY commented Sep 4, 2024

I recently picked up a couple of Zigbee alarm keyfobs from Aliexpress https://www.aliexpress.com/item/4001062612446.html They work just fine for arming, home arming or panic button operation but I'm having difficulty getting them to disarm the alarm because ZHA requires a master pin / code for alarms which has to be sent with the disarm signal. This behaviour is fine for keypad style systems but doesn't work for fobs as there is no way to enter a code. A keyfob it's self can be considered secure since it's personal to each user and not screwed to a wall at a given entry point and for single person households keyfobs are much more appropriate than key pads which also tend to be much more expensive and are fairly hard to come by.

@puddly
Copy link
Contributor

puddly commented Sep 4, 2024

Are these actual alarm devices or is this a generic four button remote control?

Tuya devices often aren't proper Zigbee and implement a protocol on top. Please attach the diagnostics JSON for your device, as this will contain enough info to identify what exact device this is. Also, please enable ZHA debug logging and run through the operations of the device, as this will show what the device sends over the network.

@M0ORY
Copy link
Author

M0ORY commented Sep 4, 2024

Yes it create an alarm control panel device when paired along with an IAS zone sensor but I'm not sure what that is or how I'm supposed to use it at present. I was actually hoping it would be a generic 4 button remote as that would have been simple to set up. From what I've seen in the logs they seems to send multiple commands for each button push but that doesn't seem to be an issue aside from hitting the max failed disarm tries as little sooner than you'd expect which isn't a problem if the disarm works without a code anyway. I think I've got the disarm tries set to 6 at the moment and it takes a couple of pushes of the disarm button and the alarm activates because it doesn't get a code.

Thanks for taking a look for me. I think I've attached everything you asked for here.

zha-b456122ea7a3436191d4cfd498f2ea8e-_TYZB01_qm6djpta TS0215-50171b10baefb4e48cb8172122ad3470(1).json

home-assistant_zha_2024-09-04T21-13-16.290Z.log

@Hedda
Copy link

Hedda commented Sep 6, 2024

Are these actual alarm devices or is this a generic four button remote control?

I have also tried researching that specific model (Zigbee ID: RC_V14 | RC-EM | RC-N | RC-EF-3.0) from Tuya without much luck:

Also tried researching this other similar Tuya model (Zigbee ID: TS0215A | _TZ3000_p6ju8myv | _TZ3000_0zrccfgx) which are also readily available to order from both China and resellers in the EU:

At least according to Zigbee2MQTT's device documentation both do have possible values for: disarm, arm_partial_zones or arm_day_zones, arm_night_zones, plus arm_all_zones, and emergency, (as well as values for battery and linkquality).

Will follow this as curious too what the answer to that question is myself because looking to find key fob to use with Alarmo:

PS: I don't want it for myself, but my father had similar-looking key fobs for his old security alarm system so thinking of replacing that with a Zigbee-based solution (which can hopefully be using Alarmo with all devices connected via ZHA in Home Assistant).

@M0ORY
Copy link
Author

M0ORY commented Sep 6, 2024

In case it's of any use here are the events I've captured for arming and disarming and I see the code is always an empty string but ZHA enforces a master code be set in the alarm panel config. Maybe there's some way to send a zigbee command to it to give it a code to send with future button pushes but if there is I'm not sure how to do that and I can't find any information about things like that.

event_type: zha_event
data:
  device_ieee: 2c:11:65:ff:fe:f6:0e:2f
  unique_id: 2c:11:65:ff:fe:f6:0e:2f:1:0x0501
  device_id: 50171b10baefb4e48cb8172122ad3470
  endpoint_id: 1
  cluster_id: 1281
  command: arm
  args:
    arm_mode: 1
    arm_mode_description: Arm_Day_Home_Only
    code: ""
    zone_id: 255
  params: {}
origin: LOCAL
time_fired: "2024-09-06T14:40:31.819945+00:00"
context:
  id: 01J73WF5JBNSSVZ1J8CED61NF5
  parent_id: null
  user_id: null

event_type: zha_event
data:
  device_ieee: 2c:11:65:ff:fe:f6:0e:2f
  unique_id: 2c:11:65:ff:fe:f6:0e:2f:1:0x0501
  device_id: 50171b10baefb4e48cb8172122ad3470
  endpoint_id: 1
  cluster_id: 1281
  command: arm
  args:
    arm_mode: 3
    arm_mode_description: Arm_All_Zones
    code: ""
    zone_id: 255
  params: {}
origin: LOCAL
time_fired: "2024-09-06T14:42:06.986829+00:00"
context:
  id: 01J73WJ2GAXB9ACF692N17ZWDQ
  parent_id: null
  user_id: null

event_type: zha_event
data:
  device_ieee: 2c:11:65:ff:fe:f6:0e:2f
  unique_id: 2c:11:65:ff:fe:f6:0e:2f:1:0x0501
  device_id: 50171b10baefb4e48cb8172122ad3470
  endpoint_id: 1
  cluster_id: 1281
  command: arm
  args:
    arm_mode: 0
    arm_mode_description: Disarm
    code: ""
    zone_id: 255
  params: {}
origin: LOCAL
time_fired: "2024-09-06T14:44:32.641678+00:00"
context:
  id: 01J73WPGR1H759CN2VADEV21HR
  parent_id: null
  user_id: null

@dmulcahey
Copy link
Contributor

I just bought one of these to see what we can do here. Stay tuned.

@M0ORY
Copy link
Author

M0ORY commented Sep 14, 2024

@dmulcahey You didn't have to do that. I'd be more than happy to cover your costs for you though if you have a paypal or something you can ping me.

@dmulcahey
Copy link
Contributor

@dmulcahey You didn't have to do that. I'd be more than happy to cover your costs for you though if you have a paypal or something you can ping me.

All good. I prefer to source stuff myself that way if I decide I don’t have the time for a while no expectations are impacted. Thx though!

@M0ORY
Copy link
Author

M0ORY commented Sep 23, 2024

@dmulcahey You didn't have to do that. I'd be more than happy to cover your costs for you though if you have a paypal or something you can ping me.

All good. I prefer to source stuff myself that way if I decide I don’t have the time for a while no expectations are impacted. Thx though!

I get where you're coming from on that. There's never expectation from me as I've been put in that sort of position myself in the past and it soon sucks all the enjoyment out of things. Some people need to check themselves.

I bought two of these. One for myself and one for my parents who sometimes come over to look after my cat if I'm away for a few days but I've found other ways of achieving the same goal so they're currently spare. If anyone wants one to tinker with I'd happily pop one in an envelope. They'll probaly end up in a draw otherwise.

I've found my parents don't take well to change so giving them one of these probably wouldn't work out anyway. I set up a basic alarm for my garage that's armed and disarmed whenever the lights are turned off / on from in the house and they couldn't wrap their heads around that even though it's set up in a way they don't need to think about it at all. I only told them about it because it didn't have an alarm or working lights before and they needed to know to turn the lights on before they go in and turn them off when they lock up. For the house I decided it best I leave the existing dumb system in place and tie into it with an ESP8266. That way there's no change they have to get used to and I don't even have to tell them.

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

4 participants