最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to one device delete in 'google home app'? - Stack Overflow

programmeradmin2浏览0评论

As a developer, I'm asking situation regarding the Google Home app. I can already control multiple boilers in my own app. In my own app, when one of the user's multiple boilers is deleted, only one boiler can be deleted. Once only one boiler is already deleted from my own app, only one boiler is also deleted from the Google Home app. However, even though the deleted device is added again from the my own app because it is a method of synchronizing except for a specific device in my server78(my server), the device that has been excluded from the Google Home app cannot be added again. To prevent this case, is there an API that the Google Home app provides itself? The intention is not to erase multiple devices at once, but to delete only one device and maintain the rest of the devices. Is there an API for this function? If not, how do I solve it? If only one device was deleted from my own app, should I delete and add the entire device again in the Google Home app to reflect this? Is there another way? I'm not asking for user deletion. I'm asking to delete only some of the user's devices.

My current method is to exclude it during synchronization, so it can be deleted from the Google Home app, but the deleted device cannot be added again. I'm asking a question because I don't have any related documents. thank you

The situation is that it is not possible to distinguish between 'when the deleted device list is refreshed in the Google Home app' and 'when a device is added using the sync() function'. Therefore, it is impossible to tell with the current method whether the method is to synchronize the device deleted in the refresh or to add a completely new device. Ultimately, once you are excluded, you are excluded forever. I am asking this question because I think it is difficult to exclude and add specific devices using the synchronization method.

I'm trying to delete only one device, but there is no related API or development direction. [google home app] If you try to delete only one device, it will be deleted forever. (Cannot be re-added) (Can be done by restarting the server program)

const filteredDevices = devices.filter((device) => !deletedDevices.has(device.id));
await delay(1000);
           
// 4. Google Home Graph
await reportStateToGoogle(uid, filteredDevices); 
await delay(2000);
// 5. Google Home Graph
await requestSyncToGoogle(uid); 

   
// If you delete this part, the deleted item will be deleted forever and will not be visible in the Google Home app.
// If this part exists, After moment delete, it will be visible again in the Google Home app after 30 seconds.(just 30 seconds delete)
// In other words, if this part does not exist, once you delete it, it will be deleted forever.
// Even if I want to re-add the device I deleted, I don't see the device to add.
           
// 6. delete device list
// await delay(30000);
// deletedDevices.delete(deviceId); 

As a developer, I'm asking situation regarding the Google Home app. I can already control multiple boilers in my own app. In my own app, when one of the user's multiple boilers is deleted, only one boiler can be deleted. Once only one boiler is already deleted from my own app, only one boiler is also deleted from the Google Home app. However, even though the deleted device is added again from the my own app because it is a method of synchronizing except for a specific device in my server78(my server), the device that has been excluded from the Google Home app cannot be added again. To prevent this case, is there an API that the Google Home app provides itself? The intention is not to erase multiple devices at once, but to delete only one device and maintain the rest of the devices. Is there an API for this function? If not, how do I solve it? If only one device was deleted from my own app, should I delete and add the entire device again in the Google Home app to reflect this? Is there another way? I'm not asking for user deletion. I'm asking to delete only some of the user's devices.

My current method is to exclude it during synchronization, so it can be deleted from the Google Home app, but the deleted device cannot be added again. I'm asking a question because I don't have any related documents. thank you

The situation is that it is not possible to distinguish between 'when the deleted device list is refreshed in the Google Home app' and 'when a device is added using the sync() function'. Therefore, it is impossible to tell with the current method whether the method is to synchronize the device deleted in the refresh or to add a completely new device. Ultimately, once you are excluded, you are excluded forever. I am asking this question because I think it is difficult to exclude and add specific devices using the synchronization method.

I'm trying to delete only one device, but there is no related API or development direction. [google home app] If you try to delete only one device, it will be deleted forever. (Cannot be re-added) (Can be done by restarting the server program)

const filteredDevices = devices.filter((device) => !deletedDevices.has(device.id));
await delay(1000);
           
// 4. Google Home Graph
await reportStateToGoogle(uid, filteredDevices); 
await delay(2000);
// 5. Google Home Graph
await requestSyncToGoogle(uid); 

   
// If you delete this part, the deleted item will be deleted forever and will not be visible in the Google Home app.
// If this part exists, After moment delete, it will be visible again in the Google Home app after 30 seconds.(just 30 seconds delete)
// In other words, if this part does not exist, once you delete it, it will be deleted forever.
// Even if I want to re-add the device I deleted, I don't see the device to add.
           
// 6. delete device list
// await delay(30000);
// deletedDevices.delete(deviceId); 
Share Improve this question edited Feb 4 at 5:39 Ajeet Verma 3,1263 gold badges17 silver badges30 bronze badges asked Feb 3 at 5:23 홍길동홍길동 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

Thank you for reaching out with your question. From your description, it sounds like you are a developer working with cloud-to-cloud APIs to integrate your devices with Google Home. Let me clarify a few things to help address your concerns.

Key Points About Cloud-to-Cloud Integration:

  1. Device Addition and Deletion via the Sync Intent

In the cloud-to-cloud API process, both adding and deleting devices are handled using the same API, which is the Sync Intent. Every time Google sends a SYNC request, your server must respond with the current and accurate list of devices and their capabilities.

  • If a device is removed from the response, Google interprets it as deleted and removes it from the Google Home ecosystem.
  • If a new device is added to the response, it will automatically be added to the ecosystem.

This process ensures that the Google Home ecosystem reflects the exact state of your devices based on your server's response. Here’s the documentation for the Sync Intent that outlines how this works.

  1. No Difference in Cloud Behavior for Additions or Deletions

The system does not differentiate between a device being refreshed or added; it only relies on the current state you provide in your Sync Intent response. As long as your server accurately reflects the list of devices, Google will synchronize correctly.

  1. Intents in Cloud-to-Cloud Integration
  • Sync Intent: Sends a request for the list of devices and their capabilities.

  • Query Intent: Used to fetch the current state of devices when a user asks, “Is my device doing X?”

  • Execute Intent: Used to send user commands, such as “Turn on the light.”

For more details about these intents, check the Intent Fulfillment documentation.

  1. Testing and Troubleshooting

If you notice a device isn’t showing up or syncing properly, ensure:

  • Your Sync Intent response includes the device with accurate details and capabilities.

  • There are no errors in your HTTP request/response. Refer to Google Home Error Codes for more details.

Next Steps:

  • Ensure that your server’s response to the Sync Intent is complete and accurate.

  • Use the Smart Home Sync Validator to test your responses and validate your integration.

If you have further questions or need specific examples of HTTP requests/responses, feel free to check the Cloud-to-Cloud API Documentation.

发布评论

评论列表(0)

  1. 暂无评论