Hi Nayelyz,
I’ve prettyfied the raw string body that is received by my application when an EVENT is posted. I’ve only edited it to remove the authToken, as you see in the event array, the eventTime
has come in as epoch time.
{
"lifecycle": "EVENT",
"executionId": "78f66103-9a5d-47fd-9e28-e01b1d829268",
"appId": "0a92b599-c115-4e2f-a054-751cb832eeb5",
"locale": "en-US",
"version": "0.1.0",
"eventData": {
"authToken": "<omitted>",
"installedApp": {
"installedAppId": "049efe7d-957b-462d-ab0b-0c194de72116",
"locationId": "1c714c4b-78b2-4fa8-b1f3-3e1d51c9e59c",
"config": {
"GAS_METER_SENSOR": [
{
"valueType": "DEVICE",
"deviceConfig": {
"deviceId": "14819e9a-76b9-4fd2-81bc-f4ab6bedf7db",
"componentId": "main"
}
}
],
"ELECTRICITY_METER_SENSOR": [
{
"valueType": "DEVICE",
"deviceConfig": {
"deviceId": "57a8e06e-d727-4bd3-a8b3-9d2b8ae9d101",
"componentId": "main"
}
}
],
"homeId": [
{
"valueType": "STRING",
"stringConfig": {
"value": "9999999"
}
}
]
},
"permissions": [
"x:devices:14819e9a-76b9-4fd2-81bc-f4ab6bedf7db",
"r:locations:*",
"x:devices:*",
"r:devices:14819e9a-76b9-4fd2-81bc-f4ab6bedf7db",
"x:devices:57a8e06e-d727-4bd3-a8b3-9d2b8ae9d101",
"r:devices:*",
"w:devices:*",
"w:devices:14819e9a-76b9-4fd2-81bc-f4ab6bedf7db",
"i:deviceprofiles:*",
"w:devices:57a8e06e-d727-4bd3-a8b3-9d2b8ae9d101",
"r:devices:57a8e06e-d727-4bd3-a8b3-9d2b8ae9d101"
]
},
"events": [
{
"eventTime": "1970-01-01T00:00:00Z",
"eventType": "DEVICE_EVENT",
"deviceEvent": {
"eventId": "60dc7aef-7790-11eb-a0bc-ad962ae6f373",
"locationId": "1c714c4b-78b2-4fa8-b1f3-3e1d51c9e59c",
"ownerId": "1c714c4b-78b2-4fa8-b1f3-3e1d51c9e59c",
"ownerType": "LOCATION",
"deviceId": "57a8e06e-d727-4bd3-a8b3-9d2b8ae9d101",
"componentId": "main",
"capability": "energyMeter",
"attribute": "energy",
"value": 0.038,
"valueType": "string",
"stateChange": true,
"data": {},
"subscriptionName": "a2e4669f-41cf-4df8-9f0a-7fd0fea154bd"
}
}
]
},
"settings": {}
}