Loxone Binding

@madislammergas you can try the dev branch from my binding if you want. There I implemented the first version which supports the new gen2. If you have access to your config folder via samba you can copy override the files in the loxone custom component folder with the files from the dev branch:

I tried that but still getting the same error.

@madislammergas if it is the 2nd gen then you must use the loxone url not the local IP address. It needs that for the SSL certificate. When you use the IP address it can not handle out the certificate. This is new an the problem is that I have the old generation. I try to get you an example. Do you know your loxone cloud address?

Thanks. Yes I know. I will check it out right now.

I still get the error.
Is my config correct (real data is replaced with xxx):
loxone:
port: 8080
host: http://dns.loxonecloud.com/XXXXXXXXXX
username: xxxxx
password: xxxxxx
generate_scenes: false

I tried port 80 and host without http://. Same error.

@madislammergas That is what I meant:

Can you reach your Miniserver with this address via a browser?
Have you forward the right ports?

You can find out if you have the gen2 when you look in your LoxAPP3.json.
There is a key miniserverType, If it is 0 then you have the old one. If not you have a newer version.

"miniserverType": 0,

If you have a gen1 I do not know if you can connect via cloud. I have my system never exposed to the net.

You can also config your logs for example:

logger:
  default: critical
  logs:
    homeassistant: critical
    custom_components.loxone: debug

A normal log should look like this:

2021-01-28 20:28:13 DEBUG (MainThread) [custom_components.loxone.api] try to read token
2021-01-28 20:28:13 DEBUG (MainThread) [custom_components.loxone.api] load_token successfully...
2021-01-28 20:28:13 DEBUG (MainThread) [custom_components.loxone.api] token successfully loaded from file: /home/user/.homeassistant/lox_token.cfg
2021-01-28 20:28:13 DEBUG (MainThread) [custom_components.loxone.api] try to get public key: http://192.168.1.225:8080/jdev/sys/getPublicKey
2021-01-28 20:28:13 DEBUG (MainThread) [custom_components.loxone.api] get_public_key successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] init_rsa_cipher successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] generate_session_key successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] parse_loxone_message successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] get_new_aes_chiper successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] parse_loxone_message successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] get_new_aes_chiper successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] parse_loxone_message successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone.api] get_new_aes_chiper successfully...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone sensor...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone switch...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone cover...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone light...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone climate...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone scene...
2021-01-28 20:28:14 DEBUG (MainThread) [custom_components.loxone] starting loxone alarm_control_panel...
2021-01-28 20:28:14 INFO (MainThread) [custom_components.loxone] loxone discovered

Thanks, minisereverType is 0. I changed to ip and port but still geting the error
2021-01-29 10:32:59 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxoneā€¦(same error that before continues). And debugger do not disclose anything else for that.

@madislammergas Can you open an issue on git. Maybe this is an better place to discuss such problems. I can try to help you but I need more Infos.

Hello,
many thanks for this helpfull App.
One question: Is ist somehow possible, to sync the rooms from Loxone to the HA-Rooms? So, if there are devices / entities from Loxone with room ā€œkitchenā€ for example, that they are automaticly connected to the same room in HA (if it exists)?

Unfortunately Loxone Binding works for me not 100% ā€¦
All my scenes from licght controller v2 disappears often. Ath the beginning they are available for some minutes, then some of them disappear, and at the end I cant see any scenes.
How can I fix this?

Hi all !
iā€™m new in the hassio game, with a loxone miniserver.
i would like to keep using loxone in frontend, and access info from hassio into my loxone configā€¦
i already do this with my bose soundtouch system (read the volume and status from the url of the bose system) !!!

is it possible with the last version of hassio, to simply authorize an url api to show sensor without token or authentification method, from a local ip, or with a password send in the url (example : http://admin:PASSWORD@hassioip:8123/api/states/sensor.person.admin)

any help would be apprecied !!

PS : i canā€™t use bearer token in loxone config for thisā€¦ i can only read data from a url (from the virtual input http)!

Thanks

@Jojo I am trying to set up your binding, however I am struggling with connecting to the miniserver (gen2). According to your documentation, I need to enter the dns name from loxone. However, I am not allowing my loxone server to be externally accessible. Do you know of a way to work around this requirement? If not, can you tell me where this restriction comes from so that I can try to find an alternative approach myself?
I can access the server using things like http://local-ip/data/LoxAPP3.json. Also, simply going to http://local-ip gives me the web ui for the server.

Thanks a lot for providing this binding in the first place!

Please use the github page for Pyloxone and open a issue with your problem. I then try to help you when I am back from vacation next week.

Highly appreciated. Here is the github issue: Local only access for the gen2 miniserver Ā· Issue #83 Ā· JoDehli/PyLoxone Ā· GitHub

Hi @Jojo
Iā€™m trying (before buy) a new Loxone Miniserver and just installed your component and it work flawlessly for now. I have just a question (and maybe is because I donā€™t know how Loxone really works): in Loxone Config software I added a digital input, a digital output (relĆ©) and a light controller.
After restarting Home Assistant I see new entities: 2 sensor and a switch. Is it normal that the digital output is seen as a sensor instead as a switch? I expected to have one sensor (digital input) and two switches (digital output and light controller)

Thank in advance!

Can you control the digital input by the official loxone app? Loxone switches and pushbuttons comes as switches in HA.

Nope, just tried and I can confirm that: neither from official App nor from HA I can control digital input or digital output. With my (demo) project I only can change status of the Lightning controllerā€¦but I can control all of them from ā€œLive Previewā€ of Loxone Config software
(firmware version: 12.1.7.16)

That is why it it is a sensor. Sensors you can not change directly. You are able to observe them an react on changes.

How can you test loxone without a real loxone server?

Yes, digital input are sensors and itā€™s ok, my concert is about the digital output. In my thoughts digital output (named relĆ©) was something I can change state manually, but maybe I was wrong :sweat:

How can you test loxone without a real loxone server?

I have a real Loxone server here, itā€™s just on my desk so nothing is connected (but I can hear digital outputs click when testing them)

EDIT: Iā€™m feeling very stupid now. I confused digital output (seen as a switch in Live Preview) with real Switch object. Putting a real switch in project works as expected! Thanks and sorry to have bothered you!

Maybe dummy questin, pyloxone reaching that LoxAPP3.json if iam correct and based of that getting statuses of Loxone devices.

How often is it checking it? i mean really fast impuls on/off will it see it?

Thank you.