davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
92 stars 20 forks source link

Manual Enroll #87

Closed de-Bat closed 1 year ago

de-Bat commented 1 year ago

Hi, I have a powermax+ panel and trying to do the manual enrollment sequence. However, when trying to enter Installer Mode , I am asked for installer code. I don't have it... Is there something I can do? Thanks, Ron

davesmeghead commented 1 year ago

Hi, After you start HA with the Integration, does it get to "Standard Plus" Mode? In other words, have you got the hardware setup and does it download the EEPROM data from the panel.? D

de-Bat commented 1 year ago

Honestly, I am struggling with that, too... I saw one time in the home assistant log some lines with the string [data receiver] and I thought I need to do an enrollment. I now understand that the panel status should change. Currently, the integration can not connect to the panel. I am using usr-wifi232-d2 and a module that convert 220v to 5v.

Ron

de-Bat commented 1 year ago

OK. Some exciting news... The logs shows that it is in STANDARD mode. It prints the various sensor periodically. Should I do the enrollment?

davesmeghead commented 1 year ago

Hi, it's good news that it gets to Standard Mode as it looks like you have the hardware set up correctly and the software installed. We need to get it to "Standard Plus" and to download the EEPROM data before you can enroll it to Powerlink Mode. So I'm wondering why it doesn't get to Standard Plus mode. Have you ticked "Force Standard" in the configuration when you set up the integration? If not then we need to work out why it doesn't get to Standard Plus mode so set the logger settings as per the wiki and load up a HA log file here and I'll take a look through. Getting it to Standard Plus will have downloaded the Installer Code in the EPROM so we can extract the installer code for your panel, this will allow you to enter Installer Menu on the panel to enroll it in Powerlink Mode. :)

EDIT: You may need to delete the integration from within HA and set it up again using AAAA as the Download Code in the Configuration for the Integration. Some panels use AAAA as the Download code so it's worth a try.

de-Bat commented 1 year ago

Hi, Thanks, It worked!!! well, getting to STANDARD plus mode :) I thought I saw the installer code and tried enrolling the panel using that code but I failed. currently,

The following lines keep repeating:

.```

..[sendPdu] Resetting expected response counter, it got to 25   Response list is now 1
...[sendPdu] Sending Command (I'm Alive Message To Panel)    raw data 0d ab 0...--------------...   waiting for message response ['0X2']
...[data receiver] msgType 0X2 got it so removed from list, list is now []
...[data receiver] msgType 0X2 resetting expected response counter, it got up to 0
...[handle_msgtype02] Ack Received  data = 43 
...[handle_msgtype02]    Received a powerlink acknowledge, I am in STANDARD_PLUS mode
...[sendPdu] Resetting expected response counter, it got to 25   Response list is now 2
... [sendPdu] Sending Command (Getting Status)    raw data 0d ...--------------..    waiting for message response ['0XA5', '0X2']
...[data receiver] msgType 0X2 got it so removed from list, list is now ['0XA5']
...[handle_msgtype02] Ack Received  data = 43 
...[handle_msgtype02]    Received a powerlink acknowledge, I am in STANDARD_PLUS mode
... [data receiver] msgType 0XA5 got it so removed from list, list is now []
...  [data receiver] msgType 0XA5 resetting expected response counter, it got up to 0


Thanks a lot,
Ron
davesmeghead commented 1 year ago

OK, so now that you get to Standard Plus Mode you are downloading the EPROM from the panel.

Can you edit pyvisonic.py it is in the custom_components/visonic directory If so then at approx line 2743 (depending on which version you are using), you will see these commented out lines. A # denotes a comment in the python language.

                #setting = self._readEPROMSettings(pmDownloadItem_t["MSG_DL_INSTPIN"])
                #log.debug("[Process Settings]      Installer Code {0}".format(self._toString(setting)))

Change them to be this, ie. "debug" to "warning" and remove the 2 #

                setting = self._readEPROMSettings(pmDownloadItem_t["MSG_DL_INSTPIN"])
                log.warning("[Process Settings]      Installer Code {0}".format(self._toString(setting)))

Reload the Integration (there's no need to restart HA), select the 3 vertical dots on the integration and select Reload. You will get a Warning in Home Assistant that will tell you your Installer Code. Remember to undo what you just did and put the code back to how it was :)

Let me know if this works and you get your installer code.

de-Bat commented 1 year ago

Hi, As in previous suggestions: I worked! I got to Powerlink mode :) Still I had some issues:

I than removed the devices (I think during download mode) and the panel stated it has communication error.

Today I tried to start the process from a fresh start:

davesmeghead commented 1 year ago

Oh that's good. There's no need to do enrollment if it's in Powerlink, I would guess that there's been a Powerlink module in that panel before and so it's already recognised the Powerlink protocols. I noticed in your previous post about Standard Plus that the panel was already sending Powerlink Acknowledges so I did think that it might just work. Did you get your Installer Code OK?

de-Bat commented 1 year ago

Yes, the code change did log the correct code. Thanks. So, last questions ( hopefully)

  1. should I change the keep alive and status check intervals in order to reduce network traffic and HA performance or just stay with the defaults.?
  2. How do return to standard plus mode? Thanks Ron
davesmeghead commented 1 year ago

Please don't change the intervals, this is where I add my disclaimer, if you start messing with the timings then you do so at your own risk. Older panels such as yours rely on the sequence and timings of the messages. Overall this causes very little network traffic and they maintain the connection between panel and HA.

You can only influence the Mode by the "Force Standard" configuration setting. When it gets to Standard Plus Mode it has already got the EPROM data from the panel so there is very little difference between that and Powerlink. Powerlink Mode means that it is exchanging the special powerlink messages between HA and the panel. The only reason to Force Standard is if you don't trust your network or are very security minded. See here on the wiki for more information. Dave