home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.89k stars 30.12k forks source link

ElkM1 has lost Panel for zone 1 #101776

Closed caseyd closed 11 months ago

caseyd commented 11 months ago

The problem

At some point in the last several updates I have lost the Panel for zone 1. This is frustrating as I have a few dashboards which were using that panel.

The alarm panels for 2-8 are available.

I have deleted and restarted and re-installed the ElkM1 integration a number of times.

The attached log is from my most recent session.

The earlier entries, which show the integration not being able to login or sync, were due to my being connected via the RC programming tool. Once I disconnected that tool the re-installed integration was able to complete its sync task. I was connected to the M1 to ensure that the global options matched the documentation settings.

What version of Home Assistant Core has the issue?

core-2023.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ElkM1

Link to integration documentation on our website

https://www.home-assistant.io/integrations/elkm1

Diagnostics information

home-assistant_elkm1_2023-10-10T17-44-54.282Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

The only thing I have seen which might be useful is a passing log entry reporting that the Elk entity has already been loaded. It appears to be using the MAC address of the M1.

Additional information

No response

home-assistant[bot] commented 11 months ago

Hey there @gwww, @bdraco, mind taking a look at this issue as it has been labeled with an integration (elkm1) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `elkm1` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign elkm1` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


elkm1 documentation elkm1 source (message by IssueLinks)

caseyd commented 11 months ago

Screenshot 2023-10-10 at 10-52-30 Settings – Home Assistant

gwww commented 11 months ago

Can you provide a debug log following as follows:

Add the following to your configuration.yaml file in your Home Assistant config directory:

logger:
  logs:
    elkm1_lib: debug
    homeassistant.components.elkm1: debug

After updating your configuration file, restart Home Assistant. The debug logs will be in the file homeassistant.log in the config directory.

caseyd commented 11 months ago

This would be in addition to the debug log I attached to the issue? one moment. home-assistant.log you may have to grep out the elmk1 entries.

gwww commented 11 months ago

From your first log (turned out I did not need the second log), this slightly formatted and annotated with comments section:

# At this timestamp in your first log...
2023-10-10 10:39:19.181 DEBUG (MainThread) [elkm1_lib.connection] 
# This message is sent (spaces added for readability)
# Get the description for Area 1
write_data '0Bsd 01 001 0065'

# What is returned is the description text for Area 2, not 1
# The Elk protocol return when asked for a description returns the 
# next available description, which in your case is for Area 2.
# The library assumes that Area 1 is not defined.
got_data '1BSD 01 002 Area 2          0098'
write_data '0Bsd 01 003 0063'
got_data '1BSD 01 003 Area 3          0096'
write_data '0Bsd010040062'
got_data '1BSD01004Area 4          0094'
write_data '0Bsd010050061'
got_data '1BSD01005Area 5          0092'
write_data '0Bsd010060060'
got_data '1BSD01006Area 6          0090'
write_data '0Bsd01007005F'
got_data '1BSD01007Area 7          008E'
write_data '0Bsd01008005E'
got_data '1BSD01008Area 8          008C'
write_data '0Bsd01009005D'

It appears that Area 1 does not have a name or is somehow disabled on the panel. How do you have it configured? What have you recently changed (about the time the problem started) on the panel for the configuration of Area 1?

gwww commented 11 months ago

If you are into code, this line of code https://github.com/gwww/elkm1/blob/main/elkm1_lib/elements.py#L145 in the ElkM1 library is not invoked for Area 1 on your panel because a description (SD command) is not received. Hence configured is not set to True.

The auto-configuration paragraph in the docs here: https://www.home-assistant.io/integrations/elkm1/#manual-configuration describes this behaviour.

caseyd commented 11 months ago

Thanks Glenn,

I do have area 1 defined, and all the contacts / sensors show up in HA.

and when I read the log I saw that it just takes off with area 2.

I will take a look in RP and see if there is anything obvious with Zone 1. The only things I have changed are the globals WRT arming. I may have added another guest account to the Elk user list.

before I wrote the bug report I did supply an elk1 config in the yaml, defining only area 1 and ignoring 2-8. I got no change ( which was odd )


(aggregation account, which means I check it every few days for email from various accounts) @.***

On Thu, Oct 12, 2023 at 6:17 PM Glenn Waters @.***> wrote:

If you are into code, this line of code https://github.com/gwww/elkm1/blob/main/elkm1_lib/elements.py#L145 in the ElkM1 library is not invoked for Area 1 on your panel because a description (SD command) is not received. Hence configured is not set to True.

The auto-configuration paragraph in the docs here: https://www.home-assistant.io/integrations/elkm1/#manual-configuration describes this behaviour.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/101776#issuecomment-1760621591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYRK4MTHVMXWJKYBO72CDX7CJCBANCNFSM6AAAAAA52XTZFQ . You are receiving this because you authored the thread.Message ID: @.***>

gwww commented 11 months ago

Area 1 not Zone 1. If the area name is blank that might explain this.

caseyd commented 11 months ago

yeah sorry sometimes I forget that the sensors come into the zones. nomenclature. as you can see I also have a vantage system here. currently these and some other older systems are tied together with custom old node.js code I wrote 9 or 8 years ago. that's why I am trying to move this all into HA.

(aggregation account, which means I check it every few days for email from various accounts) @.***

On Thu, Oct 12, 2023 at 6:44 PM Glenn Waters @.***> wrote:

Area 1 not Zone 1. If the area name is blank that might explain this.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/101776#issuecomment-1760639396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYRK5SLAJGG6RCQYNKNADX7CMHXANCNFSM6AAAAAA52XTZFQ . You are receiving this because you authored the thread.Message ID: @.***>

gwww commented 11 months ago

So, even more specific, from the ElkM1 Protocol manual:

If the first character in a requested name is a “space” or less, then the next names are searched until a name is found whose first character is greater than “space” or the “Show On Keypad” bit is set. If no valid names are found, a “000” for the NNN address is returned. This speeds up the loading of names so that invalid names are not returned. M1 version 2.4.6 or later.

caseyd commented 11 months ago

The Area was defined as " BaDu HQ " and I bet I was trying to center the name on the keypads some bit ago.

Removing the spaces in the name of the first Area and reloading ( after quitting ElkRP2 of course ) eventually resulted in the correct # of entities for my ElkM1 system.

I was able to restore the Control Panel display for this Area.