Nest-api camera issues - nest-api

I have created product in developer console and have attached camera to my profile, but when I am trying to get camera info through api by the request:
https://developer-api.nest.com/devices/cameras?auth=auth_token
Its just empty object. How can I get camera info? Might be I should to attach camera to product somehow?

Related

Smart home google action not responding and device is always offline

I created a smart home action using action-on-google and nodeJs, and it works fine. When you say turn on switch off, it sends MQTT request to my server, means that onExecute function works fine but the problem is that google doesn't respond to my command by OK it says "sorry it looks like your device not available right now", I observed also that my device is always offline in Google home app. Is it required to work with firebase and get device state from there?
Firebase is one of web services allowed to store a device's states. You can feel free to use other web services.
If your device is offline, it may be because your Google Home App hasn't received your device's states.
Here are two paths for Google Home App receiving your device's data:
Google Server will send a action.devices.QUERY intent and callback your function (e.g. onQuery) to get the data of your device through your fulfillment, see action.devices.QUERY.
Thus, please print logs in the onQuery function and make sure that your function works fine.
Your smart home action must use the API of reportStateAndNotification to update your device's data in the Home Graph, see Method: devices.reportStateAndNotification.
If Google Assistant gives you "Sorry, device is not available right now", it probably is because the Google server hasn't received correct information from your fulfillment. Please follow the suggestions above and try it again.
If you're still having issues, check your logs to identify the particular issue for that device.

Telegram bot, is it possible to be sure that the image was not picked from the gallery

Is it possible to detect some information about an image sent to a Telegram bot?
the source of the image is the camera or the gallery.
the time image was created. (not message sending time).
When receiving a photo, the Telegram Bot API sends back only width, height, file size and a photo id to download the photo according to its documentation. Therefore:
The source of the photo can not be determined by the API itself unless this information can be found somewhere in the metadata of the photo itself. However, I believe that this would probably only show you the type of device the user was using, not the app the photo was taken with.
It is more likely, that you can find metadata about when the image was created in the image itself. In order to get to that data, you would have to download the photo and then use another tool to extract the metadata from the photo.
I have worked a lot with Telegram Bots and can confirm that Telegram does not transmit a lot of information about the user, the device the user is using, where files are coming from etc. in the API itself, which is actually in favour of its users.

How to read higher definition instagram avatar image?

I am currently able to use the instagram API to read the basic user profile. I am able to get the profile_picture from the returned result via the API call below.
https://api.instagram.com/v1/users/self/?access_token=ACCESS-TOKEN
However, I notice that the avatar image is extremely small - it is 150x150. And extremely pixelated if enlarged on a mobile device.
Is it possible for me to get the avatar image that is higher definition?
If so, what is the API that i need to use?

Twitter api doesn't send media element with timeline

So I am using the twitter node module and twitters rest api to fetch timelines.
All works well, except that attached images do not get sent with the response.
Even after I added "include_entities: true" to the options object.
I'm talking about an image directly attached to a twitter post, links get displayed just fine.
I simply can't find a way to get it to display, any help is appreciated.
Every tweet has a Media Entity attached to it. You need to find the Media Id and then get the URL from -mediaURL. The below picture shows the full object model.
PC : https://www.visual-paradigm.com/tutorials/rest-api-design-twitter-example.jsp

Getting spotify desktop player status

I come from an electronics background, with a project whereby I'd like to be able to obtain various information about the state of the desktop player, eg
Current track name
Current track artist
Position in song
Play/pause status
Is there an active API or other method which will allow me to obtain this information and get it out of the desktop app itself, such that I might be able to send that information out via a COM port?
Thanks in advance.
You could use my .NET Library SpotifyAPI .NET
It combines the spotify-local and spotify-web API.
Also, it provides all your required information and is simple to use.
Small example:
SpotifyLocalAPIClass spotify = new SpotifyLocalAPIClass();
if(!spotify.Connect())
return;
SpotifyMusicHandler mh = spotify.GetMusicHandler();
SpotifyEventHandler eh = spotify.GetEventHandler();
Console.WriteLine(mh.GetCurrentTrack().GetTrackName());

Resources