Lupus Alarm broken in 2022.11.1

Hi,

yesterday I update to 2022.11.1.
Since thean my Lupus alarm integration ist broken:

Error log shows:

2022-11-05 08:57:55.241 ERROR (MainThread) [homeassistant.setup] Error during setup of component lupusec
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)

Any ideas on that matter?

Yes the is a open issue. I hope the Core developer can fix the Bug.
For me the integration is very important.
I did a lollback to 2022.10.5

Hy für mich ist lupusec auch sehr wichtig wie kann ich downgraden ? Oder gibt es schon eine Lösung ? Mfg.

So:

2022 10.5 funktioniert wunderbar

1 Like

I really dont want to downgrade.
No news on that topic? 11.2 didnt fix anything.
Very annoying matter

1 Like

Vielen Dank :slight_smile: Hast mir sehr geholfen :+1:

Naja. Die Lösung kann kaum sein auf einer alten Version zu bleiben. Ich schaue mir Mal vorsorglich das lupus2mqtt addon an, oder werfe lupus ganz raus. Verwende nicht allzuviele Komponenten von Lupus.
Sehr ärgerlich aber, sollte für den Entwickler der Integration vermutlich ja leicht zu fixen sein.
Das ist dann der Nachteil von Open Source, hat jemand keine Lust mehr, bleibt es broken

Still nothing news?

The problem is fixed

updated to 2012.12.0
problem still there

The code owner fixed a lot but it is still broken on 2022.12.0 if you are using an XT1 alarm panel - I have it running by changing the code by myself and made a pull request on the original lupupy repo.
If you are interested in a quick fix via ssh, here it is:

CAUTION - you need to connect to your docker instance of HA via SSH! If you are not sure don´t do it! You can break your HA instance! Here is what I have done:

If not already done so, Install the SSH & Web Terminal add-on. Make sure the “Protected Mode” is switched OFF - you will get a warning, that you can break things when you are using it in the UN-protected mode.

Open the GUI of SSH & Webterminal:
At the command prompt enter:

docker exec -it homeassistant bash

at the new prompt enter:

cd ..
cd usr/local/lib/python3.10/site-packages/lupupy
vi __init__.py

This opens the __init__.py in the editor vi (which really sucks imho)

Now hit the Insert-Key (german: EINF) on your keyboard to enter the edit mode of the vi editor and using the arrow keys scroll through the code until you find:


Comment out all those lines by putting a “#” in front of them:

And add a new line:

self._history_cache = []

as shown in the picture above (the last line in the picture. Make sure that the indentations are correct. Use the Space key to indent, do not use the tabulator key!!

Then scroll down until you find:

In the two lines beginning with if device["status"] == add the following:
In the first line:

or device["status"] == CONST.STATUS_OPEN

In the second line:

or device["status"] == ""

as shown in the picture above. Make sure that the lines end with a colon :

Make sure everything looks as in my pictures. Then on your keyboard hit ESC to exit the edit mode.
Then hit

:w

followed by ENTER to save the changes and then

:q

followed by ENTER to exit the vi editor.
Now restart your home assistant and the lupusec integration should start without problem.

…or wait until my pull request found it’s way into the next release…
Good luck!

Thanks, I will give that a try if it isnt fixed soon. On 2022.12.4 still not fixed…

Nope, but the code owner fixed it already in his repo and made a PR at the Homeassistant repo. So probably fixed in 2022.12.5…

Link to his PR: https://github.com/home-assistant/core/pull/83765

The fix seems to be included in 2022.12.6:

image

Yay…fixed in 2022.12.6! Thanks @majuss!

Already updated, And it works again - at least for my XT1!

Yeah, working again on 2012.12.6

Thanks a lot!

Hi guys, I’am the Lupusec component core developer.

@vt220 is has nothing to do with my desire to programm and develop the library. It’s just limited by time. People have families, houses getting built, more important projects, you get it :slight_smile: I can only recommend looking into python programming yoursefl. It took me 2-3 weeks with no prior knowledge until the first working lupupy version was born. So it’s really not that hard.

Please let me know if there are other problems, and always look at the github issue, I’am not really active in the HA forums. But if you’re opening me an issue on github I will respond in 3 days.

What I plan to integrate in the following weeks:

  • test XT2 alarm detection
  • integrate 230 V relay switches

@sotima thank you for the contribution!

Hi majuss.

No harm intended. I appreciate your work in your spare time. I was just in a bad mood…

And it is broken again. Alle devices greyed out as not available. Nothing in the logs. Lupus xt1 Access via Browser ist possible…