Notification throttling has bad behaviour - fiware-orion

I have deployed a empty Orion and connected a device that sends updates ervery 10 secs. I need to receive one notification each 10 min so I have created a notification with a throttling of 600 s.
The problem is that I am reciving two notifications in the same minute or even a couple seconds after the first one.
1) One instance of orion version: 2.2.0
2) Orion suscriptions
[
{
"id": "5e9ec90d9e2ba22996168d78",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id1",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 521026,
"lastNotification": "2020-05-21T10:52:53.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-20T16:46:58.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:53.00Z",
"lastSuccessCode": 500
}
},
{
"id": "5e9ec96f9e2ba22996168d79",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id2",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 526757,
"lastNotification": "2020-05-21T10:52:50.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-21T09:32:34.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:50.00Z",
"lastSuccessCode": 500
}
},
{
"id": "5e9ec9899e2ba22996168d7a",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id3",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 541814,
"lastNotification": "2020-05-21T10:52:47.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-21T01:49:52.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:48.00Z",
"lastSuccessCode": 500
}
},
{
"id": "5e9ec9a69e2ba22996168d7b",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id3",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 470859,
"lastNotification": "2020-05-21T10:52:47.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-20T21:01:32.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:47.00Z",
"lastSuccessCode": 500
}
},
{
"id": "5e9ec9c09e2ba22996168d7c",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id4",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 532901,
"lastNotification": "2020-05-21T10:52:44.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-21T08:33:10.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:45.00Z",
"lastSuccessCode": 500
}
},
{
"id": "5e9ec9ff9e2ba22996168d7d",
"description": "Notificaciones a Arcgis",
"expires": "2040-01-01T14:00:00.00Z",
"status": "active",
"subject": {
"entities": [
{
"id": "id5",
"type": "aqss"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"timesSent": 520974,
"lastNotification": "2020-05-21T10:52:53.00Z",
"attrs": [],
"attrsFormat": "normalized",
"http": {
"url": "http://test.eu/notify/"
},
"metadata": [
"dateCreated",
"dateModified"
],
"lastFailure": "2020-05-21T05:30:58.00Z",
"lastFailureReason": "Timeout was reached",
"lastSuccess": "2020-05-21T10:52:53.00Z",
"lastSuccessCode": 500
}
}
]
3) Orion is running in a docker instance
[root#271386b095c6 /]# ps ax
PID TTY STAT TIME COMMAND
1 ? Ssl 320:12 /usr/bin/contextBroker -fg -multiservice -ngsiv1Autocast -dbhost mongo -corsOrigin __ALL -logLevel DEBUG
9248 pts/0 Ss 0:00 bash
9293 pts/0 R+ 0:00 ps ax
4) Pending...
5) Entities and suscriptions belong to the same service and service-path
Thanks

Looking to the info above, it seems you have a lot of subscriptions. Six of them, if I have counted correctly.
Not sure if all of them are covering the same entities/attributes, but my recommendation would be to simplify your scenario leaving only one subscription and test again.
You can delete subscription using DELETE /v2/subscriptions/{subId}.

Related

can't able to store fhir resource in mongodb using asymmetrik mongodb fhir-core-server

i'm running node-fhir-server-mongo(Asymmetrik github repo)..when i put resource using PUT method and it stores in mongodb...everything works fine...but the data is partially stored...when i try to access the data i stored in database it only shows few pieces only...
below code is the data i want to store..
{
"resourceType": "Patient",
"id": "example3",
"text": {
"status": "generated",
},
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "urn:oid:1.2.36.146.595.217.0.1",
"value": "12345",
"period": {
"start": "2001-05-06"
},
"assigner": {
"display": "Acme Healthcare"
}
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Chalmers",
"given": [
"Peter",
"James"
]
},
{
"use": "usual",
"given": [
"Jim"
]
},
{
"use": "maiden",
"family": "Windsor",
"given": [
"Peter",
"James"
],
"period": {
"end": "2002"
}
}
],
"telecom": [
{
"use": "home"
},
{
"system": "phone",
"value": "(03) 5555 6473",
"use": "work",
"rank": 1
},
{
"system": "phone",
"value": "(03) 3410 5613",
"use": "mobile",
"rank": 2
},
{
"system": "phone",
"value": "(03) 5555 8834",
"use": "old",
"period": {
"end": "2014"
}
}
],
"gender": "male",
"birthDate": "1974-12-25",
"_birthDate": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
"valueDateTime": "1974-12-25T14:35:45-05:00"
}
]
},
"deceasedBoolean": false,
"address": [
{
"use": "home",
"type": "both",
"text": "534 Erewhon St PeasantVille, Rainbow, Vic 3999",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"period": {
"start": "1974-12-25"
}
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N"
}
]
}
],
"name": {
"family": "du Marché",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "VV"
}
]
},
"given": [
"Bénédicte"
]
},
"telecom": [
{
"system": "phone",
"value": "+33 (237) 998327"
}
],
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"period": {
"start": "1974-12-25"
}
},
"gender": "female",
"period": {
"start": "2012"
}
}
],
"managingOrganization": {
"reference": "Organization/1"
} }
and the actual data is stored on the mongodb is....
_id: "example3" id: "example3" meta: Object versionId: "1" lastUpdated: "2022-06-28T08:44:44+00:00" resourceType: "Patient"
if anyone know the answer or how to solve please let me know....thanks in advance!

AWS Cloudformation stuck in UPDATE_ROLLBACK_FAILED

I deploy my AWS Lambdas via AWS Serverless Application Model (SAM). One of my Lambdas uses Numpy which I reference via a 3rd party layer from Klayers by #keithRozario. I was using Klayers-python38-numpy:16 but discovered that it was deprecated after I deployed today which left my stack in an UPDATE_ROLLBACK_FAILED state.
One recommendation is to use Stack actions -> Continue update rollback from the AWS console; which I tried but it didn't work. The other solution is to delete the stack. However, this would be my first time deleting a stack and what I'd like to know is: if I delete my stack via the console, will my stack get recreated when I redeploy it? I've looked for answers to my question but I'm only finding references to deleting resources within the stack.
What I'd also like to know is, my stack is the first stack of many in an AWS CodePipeline, will my pipeline still work if I delete my stack? Further, will I experience anymore failed stacks as I proceed to subsequent stacks within my pipeline?
Lastly, the plan is to update to Klayers-python38-numpy:19 when I redeploy.
EDIT: as per #marcin
The problem is that the Klayers-python38-numpy:16, that is already deployed throughout my stack, is no longer available. I tried deploying a change to my code this morning, my pipeline failed during the CreateChangeSet step. The fact that this layer is no longer available is, I'm assuming, the reason my stack is unable to rollback.
My pipeline looks like this:
{
"pipeline": {
"name": "my-pipeline",
"roleArn": "arn:aws:iam::123456789:role/my-pipeline-CodePipelineExecutionRole-4O8PAUJGLXYZ",
"artifactStore": {
"type": "S3",
"location": "my-pipeline-buildartifactsbucket-62byf2xqaa8z"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "SourceCodeRepo",
"actionTypeId": {
"category": "Source",
"owner": "ThirdParty",
"provider": "GitHub",
"version": "1"
},
"runOrder": 1,
"configuration": {
"Branch": "master",
"OAuthToken": "****",
"Owner": "hugo",
"Repo": "my-pipeline"
},
"outputArtifacts": [
{
"name": "SourceCodeAsZip"
}
],
"inputArtifacts": []
}
]
},
{
"name": "Build",
"actions": [
{
"name": "CodeBuild",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"ProjectName": "my-pipeline"
},
"outputArtifacts": [
{
"name": "BuildArtifactAsZip"
}
],
"inputArtifacts": [
{
"name": "SourceCodeAsZip"
}
]
}
]
},
{
"name": "CI",
"actions": [
{
"name": "CreateChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 1,
"configuration": {
"ActionMode": "CHANGE_SET_REPLACE",
"Capabilities": "CAPABILITY_IAM",
"ChangeSetName": "my-pipeline-ChangeSet-ci",
"ParameterOverrides": "{\n \"MyEnvironment\" : \"ci\"\n}\n",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-ci",
"TemplatePath": "BuildArtifactAsZip::packaged.yaml"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "BuildArtifactAsZip"
}
]
},
{
"name": "ExecuteChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 2,
"configuration": {
"ActionMode": "CHANGE_SET_EXECUTE",
"ChangeSetName": "my-pipeline-ChangeSet-ci",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-ci"
},
"outputArtifacts": [
{
"name": "my-pipelineCIChangeSet"
}
],
"inputArtifacts": []
}
]
},
{
"name": "Staging",
"actions": [
{
"name": "CreateChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 1,
"configuration": {
"ActionMode": "CHANGE_SET_REPLACE",
"Capabilities": "CAPABILITY_IAM",
"ChangeSetName": "my-pipeline-ChangeSet-staging",
"ParameterOverrides": "{\n \"MyEnvironment\" : \"staging\"\n}\n",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-staging",
"TemplatePath": "BuildArtifactAsZip::packaged.yaml"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "BuildArtifactAsZip"
}
]
},
{
"name": "ExecuteChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 2,
"configuration": {
"ActionMode": "CHANGE_SET_EXECUTE",
"ChangeSetName": "my-pipeline-ChangeSet-staging",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-staging"
},
"outputArtifacts": [
{
"name": "my-pipelineStagingChangeSet"
}
],
"inputArtifacts": []
}
]
},
{
"name": "Prod",
"actions": [
{
"name": "DeploymentApproval",
"actionTypeId": {
"category": "Approval",
"owner": "AWS",
"provider": "Manual",
"version": "1"
},
"runOrder": 1,
"configuration": {},
"outputArtifacts": [],
"inputArtifacts": []
},
{
"name": "CreateChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 2,
"configuration": {
"ActionMode": "CHANGE_SET_REPLACE",
"Capabilities": "CAPABILITY_IAM",
"ChangeSetName": "my-pipeline-ChangeSet-prod",
"ParameterOverrides": "{\n \"MyEnvironment\" : \"prod\"\n}\n",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-prod",
"TemplatePath": "BuildArtifactAsZip::packaged.yaml"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "BuildArtifactAsZip"
}
]
},
{
"name": "ExecuteChangeSet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CloudFormation",
"version": "1"
},
"runOrder": 3,
"configuration": {
"ActionMode": "CHANGE_SET_EXECUTE",
"ChangeSetName": "my-pipeline-ChangeSet-prod",
"RoleArn": "arn:aws:iam::123456789:role/my-pipeline-CloudFormationExecutionRole-1O8GOB5C2VXYZ",
"StackName": "my-pipeline-prod"
},
"outputArtifacts": [
{
"name": "my-pipelineProdChangeSet"
}
],
"inputArtifacts": []
}
]
}
],
"version": 1
}
}
if I delete my stack via the console, will my stack get recreated when I redeploy it?
Yes. You can try to deploy same stack again, but probably you should investigate why it failed in the first place.
What I'd also like to know is, my stack is the first stack of many in an AWS CodePipeline, will my pipeline still work if I delete my stack?
Don't know, but probably not. Its use case specific and you haven't provide any info about the CP.
Further, will I experience anymore failed stacks as I proceed to subsequent stacks within my pipeline?
If one action fails, you can't proceed with further actions. Even if you could, other stacks can depend on the first one, and they will fail as well.

GoogleFit Rest API - Correct aggregate data source for daily steps

The APIs documentation says that, to get a result like the Google Fit App, one should request the steps of the derived:com.google.step_count.delta:com.google.android.gms:estimated_steps datasource
https://developers.google.com/fit/scenarios/read-daily-step-total
https://developers.google.com/fit/faq#get-step-count
In practice, it mostly seems right but, occasionaly, the results are way off.
Doing some tests, I noticed that, sometimes, using the derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas datasource gets me better results or, at least, values more similar to the ones showed in the Google Fit app.
I think though that, if a user uses more devices to count the steps, this datasource will get me all the steps combined and that's wrong.
Is it correct to use the estimated_steps datasource or should I switch to the merge_step_deltas one?
Or is it something else I can do to get the correct number of steps?
Real example
A client's steps don't match with the ones showed by the Google Fit app.
Here are his datasources list
{
"dataSource": [
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "duration",
"format": "integer"
}
],
"name": "com.google.active_minutes"
},
"dataStreamName": "from_activity<-merge_activity_segments",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.active_minutes:com.google.android.gms:from_activity<-merge_activity_segments",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "duration",
"format": "integer"
}
],
"name": "com.google.active_minutes"
},
"dataStreamName": "from_steps<-estimated_steps",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.active_minutes:com.google.android.gms:from_steps<-estimated_steps",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "duration",
"format": "integer"
}
],
"name": "com.google.active_minutes"
},
"dataStreamName": "merge_active_minutes",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.active_minutes:com.google.android.gms:merge_active_minutes",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "activity",
"format": "integer"
}
],
"name": "com.google.activity.segment"
},
"dataStreamName": "merge_activity_segments",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.activity.segment:com.google.android.gms:merge_activity_segments",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "activity",
"format": "integer"
}
],
"name": "com.google.activity.segment"
},
"dataStreamName": "platform_activity_segments",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.activity.segment:com.google.android.gms:platform_activity_segments",
"type": "derived"
},
{
"dataStreamName": "activity_from_steps",
"dataType": {
"field": [
{
"name": "activity",
"format": "integer"
}
],
"name": "com.google.activity.segment"
},
"dataQualityStandard": [],
"application": {
"packageName": "com.google.android.gms"
},
"device": {
"model": "SM-A600FN",
"version": "",
"type": "phone",
"uid": "324bd687",
"manufacturer": "samsung"
},
"dataStreamId": "derived:com.google.activity.segment:com.google.android.gms:samsung:SM-A600FN:324bd687:activity_from_steps",
"type": "derived"
},
{
"dataStreamName": "from_activity_samples<-derived:com.google.activity.samples:com.google.android.gms:samsung:SM-A600FN:324bd687:detailed",
"dataType": {
"field": [
{
"name": "activity",
"format": "integer"
}
],
"name": "com.google.activity.segment"
},
"dataQualityStandard": [],
"application": {
"packageName": "com.google.android.gms"
},
"device": {
"model": "SM-A600FN",
"version": "",
"type": "phone",
"uid": "324bd687",
"manufacturer": "samsung"
},
"dataStreamId": "derived:com.google.activity.segment:com.google.android.gms:samsung:SM-A600FN:324bd687:from_activity_samples<-derived:com.google.activity.samples:com.google.android.gms:samsung:SM-A600FN:324bd687:detailed",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "calories",
"format": "floatPoint"
}
],
"name": "com.google.calories.expended"
},
"dataStreamName": "from_activities",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.calories.expended:com.google.android.gms:from_activities",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "calories",
"format": "floatPoint"
}
],
"name": "com.google.calories.expended"
},
"dataStreamName": "merge_calories_expended",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.calories.expended:com.google.android.gms:merge_calories_expended",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "calories",
"format": "floatPoint"
}
],
"name": "com.google.calories.expended"
},
"dataStreamName": "platform_calories_expended",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.calories.expended:com.google.android.gms:platform_calories_expended",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "intensity",
"format": "floatPoint"
}
],
"name": "com.google.heart_minutes"
},
"dataStreamName": "from_activity<-merge_activity_segments",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.heart_minutes:com.google.android.gms:from_activity<-merge_activity_segments",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "intensity",
"format": "floatPoint"
}
],
"name": "com.google.heart_minutes"
},
"dataStreamName": "from_heart_rate<-merge_heart_rate_bpm",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.heart_minutes:com.google.android.gms:from_heart_rate<-merge_heart_rate_bpm",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "intensity",
"format": "floatPoint"
}
],
"name": "com.google.heart_minutes"
},
"dataStreamName": "from_steps<-estimated_steps",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.heart_minutes:com.google.android.gms:from_steps<-estimated_steps",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "intensity",
"format": "floatPoint"
}
],
"name": "com.google.heart_minutes"
},
"dataStreamName": "merge_heart_minutes",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.heart_minutes:com.google.android.gms:merge_heart_minutes",
"type": "derived"
},
{
"dataStreamName": "soft_step_counter",
"dataType": {
"field": [
{
"name": "steps",
"format": "integer"
}
],
"name": "com.google.step_count.cumulative"
},
"dataQualityStandard": [],
"application": {
"packageName": "com.google.android.gms"
},
"device": {
"model": "SM-A600FN",
"version": "",
"type": "phone",
"uid": "324bd687",
"manufacturer": "samsung"
},
"dataStreamId": "derived:com.google.step_count.cumulative:com.google.android.gms:samsung:SM-A600FN:324bd687:soft_step_counter",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "steps",
"format": "integer"
}
],
"name": "com.google.step_count.delta"
},
"dataStreamName": "estimated_steps",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps",
"type": "derived"
},
{
"dataQualityStandard": [],
"dataType": {
"field": [
{
"name": "steps",
"format": "integer"
}
],
"name": "com.google.step_count.delta"
},
"dataStreamName": "merge_step_deltas",
"application": {
"packageName": "com.google.android.gms"
},
"dataStreamId": "derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas",
"type": "derived"
},
{
"dataStreamName": "derive_step_deltas<-derived:com.google.step_count.cumulative:com.google.android.gms:samsung:SM-A600FN:324bd687:soft_step_counter",
"dataType": {
"field": [
{
"name": "steps",
"format": "integer"
}
],
"name": "com.google.step_count.delta"
},
"dataQualityStandard": [],
"application": {
"packageName": "com.google.android.gms"
},
"device": {
"model": "SM-A600FN",
"version": "",
"type": "phone",
"uid": "324bd687",
"manufacturer": "samsung"
},
"dataStreamId": "derived:com.google.step_count.delta:com.google.android.gms:samsung:SM-A600FN:324bd687:derive_step_deltas<-derived:com.google.step_count.cumulative:com.google.android.gms:samsung:SM-A600FN:324bd687:soft_step_counter",
"type": "derived"
},
{
"name": "Generic ANT+ Sensor",
"dataStreamName": "AntPlus.0.124",
"dataType": {
"field": [
{
"name": "steps",
"format": "integer"
}
],
"name": "com.google.step_count.delta"
},
"dataQualityStandard": [],
"application": {
"packageName": "com.dsi.ant.plugins.antplus"
},
"dataStreamId": "raw:com.google.step_count.delta:com.dsi.ant.plugins.antplus:AntPlus.0.124",
"type": "raw"
}
]
}
On the day of May 2nd, the app shows something like 15000 steps (matched by the merge_step_deltas datasource) while requesting the steps from the estimated_steps datasource gets me about 7000 steps.
derived:com.google.step_count.delta:com.google.android.gms:estimated_steps
{
"bucket": [
{
"startTimeMillis": "1556748000000",
"endTimeMillis": "1556834400000",
"dataset": [
{
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:aggregated",
"point": [
{
"startTimeNanos": "1556748469517481594",
"originDataSourceId": "derived:com.google.step_count.cumulative:com.google.android.gms:samsung:SM-A600FN:4dc460aaeb28b288:soft_step_counter",
"endTimeNanos": "1556831065968126307",
"value": [
{
"mapVal": [],
"intVal": 7601
}
],
"dataTypeName": "com.google.step_count.delta"
}
]
}
]
}
]
}
derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas
{
"bucket": [
{
"startTimeMillis": "1556748000000",
"endTimeMillis": "1556834400000",
"dataset": [
{
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:aggregated",
"point": [
{
"startTimeNanos": "1556748469517481594",
"originDataSourceId": "derived:com.google.step_count.cumulative:com.google.android.gms:samsung:SM-A600FN:4dc460aaeb28b288:soft_step_counter",
"endTimeNanos": "1556831065968126307",
"value": [
{
"mapVal": [],
"intVal": 15368
}
],
"dataTypeName": "com.google.step_count.delta"
}
]
}
]
}
]
}

Cygnus subscription ngsi_version=2 not implemented

I install the followin docker image of cygnus this. And when i try to make a subscription like the tutorial example i got the following error:
POST /v1/subscriptions&ngsi_version=2 not implemented
This is my POST request:
{
"subscription":{
"description": "One subscription to rule them all",
"subject": {
"entities": [
{
"idPattern": ".*",
"type": "Room"
}
],
"condition": {
"attrs": [
"temperature"
],
"expression": {
"q": "temperature>40"
}
}
},
"notification": {
"http": {
"url": "http://localhost:5050"
},
"attrs": [
"temperature",
"humidity"
]
},
"duration": "P1M",
"throttling": 5
},
"endpoint":{
"host":"151.80.41.166",
"port":"50001",
"ssl":"false",
"xauthtoken":"QsENv67AJj7blC2qJ0YvfSc5hMWYrs"
}
}
How i can enable the ngsi_version 2?

I need receive the messages created in response texts in some intentions of the API.AI

My issue:
I have two responses, but my chat return only one specified "the speech", but i need that return the two, like do the console of api
example of response JSON from API:
{
"id": "XXXXXXXXXXX",
"timestamp": "2017-07-12T20:08:48.101Z",
"lang": "es",
"result": {
"source": "agent",
"resolvedQuery": "Hello how are you?",
"action": "",
"actionIncomplete": false,
"parameters": {},
"contexts": [
{
"name": "intent",
"parameters": {},
"lifespan": 1
}
],
"metadata": {
"intentId": "XXXXXXXXXXXXXXXXXXXXXXXX",
"webhookUsed": "false",
"webhookForSlotFillingUsed": "false",
"intentName": "welcome"
},
"fulfillment": {
"speech": "Hello!",
"messages": [
{
"type": 0,
"speech": "Hello!"
},
{
"type": 0,
"speech": "Bye!"
}
]
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": ""
}
I need show the black messages.