-
Notifications
You must be signed in to change notification settings - Fork 131
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
PC1500 Classic Series armed/disarm #349
Comments
Code for house security in ai |
What do you mean by that? Thanks |
I wanna complete code for house security |
Sorry I'm having difficulties understanding you. I would suggest using one of theses data point : dsc->armed[partition]
dsc->armedAway[partition]
dsc->armedStay[partition]
dsc->exitDelay[partition]
dsc->ready[partition] note that armed(...) will only become true after the ExitDelay |
Thanks for the reply, in home assistant, it's just flashing pending the whole time it is either armed home, or away. It is not recognizing the exit delay and switching to the proper armed mode. This is my MQTT: https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/alarm_control_panel: https://www.home-assistant.io/integrations/sensor.mqtt/sensor: https://www.home-assistant.io/integrations/binary_sensor.mqtt/binary_sensor:
https://www.home-assistant.io/integrations/button.mqtt/button:
|
Hi 👋 , Im not familiar with home assistant unfortunately but im going to try my best to help you figure it out. A quick glance at your config files and something pretty obvious come to my mind, are you sure you are arming partition 1 ? In your config files you set it up to only monitor partition 1 but ExitDelay is different for each partition its not shared variable so if your keypad is arming partition 2 you won't receive it with current config. Also for debugging purposes i would suggest installing a software like MQTTX to read the MQTT Messages being sent to understand exactly the problem. Subscribe to dsc/# to catch everything coming out of the Microcontroller. This part of the code in the HomeAssistant MQTT.ino is responsible for sending the "pending" topic with MQTT. // Publishes exit delay status
if (dsc.exitDelayChanged[partition]) {
dsc.exitDelayChanged[partition] = false; // Resets the exit delay status flag
char publishTopic[strlen(mqttPartitionTopic) + 2];
appendPartition(mqttPartitionTopic, partition, publishTopic); // Appends the mqttPartitionTopic with the partition number
if (dsc.exitDelay[partition]) mqtt.publish(publishTopic, "pending", true); // Publish as a retained message
else if (!dsc.exitDelay[partition] && !dsc.armed[partition]) mqtt.publish(publishTopic, "disarmed", true);
} The publishTopic is defined as follows : Basically it would be = "dsc/Get/Partition1/Message" // MQTT topics - match to Home Assistant's configuration.yaml
const char* mqttClientName = "dscKeybusInterface";
const char* mqttPartitionTopic = "dsc/Get/Partition"; // Sends armed and alarm status per partition: dsc/Get/Partition1 ... dsc/Get/Partition8
const char* mqttPartitionMessageSuffix = "/Message"; // Sends partition status messages: dsc/Get/Partition1/Message ... dsc/Get/Partition8/Message
const char* mqttZoneTopic = "dsc/Get/Zone"; // Sends zone status per zone: dsc/Get/Zone1 ... dsc/Get/Zone64
const char* mqttFireTopic = "dsc/Get/Fire"; // Sends fire status per partition: dsc/Get/Fire1 ... dsc/Get/Fire8
const char* mqttPgmTopic = "dsc/Get/PGM"; // Sends PGM status per PGM: dsc/Get/PGM1 ... dsc/Get/PGM14
const char* mqttTroubleTopic = "dsc/Get/Trouble"; // Sends trouble status
const char* mqttStatusTopic = "dsc/Status"; // Sends online/offline status
const char* mqttBirthMessage = "online";
const char* mqttLwtMessage = "offline";
const char* mqttSubscribeTopic = "dsc/Set"; // Receives messages to write to the panel
...
publishMessage(mqttPartitionTopic, partition); // Basically mqttPartitionTopic = sourceTopic
...
itoa(partition + 1, partitionNumber, 10);
strcpy(publishTopic, sourceTopic);
strcat(publishTopic, partitionNumber);
strcat(publishTopic, mqttPartitionMessageSuffix); |
Ok, just looked at the MQTT again using MQTT Explorer, and even in MQTT, it shows as pending, So it almost looks like it could be an issue with the microcontroller code. It is Partition 1 that I am using. and from what I am seeing, is that the Partition ready message in the MQTT is not changing from Ready. I'm just looking at the .ino file myself, and I am on the right partition (#1) for my system. |
Good morning,
An issue that I am having with the setup is that it will show disarmed and also show pending, but will never change from pending to armed (either home or away) did some sleuthing with the status and keybus examples and found that when the ready light goes out to let know that the system is armed, the status example doesn’t switch, but the keybus shows that it sees the ready light go out.
What it is looking like is that the status is not picking up that the ready light went out and not changing the status from pending to armed.
Hope that this can help with diagnosing the issue.
The text was updated successfully, but these errors were encountered: