Can connect to device using Device API instead of Cloud API? - nest-api

I have reviewed Nest Cloud API and it's pretty nice feature.
As per their diagram, we need to connect to their Cloud API and that API connects to device.
I want to know that is there a way we can directly connect to device like device API instead of connecting through cloud API?
Please guide
Thanks

No this is not currently possible. However in the future there will be Nest Weave for in home device to device communication. Checkout this page for more info: https://developers.nest.com/documentation/weave/weave-overview

Related

How do you write a Google Action that posts to an API on the local network

I'm just starting out writing Google Actions for some home automation projects. I can't seem to find information on how to write an action that will POST to an API on the local network. I don't want to go outside the firewall to automate devices and services located on the local LAN. I have provided an image of what I'm looking to do.
You can't do this. The Google Home device doesn't (generally) have access to the local network and aside from basic voice processing, your Actions run in the cloud rather than the local device itself.
Most devices that appear to act locally all contact a cloud-based service to do what they want. This allows your Assistant to act on them, even when the Assistant device (such as your phone) isn't on the LAN.
Your options are pretty narrow:
See if IFTTT supports what you're trying to do and either use an API with IFTTT or use IFTTT directly from the Home.
Setup a tunnel between an endpoint on the public Internet and your LAN.
Setup a cloud-based service your local device checks for state changes (there are a variety of approaches you can take here).
A variant on that last one (inspired by #Nick's comment) is to have a single local hub that listens for changes in some cloud service and dispatches those changes locally. (Again, a variety of approaches.)
If you use Google Smart Home actions you can use:
Local Execution
I do not know if they plan to extend this to Dialog Flow type actions.

how to know from which device you are logged in

I just want to know from which device logged in our website and where from (Location)
I'm currently working on azure mobile service API
Per my understanding, Azure mobile service APIs provided functions to approach resources on Azure but collect devices information.
If you want to detect device on website, I think How to detect mobile device and get user agent info send and save that information to database on server, only once maybe the similar thread on SO.
And to get the location of mobile devices on Web apps, I think How web apps ask location of mobile device will be the similar thread.
If you are creating a mobile application, and a Azure Mobile Apps with node.js as a backend for your application. We can create a custom API, and hit the API to send device information and location when your user login the app. For different platform, there are built-in functions in their SDKs to collect devices information and location.

Azure Mobile Services with Websocket

I would like to use websocket to notify a remote website whenever a table insert is triggered on my Azure mobile services.
Right now I was able to successfully send GCM notification to registered device using
push.gcm.send
in my insert script.
If i want to achieve aforementioned requirement, what are the required steps?
Setup a Node.js server, call node.js server from insert script, then node.js server use websocket to connect with remote website?
Please kindly point me to the right direction.
thanks!
One option is to use Socket.IO with Azure Mobile Services: https://azure.microsoft.com/en-us/blog/how-to-use-socket-io-with-azure-mobile-service-node-backend/
The comment posted by #gary-liu-msft is also good idea, using queues. He pointed here: https://azure.microsoft.com/en-us/blog/how-to-use-socket-io-with-azure-mobile-service-node-backend/

Does use of the Nest API require that the devices are all connected to the external Internet

Can a devices inside of a home communicate with one another using the Nest API without being connected to the external Internet, or does it require traffic to go through a cloud server?
Yes, the Nest API is a cloud API, the communication is through a server at wss://developer-api.nest.com
See the Nest API Intro.

J2ME Bluetooth - discover a service with unknown details

Lets say I have a device which my cell phone can connect to via bluetooth (it can be any device on the market...)
For being able to connect this device using a J2ME application on my cell phone, I need to discover the device first, and then discover the service which the device lets cell phones connect to.
My problem is that I don't know how to discover that service.... the device is being discovered with no problems by the J2ME application, but for discovering the service of this device, I need service's UUID and Attributes (J2ME API requirements), which I have no idea where and how to get.
Does anyone know how can I still connect the device's service using a J2ME application, without knowing service's UUID and Attributes ?
Thanks!
As far as I know, there is nothing in the API to directly do "remote service discovery", but I found this, which I think is about that:
Service discovery allows you to find
nearby services, regardless of what
devices are offering them.
DiscoveryAgent provides methods to
discover services on a Bluetooth
server device and to initiate
service-discovery transactions. Before
a service can be discovered, it must
first be registered or advertised on a
Bluetooth server device. The server is
responsible for a number of things,
including creating a service record
that describes the service offered,
accepting connections from clients,
and adding a service record to the
server's Service Discovery Database
(SDDB). In general, it works like Web
services.

Resources