i8beef / HomeAutio.Mqtt.GoogleHome

MIT License
215 stars 29 forks source link

Request and receive configuration google devices #125

Closed glsf91 closed 3 years ago

glsf91 commented 3 years ago

For my domoticz plugin I have to make a mapping between your software and the devices in domoticz. That is not always easy because of the combination of traits which can be made.

It will be much easier if I can request the configuration of the devices and receive (for example) the contents of GoogleDevices.json. I use separated systems for domoticz and GoogleHome. Requesting and receiving through mqtt is fine by me. I can then also automatically check configuration in Domoticz.

i8beef commented 3 years ago

That can contain sensitive information like challengeCodes, network passwords, etc., so delivering it over an unauthenticated channel doesn't seem like the best idea. The best I could probably do is provide it over an authenticated end point like I do the SYNC intent example.

glsf91 commented 3 years ago

As far as I now there are no passwords in the device configuation json file. It is just the device config as entered in the UI of your software. Are you are not confusing this with the application config file?

i8beef commented 3 years ago

Depends on what traits / features you are using. Challenge codes are supported on all traits generically, and some trait commands (like guest network passwords, etc.) contain sensitive information.

glsf91 commented 3 years ago

Ok, I'am not using that kind of traits so didn't know that kind information is also there. Authenticated endpoint is also ok. But not to difficult because I need to access from python :-).

For me it also fine te keep out the sensitive information if this is easier for you.

i8beef commented 3 years ago

See newest release 2.0.0.165. There is a button in the main device list "Tools" section (and endpoint behind it) to get the current device json now.

glsf91 commented 3 years ago

When I request this endpoint I get a login page. Can I add username/password with the request ?

glsf91 commented 3 years ago

Any idea?

i8beef commented 3 years ago

To automate it you'd have to simulate the login request handshake first, and then pass the auth cookie on the subsequent call.

glsf91 commented 3 years ago

I found an example how to login.