andyboeh / mediola2mqtt

Mediola MQTT Gateway
11 stars 13 forks source link

Getting Keyerror #2

Closed partydiktator closed 3 years ago

partydiktator commented 3 years ago

Hi,

thanks for your work. When i'm starting the addon, i'm getting the following error:

image

My config looks like this:

image

I'd appreciate any help.

Thanks, Oliver

andyboeh commented 3 years ago

Yes, that's a bug / a documentation problem. The intention was to move all configuration in add-on mode to the add-on configuration, that was partially provided by #1. I will look into it this weekend, I need to extend it to support multiple gateways anyway.

andyboeh commented 3 years ago

I just pushed a possible fix. Could you try the latest code? All configuration is now done directly within the add-on configuration, you do not need mediola2mqtt.yaml anymore! Personally, I cannot test it in add-on mode, as I run it as a systemd service on my system.

partydiktator commented 3 years ago

I'm getting exactly the same error. Also, i can't configure in the add-on section:

image

I'm very new to homeassistant so i might do something wrong here, but i deleted every add-on file and replaced them with your latest code. Also restartet server and all the noob stuff ...

andyboeh commented 3 years ago

I just pushed another fix. Did you rebuild the add-on? You need to do this after changing any of the add-on files. I installed Hass.IO in a VM and installed the add-on. For me, the following configuration seems to work (my VM does not have access to my actual Mediola, so only limited tests were performed):

Untitled

partydiktator commented 3 years ago

Finally i get the config within the add-on. However, when starting the add-on i'm getting the error "Missing option 'port' in mediola in Mediola to MQTT (local_mediola2mqtt)."

My config is:

mediola: host: 192.168.6.70 udp_port: 1902 mqtt: host: 192.168.6.233 port: 1803 username: mqtt-user password: secret discovery_prefix: homeassistant topic: mediola debug: false blinds:

andyboeh commented 3 years ago

Then you did not update again, that was a bug that I fixed an hour ago. Only config.json has changed.

partydiktator commented 3 years ago

No, i'm using the latest config.json. The moment i'm changing the tab from Configuration to Info to start the add-on, the config gets lost (resets to default) and yes, i hit the save button but it doesnt seem to work

partydiktator commented 3 years ago

Might be an issue with file permissions as I copied your code via scp as root. Going to look into this later.

andyboeh commented 3 years ago

No, i'm using the latest config.json. The moment i'm changing the tab from Configuration to Info to start the add-on, the config gets lost (resets to default) and yes, i hit the save button but it doesnt seem to work

I had the same problem and it worked for me after rebuilding the add-on.

Might be an issue with file permissions as I copied your code via scp as root. Going to look into this later.

I did the same.

partydiktator commented 3 years ago

Now i did another rebuild and its working (at least i have a connection to the mediola blinds - i'm not able to control them at the moment, but might be my mistake. I think the save button "didn't work" because i had syntax errors in the config.

partydiktator commented 3 years ago

Just a short update why i wasn't able to control my blinds: i had a passwort set on my mediola gateway. In this case, the http requests require the password using the XC_PASS parameter:

http://192.168.6.170/command?XC_PASS=password&XC_FNC=GetStates

I deactived the password on the gateway and now everything is fine.

andyboeh commented 3 years ago

Ah, thanks for the info - I didn't think about the password. Adding support for that should be rather trivial.

andyboeh commented 3 years ago

It should now also work with password-protected Mediolas - untested. Btw, which Mediola do you have, i.e. v4 or a later version?

partydiktator commented 3 years ago

I'm using a v6 gateway