caronc / ha-ultrasync

Interlogix ZeroWire and Hills ComNav (NX-595E) UltraSync Security Panel for Integration for Home Assistant Comunity Store (HACS)
MIT License
25 stars 10 forks source link

Entities are not showing up #5

Closed daanvanvuuren closed 3 years ago

daanvanvuuren commented 3 years ago

I am trying to get this integration working on my recent hassio-installation but there are no entities, services or devices showing up. It's a relatively clean installation with some lights but no automations and other stuff yet.

I used HACS to install this integration and it is also showing up in the integration-page. I tried some reinstalls and made sure that everything is up-to-date. Does anybody have an idea what might help to get the entities showing up?

This is my set-up

This is my log-file:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/ultrasync/coordinator.py", line 103, in _async_update_data
    return await self.hass.async_add_executor_job(_update_data)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ultrasync/coordinator.py", line 48, in _update_data
    details = self.hub.details(max_age_sec=0)
  File "/usr/local/lib/python3.8/site-packages/ultrasync/main.py", line 578, in details
    if not self.update(max_age_sec=max_age_sec):
  File "/usr/local/lib/python3.8/site-packages/ultrasync/main.py", line 563, in update
    if not self._sequence():
  File "/usr/local/lib/python3.8/site-packages/ultrasync/main.py", line 1498, in _sequence
    return getattr(self, '_{}_sequence'.format(self.vendor))()
  File "/usr/local/lib/python3.8/site-packages/ultrasync/main.py", line 1637, in _comnav_sequence
    if area['sequence'] != a_seq[bank]:
IndexError: list index out of range

I hope that there is someone who could help me, thanks in advance.

caronc commented 3 years ago

I can definitely help you, but I'll need your help since I don't have a ComNav device. I need you to access the shell prompt of your raspberry pi if you can (that home assistant is on and ultrasync) and get a --debug-dump for me.

But first thing to do is just create a text file. You can use notepad.exe if you're in Windows, or any editor of your choice in Linux/Mac. The text file just has to have 3 entries in it; this will be your config file to use this script. It's the same things you need to provide Home Assistant in order for it to work there too:

# the ip to your ComNav Security Panel
host: 192.168.0.30
# The Web User ID you use to log into it with:
user: My Username
# Your Pin:
pin: 1234

Check out a copy of ultrasync if you can't access it from your Raspberry Pi (where Home Assistant is) as it will be already available to you there. You'll need to do a --debug-dump for me:

  1. Use your Home Assistant Pi instance if you can:
    # Call the ultrasync tool referencing your configuration file you created
    # along with --debug-dump
    bin/ultrasync -c /path/to/config --debug-dump
  2. Use git:

    # Clone the repository:
    git clone https://github.com/caronc/ultrasync.git
    
    # Change to the directory you just cloned to (with respect to the above, you'd
    # have created an ultrasync directory):
    cd ultrasync
    
    # Now call the ultrasync tool referencing your configuration file you created
    # along with --debug-dump
    bin/ultrasync -c /path/to/config --debug-dump
  3. Use pip if you already have Python (v3) installed on your pc:

    # Install ultrasync:
    pip install ultrasync
    
    # Now call the ultrasync tool referencing your configuration file you created
    # along with --debug-dump
    ultrasync -c /path/to/config --debug-dump
  4. Just download a the zip file of this current branch with your browser, unzip it and then from a command line:

    # Change to the directory you just unzipped your content to:
    cd ultrasync
    
    # Now call the ultrasync tool referencing your configuration file you created
    # along with --debug-dump
    bin/ultrasync -c /path/to/config --debug-dump

This will produce a zip file you can pass back to me with slightly more files then the ones you already shared. It will allow me to see your panel information (so i can recreate your crash and fix it).

Also, all UltraSync devices only allow 1 login per user at a time. So create a separate account for your Home Assistant user (and these tests). Also, if your Home Assistant configuration is still set up, remove it (otherwise Home Assistant will be competing with your testing as it will continuously try to log in over and over again) while you help me out here :slightly_smiling_face: . Hopefully this all makes sense!

Please let me know if you have any questions or concerns or are having any issues with the info above.

daanvanvuuren commented 3 years ago

My apologies for the late response. I attached the debug-dump you asked for. I hope you can figure this out.

I want to use this integration only for presence detection, so zones and all others sensors are not that important to me. It's for a local youth organization where I want to automate some lights en the climate system based on the presence :)

Thanks in advance!

20210114182629.ultrasync-dump.zip

caronc commented 3 years ago

Thank you, I'll try to have a look this weekend

caronc commented 3 years ago

I believe this might be resolved now in this latest update. Please let me know after you update Home Assistant and give it another try!

daanvanvuuren commented 3 years ago

Yes it's working. Thank you very much!