crownstone / crownstone-cloud

Crownstone Cloud Service. Particular parts of Crownstone data (depending on user preferences) can be stored online. This makes it possible to remotely control devices, share your presence with friends, or store energy consumption over time.
https://cloud.crownstone.rocks/
Apache License 2.0
4 stars 6 forks source link

Ability update generates 2 SSE events #22

Open RicArch97 opened 3 years ago

RicArch97 commented 3 years ago

Updating an ability from the app pushes out 2 AbilityChangeEvents instead of 1.

11/7/2020, 9:43:50 PM: 
{
  "type": "abilityChange",
  "subType": "dimming",
  "sphere": {
    "id": "5e417718f3df8400042cbec5",
    "name": "House",
    "uid": 84
  },
  "stone": {
    "id": "5eac1ea83cd5450004739456",
    "uid": 7,
    "name": "Airco",
    "macAddress": "mac"
  },
  "ability": {
    "type": "dimming",
    "enabled": true,
    "syncedToCrownstone": true
  }
}

11/7/2020, 9:43:50 PM: 
{
  "type": "abilityChange",
  "subType": "dimming",
  "sphere": {
    "id": "5e417718f3df8400042cbec5",
    "name": "House",
    "uid": 84
  },
  "stone": {
    "id": "5eac1ea83cd5450004739456",
    "uid": 7,
    "name": "Airco",
    "macAddress": "mac"
  },
  "ability": {
    "type": "dimming",
    "enabled": true,
    "syncedToCrownstone": true
  }
}

11/7/2020, 9:43:39 PM: 
{
  "type": "system",
  "subType": "STREAM_START",
  "code": 200,
  "message": "Stream Starting."
}

Ready! Messages will come in as events are triggered!