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

Execute Handler not getting called for Proxy device #13

Closed
hardillb opened this issue Oct 12, 2019 · 17 comments
Closed

Execute Handler not getting called for Proxy device #13

hardillb opened this issue Oct 12, 2019 · 17 comments

Comments

@hardillb
Copy link

hardillb commented Oct 12, 2019

I'm trying to build a Proxy device and initially ran into #1.

Following @ballob's comment and using the Home Assistant code as a guide I've managed to get past the Handler for PROXY_SELECTED not implemented problem (would still be nice to get the TypeScript bindings updated).

The reachableDeviceHandler is getting called regularly but when I issue a command for the test device the onExecute handler is never getting called. There are no errors when I attach chrome console and the console.log on the first line is not getting called.

It is also not trying to send the command via the cloud path

My app is checked in here

@chearmstrong
Copy link

Just from looking at the demo app, and your app, don't you need the index.html file? The demo app uses Webpack to inject your .js bundle to the page, which also has the SDK referenced there. I'm not sure how it would work without that (unless I'm completely missing something).

@hardillb
Copy link
Author

The index.html is in the dist dir that I excluded from the git as I forgot the html was in there with the rest of the webpack output.

I'll push it when I get back home tonight. Thanks for pointing it out.

@gytisgreitai
Copy link

@hardillb have you solved this? I have exactly the same problem, identify - ok, reachable - ok, but execute handler is not invoked I just get "Sorry, it looks like the XX is unavailable right now"

@hardillb
Copy link
Author

No, Still waiting from some input from Google. All they will say over on Reddit is that they are working on an example, but no timeframe.

@gytisgreitai
Copy link

Ok they have an issues since start of September https://issuetracker.google.com/issues/141005276

One strange info that I found on SO Local execution currently relies on the Home Graph to determine whether to send a command locally. I'm not using Home Graph so maybe that is the case.

Their smarthome_sdk.js still has some sort of logging framework built in, tried to turn it on, but when I issue execute it's dead silent there, nothing seems to be happening. So probably just have to wait, cause I'm out of ideas right now.

@hardillb
Copy link
Author

The bit about the Home Graph is useful. My test device does update the Home Graph but only when controlled via the cloud at the moment and my well be out of sync with what I'm asking. I will have a play.

Out of interest do you know where (if anywhere) it mentions needing Home Graph support in the Local Control docs?

@gytisgreitai
Copy link

gytisgreitai commented Oct 27, 2019

No, haven't seen anything about that in the docs...

Further more it seems that after playing with this local execution stuff, and then completely removing it, I can no longer control my test devices by voice :) I always get "Sorry, it looks like the XX is unavailable right now", though it's working If I click on icons on Google Home App. Unlinking, did not seem to help. I'm wondering is there a reverse command for force local ? It seems force cloud did the trick

@sdsanders
Copy link

I'm experiencing the same issue. If I'm understanding that response about the Home Graph on Stack Overflow correctly, properly responding to the Identify request should update the Home Graph for us to indicate that the device can be controlled locally.

@hardillb
Copy link
Author

hardillb commented Oct 31, 2019

I've just noticed when I re-read the SO answer was that Assistant device needs to be the same "room" as the controlled device. My test device isn't. I will create a new device in the same room and test again.

@hardillb
Copy link
Author

This fact seems to be missing from any of the doc

@sdsanders
Copy link

sdsanders commented Oct 31, 2019

For what it's worth, I have my test device added to the same room as my speaker. I receive execute commands when I identify it as a single device (for test purposes), but I do not receive any execute commands when I identify it as a proxy device.

@hardillb
Copy link
Author

This is also very counter intuitive for a hub device, I would imaging one hub per house, not one per room. As long as I can discover the hub, and it reports the end devices behind it, it should use the hub

@devunwired
Copy link
Contributor

Hey Folks, wanted to provide a quick update here. The current preview release has a few known issues in both the SDK and the platform firmware blocking proper testing and implementation of hub devices. We are working to get these addressed and they will be fixed in the next preview release. At that point we will be able to publish updates docs and samples regarding hubs.

@hardillb The Home Graph behavior is actually different from the initial release when that SO answer was posted, so I've edited it. The current situation is that devices only have to be in the same structure for local execution.

@gytisgreitai
Copy link

@devunwired any timeframe on this ?:) Strange though that HomeAssistant folks managed to implement it :)

@devunwired
Copy link
Contributor

any timeframe on this ?:)

ASAP

Strange though that HomeAssistant folks managed to implement it :)

There are certain conditions under which you can get it working initially, but for execution specifically the implementation will not be stable due to some bugs we needed to fix in the firmware. This is likely why most folks are having difficulty trying to implement it using their instructions.

@ufosaga
Copy link

ufosaga commented Nov 2, 2019

Better to have #1 linked here.

@devunwired
Copy link
Contributor

We've updated this sample to include a hub use case, and included some additional detail in the implementation guide for hubs.

Please note one item in the updated documentation, you have to opt your test devices into the Cast Preview Program to test this functionality with the latest Cast firmware, which has not rolled out yet to production devices.

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

6 participants