Call to sdm.devices.commands.ThermostatTemperatureSetpoint.SetCool fails with error 500 Internal Error - nest-device-access

I'm new to the Google / Nest SDM and saw this questions has been asked previously but not answered. I'm hoping with a little more information, I might be able to get some direction on where to look. I have been working on a connector app and I have most functionality working, I can retrieve the structures and devices and I can even change the modes from OFF to HEAT. to COOL and the thermostat reflects the changes. However, when I try to change the temperature, whether it's in heat or cool mode, I receive:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
I'm using:
{
"command" : "sdm.devices.commands.ThermostatTemperatureSetpoint.SetCool",
"params" : {
"coolCelsius" : "22.0"
}
}
I've tried Postman, RESTer and I don't receive much information other than the error 500. Anyone recommend anything else I can check? Weird how I can turn the thermostat on/off/change mode or put into ECO, but I can't adjust the temperature.

Related

Issues while expanding URNs in versioned creatives response

We are migrating our APIs from unversioned to versioned, and having an issue while trying to get assets data from creatives endpoint.The response has reference to a post, but we are unable to use the expand URNs concept and get the inner media details of the Post URN. Is there a different approach we need to follow here?
I've read through all the migration documents and the response decoration document is also pointing to v2 endpoint and projection parameters, instead of using rest endpoint and fields parameter. Document reference.
Previous Request
GET -
https://api.linkedin.com/v2/adCreativesV2?ids[0]=181794673&projection=(results(*(variables(data(com.linkedin.ads.SponsoredVideoCreativeVariables(userGeneratedContentPost~(specificContent(com.linkedin.ugc.ShareContent(shareCommentary,media(*(media~:playableStreams(),title)))))))))))
This request gets us the media details of the creatives without making multiple calls.
Current Request
GET - https://api.linkedin.com/rest/creatives?ids=List(urn%3Ali%3AsponsoredCreative%3A181794673)&fields=(results(*(content(reference~($URN)))))
I am looking at the response I got from https://api.linkedin.com/rest/creatives?ids=List(urn%3Ali%3AsponsoredCreative%3A181794673) and trying to create the fields request. But no luck yet and getting the below error.
{
"status": 400,
"code": "ILLEGAL_ARGUMENT",
"message": "Invalid projection parameter: (results(*(content(reference~($URN)))))"
}
But when tried with projection in place of fields I got a response
{
"results": {
"urn:li:sponsoredCreative:181794673": {
"content": {
"reference": "urn:li:ugcPost:6905584391779950593",
"reference!": {
"message": "Not enough permissions to access deco: ugcPosts.BATCH_GET.20230101",
"status": 403
}
}
}
}
}
Can someone help me getting the data similar to how we got it before, without making external calls? Otherwise I think I have to be making calls to Creatives -> Posts -> Video, Image, Share etc endpoints

Are fullPageUrl and averageSessionDuration no longer compatible in Reporting API?

Until December 12th 2022, I was able to combine fullPageUrl and averageSessionDuration in run report requests to the
Following endpoint
https://analyticsdata.googleapis.com/v1beta/properties/xxxxxxxxxx:runReport
If you go dimensions and metrics exporer and select the dimension "fullPageUrl", you can no longer select "averageSessionDuration". They are incompatible now.
My request body in JSON looks like this:
{"dimensions":[{"name":"date"},{"name":"fullPageUrl"},
{"name":"pageTitle"},],"metrics":[{"name":"averageSessionDuration"},{"name":"userEngagementDuration"},],"dateRanges":[{"startDate":"7daysAgo","endDate":"today"}]}
I get this error message as a reply:
{
"error": {
"code": 400,
"message": "Please remove averageSessionDuration to make the request compatible. The request's dimensions & metrics are incompatible. To learn more, see https://ga-dev-tools.web.app/ga4/dimensions-metrics-explorer/",
"status": "INVALID_ARGUMENT"
}
}
I couldnt find anything in the documentation or in the changelogs.
The Google analytics data api is in beta it is not completed which means that they are still tuning it.
Your issue is that "fullPageUrl" and "averageSessionDuration" are not longer compatible you cant use them together in a report.
That being said I cant find any mention of it in the change log so I am going to contact the team and see what they have to say.

Google calendar API return conference data as pending

When we create an event using google calendar API, it would not return hangout link in some cases, but return the status as pending.
"conferenceData": {
"createRequest": {
"requestId": "kavprurmn7h34jxcq6vgiufs2k",
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"status": {
"statusCode": "pending"
}
}
},
I would assume that Google would return the Hangout link if we try to get the event after some time. The challenge is how to test this scenario. It is hard to reproduce this issue when you need to test, but the issue happens once in a while in production. How do we test this ? Is there a way to simulate this API behavior?
If the event is still pending not all information might be available. You have to try to get it until the event status is success.
In this situation you should use exponential backoff to try to get the Hangouts link. This prevents making unnecessary calls that may fill your quota or throttle your network. To accomplish this on Javascript, as an example, you can use .setTimeout(). Feel free to ask any question to expand this answer.

Error NGEO_ERROR_GRAPH_DISCONNECTED when calculating a route

When I calculate the route from coordinate 49.4935,0.5118 to 41.8114,2.7408 (truck + trailer 40ton) the web service returns error 400 - Bad request.
I have tested this with the example https://tcs.ext.here.com/examples/v3/fleet_telematics_api, and this explains the reason: the second waypoint is in a zone with a restriction of 7.5 ton (see image).
Is there a possibility to get this error from the webservice, so I can alert the user what the problem is?
Here example
When you make your request, you get this response:
{
"issues": [
{
"message": "Couldn't reach way point 1 (start links 907492075 -907492075 907492077 -907492077 907493126 -907493126 dest links 719515104 -719515104 ), link 907492075 might restrict access for the vehicle type, link 907492075's through traffic restriction might apply, link 907492077 might restrict access for the vehicle type, link 907492077's through traffic restriction might apply, link 907493126's through traffic restriction might apply"
},
{
"message": "Request id: bfb4932d-f159-4d3a-986e-77f6bc41b143"
}
],
"response": null,
"error_id": "bfb4932d-f159-4d3a-986e-77f6bc41b143",
"response_code": "400 Bad Request"
}
The response code is 400 Bad Request but there is also a list of messages in issues that you can use to alert the user.

How can I fix a 501 error from the clockify API?

I'm getting a 501 response from the clockify API when trying to create a Time Entry using CreateTimeEntryRequest
I've verified I can query the API and get data from it, so I'm using the correct X-Api-Key, I've resolved a few issues with bad datetime formats, but I'm still getting the error.
URL I'm posting to:
https://api.clockify.me/api/workspaces/REMOVED/timeEntries/
My POST request header looks like this:
{"x-api-key": REMOVED, "Content-Type": "application/json"}
The body of the request is (For example):
{"start": "2019-01-28T14:53:04Z", "billable": false, "description": "Test Time Entry", "projectID": null, "taskID": null, "end": "2019-01-28T15:53:04Z", "tagIds": []}
I'm getting:
{"message": "Entity not created.", "code": 501}
And the time entry is not being created.
I expect some kind of success message
It has something to do with the "End" variable. If you remove it, it'll work. This of course means the timer will be running (also you will get a 400 error if you already have a timer running), so if you want to stop it, you'll have to immediately call PUT /workspaces/{workspaceId}/timeEntries/endStarted or if you want the stop time to be at some point in the past, you'll have to update the timer with PUT /workspaces/{workspaceId}/timeEntries/{id}. However the update doesn't seem to work either (same issue). My guess is they made a change to the endpoint (perhaps renamed the "end" variable), because I'm about 75% sure I used this API within the last month or so and it worked.
Hopefully someone from Clockify will see this and give an update. I had a similar issue happen with the "me" field in the GetSummaryReportRequest object. It stopped working and removing the field fixed it.

Resources