[SOLVED] Lupusec integration won't start

Hi guys,
I just started with HA recently (from openhab) and I am pretty happy about it.
I am running the most recent HA OS.

One of the first things I would like to do is to integrate my Alarm system (Lupus XT1 Plus).

After adding the recommended config:

lupusec:
  username: admin
  password: xxx
  ip_address: 192.168.68.31
  name: Lupin

to the configuration.yaml I get:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/lupusec/__init__.py", line 58, in setup
    hass.data[DOMAIN] = LupusecSystem(username, password, ip_address, name)
  File "/usr/src/homeassistant/homeassistant/components/lupusec/__init__.py", line 81, in __init__
    self.lupusec = lupupy.Lupusec(username, password, ip_address)
  File "/usr/local/lib/python3.9/site-packages/lupupy/__init__.py", line 42, in __init__
    self._panel = self.get_panel()
  File "/usr/local/lib/python3.9/site-packages/lupupy/__init__.py", line 127, in get_panel
    panel = self.clean_json(response.text)["updates"]
TypeError: string indices must be integers

When logging into HA with SSH:
I don’t even see the directory /usr/src
I don’t even see the directory /usr/local/lib/python3.9/

So it seems there is no python installed!?
I tried to do this with apk add --no-cache python3, but there is still no python in lib.

Any help would be greatly appreciated.

You don’t have access to this unless you are logged in as root.

This is not how HA OS is used. You can’t add any packages. They are supposed to be provided by the integration. As defined in the integration’s manifest.

python3 is most definitely installed.

Thank you for your quick help.

Alright - you see, I am a AH rookie :wink:

so, how to get the lupus integration then?
It seems that there is some config, because my changes in the configuration.yaml triggered obviously something.

So, you mean, this supposed to be on the system and would trigger the download and activation?
(because I did not find any lupus integration on the UI).

So how to get around this error?
The string indices is nothing I can change, but only the strings themselves (in configuration.yaml)

Edit:
The logs show some information from lupus, but it seems its not recognized b lupupy:

2022-06-21 12:26:35 WARNING (SyncWorker_0) [lupupy] Lupupy couldn't parse provided response: while parsing a block mapping
  in "<unicode string>", line 1, column 3:
      "updates" : {
      ^
expected <block end>, but found ','
  in "<unicode string>", line 21, column 4:
      },
       ^,   "updates" : {
    "mode_a1" : "{AREA_MODE_0}",
    "mode_a2" : "{AREA_MODE_0}",
    "fw_updated" : "0",
    "fw_auto" : "1",
    "dc_ex" : "0",
    "alarm_ex" : "0",
    "battery_ex" : "1",
    "battery_ok" : "1",
    "battery" : "{WEB_MSG_NORMAL}",
    "tamper_ok" : "0",
    "tamper" : "{WEB_MSG_TAMPER}",
    "interference_ok" : "1",
    "interference" : "{WEB_MSG_NORMAL}",
    "ac_activation_ok" : "1",
    "ac_activation" : "{WEB_MSG_NORMAL}",
    "sys_in_inst": "",
    "rssi" : "1",
    "sig_gsm_ok" : "1",
    "sig_gsm" : "{WEB_MSG_NA}"
  },
  "forms" : {
    "pcondform1" : {
      "mode" : "0",
      "f_arm" : "0"
    },
    "pcondform2" : {
      "mode" : "0",
      "f_arm" : "0"
    }
  }

There’s an open issue for this error:

Feel free to add any new details.

Thank you - you are right.
I have the XT1 though, which supposed to be working.
Anyway - I will (try to) add my information

On this issue I supposed to be upgrading lupupy by:

pip install lupupy -U

That should be done after activating venv.
So, something like

.../bin/activate

(supposedly)
But I don’t find any activate

Any hint how to activate venv on HA-OS?

No one?
Sorry for this rookie question, but I am lost activating the pylon vnev on HA OS.

Just for the record:
Here is how it works to get rid of the error message:
How to activate venv? - Configuration - Home Assistant Community (home-assistant.io)

Thnx for sharing the solution!

1 Like