When I try to change the is_streaming field of a Nest camera, the request does not return any error but the field is not changed.
In the API docs, I noticed it says
You must ask the user if it's ok to change streaming status (turn the
camera on/off). The user must agree to this change before your product
can change this camera status.
https://developer.nest.com/documentation/api-reference/overview#isstreaming-cam
so I wonder if this rule is enforced and how?
I don't own a Nest Camera, I'm testing with the Nest Home Simulator in which you can create fake cameras, so maybe I'm not seeing everything as a real user would.
Related
I'm using the PaymentElement UI component to accept Stripe payments, which seems to be the way they're encouraging most people to go.
The docs say it "Automatically adjusts input fields to collect information based on the payment method and country... [and] Reduces friction for card payments with input validation, masking, styling and error handling."
The problem I'm having is that scrolling list of supported cards includes icons for cards which are not, in fact, supported in my region. And if someone enters one of those cards, it correctly identifies the icon, but doesn't throw a validation error — it waits until form submission and then fails to charge the card.
From a UX perspective, this seems less than ideal. OK, I get that 3056930009020004 correctly "validates" as a Diners Club card, but it seems that it should invalidate it in advance rather than waiting to actually try and complete the charge and responding with a "Your card is not supported" charge failure.
Is there a way I can (ideally) tell it to only include the cards that are actually supported automatically, or (alternatively) provide a list of cards it should display and validate?
If "no" to both of those, is this a bug? Can/should I report it as a bug or feature request to Stripe?
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.
I am completely new to Bixby development so I apologize in advance if this is a newby question that doesn't make sense. I'm trying to understand the best way to store value sets returned from external APIs to use throughout Bixby Voice experiences. An example might be an API that gets all the menu items at a restaurant or an API that gets all the clothing catalog items from a store. When users interact with the data to search or transact I don't want to have to go back to the external API to get the value set again. For example: Find Vegan Menu options followed by Okay how about pescatarian options. Or: Find dress pants followed by okay how about dress shirts. I'd like to come back to a menu object in the first case or a catalog object in the second without having to re-load the value sets from the API.
In the sample code I've seen all of the value sets appear to be read in each time an action/endpoint/java call is made
There is no local storage in the current version of Bixby.
The easiest solution is to request through API calls. However, http.getUrl() itself is cached by default, and Bixby runs on Samsung server, so no actual API calls in practice when requesting same url in short sessions.
You can read more about http API options and how to disable cache feature by reading more here
Basically I want to display the current track on a website.
I already searched quite a bit for a possibility to get notified when player state (play/pause, track, current position) changes.
My question:
Is it possible to get notified (socket, hook call) or is the only possibility I have to call the Web API like every second and fetch the state?
I fear that I'm running into rate limits when multiple users connect their accounts and display the current track.
Nope, there's still no way to do that. To achieve what you'd like, you need to pool the Spotify API continuously.
You can however use the Spotify SDK that you can pass a function to be executed on playback state change. The SDK is incompatible with a few platforms (see supported browsers), but for those you could catch the SDK initialization error and then switch to continuous polling via the API. You will have a lot fewer requests then.
A second option would be to only update the currently playing song after the last song should have ended. When getting the playback state for the currently playing song, you could use the field duration_ms and progress_ms to calculate the remaining time of the song. Then schedule another API requests for when the song should have ended and you're good. Whether that's a good strategy for your use case or not depends on the type of playback and how often the playback changes in your app.
I hope I could help!
As of now, it seems to be possible to receive player state events with a listener:
https://developer.spotify.com/documentation/web-playback-sdk/guide/#playback-information-display
I haven't tested the Web version, I'm currently using the analogous Android APIs, and Android's seems to work for play/pause change and track change (but not for position change)
What I want to do is verify users identity in my mobile app through the smartphone webcam, with a selfie.
So I made a small web app just to test microsft azure cognitive services, using the Face API. I take 2 pictures. I get both pictures faceIds with the Face - Detect, then I compare both faceIds with Face - Verify, if they are the same person the API does respond with a true value and the confidence number, false otherwise.
The thing is, on terms of security, if I take a picture of a picture, let's say I took a selfie, then I take a picture of the selfie in cellphone with the webcam, it does detect a face, and it is my face, then I take a picture of myself with the webcam, so, when I use Face - Verify, it returns true.
So, If I want to use this as an identity verification, this is a huge security risk. I was wondering if there's a way to prevent this.
We wanted to forward a response from an engineer:
The service would not differentiate between a high quality photo or a live image. Therefore, we do not recommend the service as a single form of authentication. However, some customers have tried capturing multiple frames to verify that it is not a still image.
Another hard solution is that you can use text recognition service along with it.
eg. generate a random number in app and ask user to include this number front of camera. (maybe user can use a paper or board to show random number on screen).
So on server side you will also require to read number from the picture to verify it
There is another Recognition API from Microsoft which can detect objects. I've tested and it can detect if there is a cellphone in the picture. (If you try to access with the picture in cellphone).
The problem is if you try to access with the cellphone and you can't see the border of the cellphone.
You can ask the user to do some random actions like close left eye or smile, or something like that. And you will get this in the second face detection.