mgcrea / homebridge-tydom

Homebridge plugin to manage Tydom hardware by Delta Dore from Apple HomeKit.
63 stars 14 forks source link

First alarm generation (TYXAL) #45

Open Y8rz8 opened 3 years ago

Y8rz8 commented 3 years ago

Hello there, Thanks for your work - I have all my devices (9 blinds) in HomeKit working perfectly except the alarm which is a first generation (TYXAL). To summarize:

But at the end the log mentions "Properly loaded 9 devices" instead of 10. And alarm is not in HomeKit. Then I'm wondering if this is due to my device (first generation) or maybe I missed something.

Thanks for your support ! Pat.

Y8rz8 commented 3 years ago

Hello, I have checked all logs in details by using debug mode and what is strange to me is the following:

Screenshot 2021-01-06 at 16 34 49

It seems that the device is well recognized. But it does not show off in HomeKit. If someone has an idea ?

Thanks, Pat.

mgcrea commented 3 years ago

That's indeed strange that you don't get a device, but there is probably an issue in the initial accessory configuration.

To help add support for new hardware, please provide:

You can use https://gist.github.com to post the files.

Y8rz8 commented 3 years ago

Hi Olivier, Thanks for your answer. Please find the link for the homebridge.log / tydom_output.json / config.json I have changed the alarm mode from off to on and then from on to off and it appears in the homebridge.log

https://gist.github.com/Y8rz8/446028d04d99d2ce18b5074a7ffbe5b0

Thanks, Patrice.

Y8rz8 commented 3 years ago

Hi Olivier, Posted files are what you’ve expected ? Thx.

Y8rz8 commented 3 years ago

Hi Olivier, I come back with this subject having finally find something : the endpoint id and the device id are not the same for my alarm. I don't know is this is the same for all alarm or not and I don't know how you are dealing with it ?

I've managed to get it working with your node-tydom-client by using your exemple:

await client.put(/devices/${4251002}/endpoints/${13}/data, [ { name: 'alarmCmd', value: 'ON', pwd: 'xxx' }

Do you see a way to get it fixed ?

Thanks, Patrice.

Y8rz8 commented 3 years ago

Forget it - it’s fine on your side ! There should be something else… still investigating. I am receiving the following with a 500 internal error and this is certainly the reason why the device is not showing up.

4AFD1F27-EF81-415C-8CB5-646A59FE666D

mgcrea commented 2 years ago

Sorry for the late response, you can see in the source code how the call via node-tydom-client is made:

https://github.com/mgcrea/homebridge-tydom/blob/47d0ea9cbbd6c0577a65ae52ab7fb36b5624f4be/src/accessories/securitySystem.ts#L184

await client.put(`/devices/${deviceId}/endpoints/${endpointId}/cdata?name=alarmCmd`, {
  value: tydomValue,
  pwd: pin
});

It looks like your TYXAL does not handle this CDATA command and should use a different call.

Does your TYXAL handle zones as well?

If you can provide me a debug log with a device hash, eg. you should have something like Unknown hash=${hash} with firstUsage="alarm" in your logs in debug mode, I could try to quickly add some kind of workaround.

mgcrea commented 2 years ago

I've recomputed the hash from your dumps and from what I see it has the same signature as a CTX60 that was first added for another user (StephanH27).

@StephanH27 does your alarm ON/OFF work with homebridge-tydom or do you encounter similar issues when trying to activate it?

StephanH27 commented 2 years ago

Hello, I never managed to drive my CTX60 with the PlugIn ...

But if it could work it would suit me. I can to do additional tests ... Extract from my config "settings": { "197849": { "pin": "XXXX", "aliases": { "stay": [ 1 ], "night": [ 2 ], "away": [ 3 ] }, "sensors": false }

Y8rz8 commented 2 years ago

I've recomputed the hash from your dumps and from what I see it has the same signature as a CTX60 that was first added for another user (StephanH27).

@StephanH27 does your alarm ON/OFF work with homebridge-tydom or do you encounter similar issues when trying to activate it?

Sorry for the late response, you can see in the source code how the call via node-tydom-client is made:

https://github.com/mgcrea/homebridge-tydom/blob/47d0ea9cbbd6c0577a65ae52ab7fb36b5624f4be/src/accessories/securitySystem.ts#L184

await client.put(`/devices/${deviceId}/endpoints/${endpointId}/cdata?name=alarmCmd`, {
  value: tydomValue,
  pwd: pin
});

It looks like your TYXAL does not handle this CDATA command and should use a different call.

Does your TYXAL handle zones as well?

Yes - even if I am not using it (reference CSX40).

If you can provide me a debug log with a device hash, eg. you should have something like Unknown hash=${hash} with firstUsage="alarm" in your logs in debug mode, I could try to quickly add some kind of workaround.

What I have provided to you is enough or should I do something else - please tell me ?