Data SharingDevice Data

Device Data Streaming

Provide a data API for Felt to integrate with

Spot Data context

let deviceData: [String: Any] = [
    ["timestamp": "2024-04-06T00:00:00Z", "temperature": 16],
    ["timestamp": "2024-04-06T01:00:00Z", "temperature": 15.5],
    ["timestamp": "2024-04-06T02:00:00Z", "temperature": 15],
    ["timestamp": "2024-04-06T23:00:00Z", "temperature": 15.5]
]
 
extension Portal {
 
  static let checkout = Self(
      name: "checkout",
      startDir: "portals/shopwebapp",
      initialContext: [
        // ...
        "deviceMetadata": JSONSerialization.data(withJsonObject: deviceData)
      ],
  )
 
}