Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for home automation devices #16

Open
eloo opened this issue May 30, 2020 · 17 comments
Open

Support for home automation devices #16

eloo opened this issue May 30, 2020 · 17 comments

Comments

@eloo
Copy link

eloo commented May 30, 2020

Hi,

i would like to ask if its possible to also see the configured home automation devices in the show_config output?
I've configured a hue hub but it looks like home automation is not included in the show_config command.

Is it maybe possible to add this devices also?

Thanks

@ehendrix23
Copy link
Owner

I do not have home automation so not sure how to get it.
Any chance you can run aioharmony with option show_detailed_config and provide that?

@eloo
Copy link
Author

eloo commented Jun 13, 2020

Sadly the home automation devices are currently not included in show_detailed_config.

But i've found an JS script which is capable of the automation devices.
Maybe this is starting point to support them in aioharmony as well?
https://github.com/lopelex/harmony-websocket

If you need support to test some implementation i can run it against my setup of course.

Thanks

@ehendrix23
Copy link
Owner

ehendrix23 commented Jun 15, 2020

Thx!.. Looks like I should be able to use that to get it implemented.
Yes, will need your help then for testing and might also have some questions etc.. :-)

Currently finishing up 1 version and then I'll look into this.

Quick question, do you also use Home Assistant?

@eloo
Copy link
Author

eloo commented Jun 16, 2020

Okay that sounds pretty good 👍
Feel free to ask for my help as soon as you need it.
And yes i'm using Home Assistant ;)

@ehendrix23
Copy link
Owner

FYI, I am working on this now. Actually found out I have 2 items that could be added as automations so I can do initial testing on my own.
Already ran into an issue that I am unable to get the state, getting permission denied. I think that depending on what is added in automations one has to actually authenticate. Found info on how to do that so will be testing it out.

@eloo
Copy link
Author

eloo commented Feb 17, 2021

Sounds good. If you have something to test feel free to mention me here 👍

@ehendrix23
Copy link
Owner

Any chance you could download aioharmony from git+https://github.com/ehendrix23/aioharmony.git@automationsI#aioharmony==1.0.0b1

And then run it:
python3 -m aioharmony --harmony_ip <Hub IP> show_detailed_config

Mainly wanna see if you get an error 401.2 back trying to get automation commands.

Thx.

@eloo
Copy link
Author

eloo commented Feb 25, 2021

Hi,

looks like i'm getting an different error.

 Incorrect status code 3001.0 received trying to get automation configuration for

@ehendrix23
Copy link
Owner

@eloo ,

Can you run it with:
python3 -m aioharmony --harmony_ip <Hub IP> --loglevel DEBUG --show_detailed_config

And provide the debug information.

@eloo
Copy link
Author

eloo commented Feb 25, 2021

Here we go.
aioharmony.log

@ehendrix23
Copy link
Owner

K, looks to be an issue when using XMPP as protocol. Been able to get same error here.

Can you do:
python3 -m aioharmony --harmony_ip <Hub IP> --loglevel DEBUG --protocol WEBSOCKETS --show_detailed_config

@ehendrix23
Copy link
Owner

Just pushed 2 commits. One to fix error 3001.0 when retrieving the configuration using XMPP.
Another one to correctly parse the result when it is retrieved when using XMPP.

So if you can try again. You can leave --protocol WEBSOCKETS out of it and just use XMPP now as well.

@eloo
Copy link
Author

eloo commented Feb 26, 2021

Okay, just tested it..
Hopefully i have updated the version correctly (remove aioharmony using pip, clean cache, and reinstall it?)

The 3001.0 is gone.. But still an exception is thrown and no data is shown.

aioharmony.log

@ehendrix23
Copy link
Owner

Well, that is because you got further then I do. :-)

For me it returns the 401.2 for the getting off the automation devices whereas clearly for you it does not. Hence I can't even get to the point of that exception. :-)

I'll go through the logs you send and at least already try to fix that exception next before I tackle authentication.

@ehendrix23
Copy link
Owner

OK ... this was easier to fix then I thought.

Install the latest version (uninstalling aioharmony and then reinstall as you did would do it).

@eloo
Copy link
Author

eloo commented Feb 27, 2021

awesome. that looks very good.

i got a successful response with my automation devices.
👍

@ehendrix23
Copy link
Owner

Cool!

Next I'll be looking at what we get and then how to be represent it, including how to operate them. Then at least we can get that tested while I still figure out authentication.

Will let you know when next revision is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants