johnnybegood / ha-ksenia-lares

Kaenia Lares (pre 4.0) integration for home assistant
MIT License
10 stars 10 forks source link

Invalid authentication #1

Closed Rui10 closed 1 year ago

Rui10 commented 2 years ago

Hi, I'm trying your HACS integration but I always received this messagge: "Invalid authentication"...

comleoita commented 2 years ago

Devi andare nel file base.py e cambiare la porta con quella http, cioè come accedi. Dopo questo l'addon funzionerà.

johnnybegood commented 2 years ago

Devi andare nel file base.py e cambiare la porta con quella http, cioè come accedi. Dopo questo l'addon funzionerà.

The port is currently hard coded, I’m always open for a PR with a dynamic port.

Rui10 commented 2 years ago

So, what have I to do?

johnnybegood commented 2 years ago

If your system is not on port 4202, you can change it here: https://github.com/johnnybegood/ha-ksenia-lares/blob/d1d57cbf34bead4c31e3f0dd6fd3a1b77fb308e5/custom_components/ksenia_lares/base.py#L28

comleoita commented 2 years ago

Scusa se ti disturbo ma per quanto riguarda il panel-alarm di home assistant con Ksenia come sta procedendo? Se vuoi ti posso dare una mano (ho anch'io una centrale ksenia).

Rui10 commented 2 years ago

If your system is not on port 4202, you can change it here:

https://github.com/johnnybegood/ha-ksenia-lares/blob/d1d57cbf34bead4c31e3f0dd6fd3a1b77fb308e5/custom_components/ksenia_lares/base.py#L28

It works!

Rui10 commented 2 years ago

Scusa se ti disturbo ma per quanto riguarda il panel-alarm di home assistant con Ksenia come sta procedendo? Se vuoi ti posso dare una mano (ho anch'io una centrale ksenia).

Se si riuscisse ad integrare maggiormente sarebbe bellissimo!

dicemans commented 2 years ago

where do you configure username and password? I only have an access PIN

dicemans commented 2 years ago

where do you configure username and password? I only have an access PIN

comleoita commented 2 years ago

if you have a ksenia alarm (pre 4.0) the username and password are:

username: admin password: lares

the installator can modify this, ask this to your installator.

Il giorno sab 2 apr 2022 alle 17:13 Paolo P @.***> ha scritto:

where do you configure username and password? I only have an access PIN

— Reply to this email directly, view it on GitHub https://github.com/johnnybegood/ha-ksenia-lares/issues/1#issuecomment-1086659730, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATB2VQDTSUDQAAD3UENT5WTVDBPY5ANCNFSM5MTLU2YA . You are receiving this because you commented.Message ID: @.***>

Rui10 commented 2 years ago

After 2022.7 update it doesn't work anymore...

evertterpstra commented 1 year ago

Hello I managed to get HA-Ksenia_lares into Home Assistant. I logged in with my credentials and I can see Ksenia Lares 48IP in Settings/integrations, What I don't see are any sensors. Could you help me? ksenia_lares in HA

Steefano72 commented 1 year ago

Good morning everyone! I managed to integrate the zone status but is it possible to know the arming status of the control unit?

johnnybegood commented 1 year ago

Arming status is not yet supported, I am working on it but nothing concrete yet.

One35SEven commented 1 year ago

Hi, I've installed HACS part; added integration; changed http port. So far so good, but now getting errors in the log.

I'm no programmer, but if i understant some of the code correctly, xml pages are being parsed? For example info/generalInfo.xml being parsed for information. I have a Lares 48IP, but those xml pages do not seem to exist on the webgui. Is this something that needs to be turned on?

johnnybegood commented 1 year ago

It uses the same XML as the build in web interface uses in the background. If you open the developer tools of your browser while using the web interface you will see this.

@One35SEven does the built-in web interface work?

comleoita commented 1 year ago

Link Software (From Ksenia Hungary)

This is the download for the basis configurator software used by installators. It has only a trial version (30 days), after you must uninstall and reinstall the software

Directory where webserver zip is stored C:\Program Files\ksenia security innovation\basis\basis\modules\lib\webserver\src

One35SEven commented 1 year ago

It uses the same XML as the build in web interface uses in the background. If you open the developer tools of your browser while using the web interface you will see this.

@One35SEven does the built-in web interface work?

Apparently I'm not very well versed in the developer tools. Under the network tab of Chrome I did find the xml files. Webserver works and I can open the XMLs (when using the right path).

But still have errors; not sure where to look now...


Logger: homeassistant.components.binary_sensor Source: custom_components/ksenia_lares/binary_sensor.py:58 Integration: Binaire sensor (documentation, issues) First occurred: 12 april 2023 om 12:11:00 (5 occurrences) Last logged: 16:29:07

Error while setting up ksenia_lares platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/ksenia_lares/binary_sensor.py", line 58, in async_setup_entry for idx, zone in enumerate(coordinator.data) TypeError: 'NoneType' object is not iterable


Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.ksenia_lares.binary_sensor Source: custom_components/ksenia_lares/base.py:103 Integration: Ksenia Lares Alarm First occurred: 12 april 2023 om 12:11:00 (5 occurrences) Last logged: 16:29:07

Unexpected error fetching lares_zones data: 'NoneType' object has no attribute 'text' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data return await self.update_method() File "/config/custom_components/ksenia_lares/binary_sensor.py", line 43, in async_update_data return await client.zones() File "/config/custom_components/ksenia_lares/base.py", line 99, in zones return [ File "/config/custom_components/ksenia_lares/base.py", line 103, in "alarm": zone.find("alarm").text, AttributeError: 'NoneType' object has no attribute 'text'

johnnybegood commented 1 year ago

@One35SEven can you share your zonesStatus48IP.xml?

One35SEven commented 1 year ago

@One35SEven can you share your zonesStatus48IP.xml?

Here: (.txt added, because github apperenty doesn't accept .xml). zonesStatus48IP.xml.txt

johnnybegood commented 1 year ago

So I see in your version

<zone>
        <status>NORMAL</status>
        <bypass>UN_BYPASS</bypass>
</zone>

but in my version

<zone>
        <status>NORMAL</status>
        <bypass>UN_BYPASS</bypass>
        <alarm>0</alarm>
        <memoryAlarm>0</memoryAlarm>
 </zone>

that alarm field is used to detect a alarm on a sensor. System crashes because it is missing, but we also can't detect a alarm without it.

One35SEven commented 1 year ago

That's weird. Which version are you using of the Lares software? Mine is 1.6.

When a zone is tripped the status changes to ALARM in stead of NORMAL: So that would be usable, but different than your XML...

<zone>
        <status>ALARM</status>
        <bypass>UN_BYPASS</bypass>
</zone>

And when I look at the XML source file in the webserver zip-file, there are no mentions of an alarm or memoryAlarm information: (C:\Program Files\ksenia security innovation\basis\basis\modules\lib\webserver\src)

<zonesStatus>
    <zone>
        <status>~readZoneStatus(45,0,0,7)~</status>
        <bypass>~read(45,0,6,14)~</bypass>
    </zone>
johnnybegood commented 1 year ago

I see in the code that I check the status field for the alarm, I will change it to skip those 2 fields as they are not used. Will take this up in #4.

johnnybegood commented 1 year ago

I pushed a new version, can you try @One35SEven ?

One35SEven commented 1 year ago

I pushed a new version, can you try @One35SEven ?

It works :) Thanks!!

evertterpstra commented 1 year ago

Pls could you help me I askes for help on march 7 this year. My question was: I managed to get HA-Ksenia_lares into Home Assistant. I logged in with my credentials and I can see Ksenia Lares 48IP in Settings/integrations, What I don't see are any sensors. Could you help me?

johnnybegood commented 1 year ago

Can you try with the new version? If it still doesn’t work, can you share any logs and the content of zonesStatus48IP.xml

johnnybegood commented 1 year ago

Closing due to idle