tim-hellhake / sonos-adapter

Sonos adapter for the Mozilla IoT Gateway / Web Things Adapter
MIT License
9 stars 5 forks source link

Device description is broken on Gateway 1.0.0 #18

Closed mrstegeman closed 4 years ago

mrstegeman commented 4 years ago
2020-11-30 09:05:59.445 ERROR  : Invalid message received: {
  "messageType": 8192,
  "data": {
    "adapterId": "SonosAdapter",
    "device": {
      "id": "78-28-CA-FA-56-C0:G",
      "title": "Kitchen",
      "@context": "https://webthings.io/schemas",
      "@type": [],
      "description": "",
      "properties": {
        "volume": {
          "name": "volume",
          "value": 15,
          "visible": true,
          "title": "Volume",
          "type": "integer",
          "@type": "LevelProperty",
          "unit": "percent",
          "links": []
        },
        "playing": {
          "name": "playing",
          "value": false,
          "visible": true,
          "title": "Playing",
          "type": "boolean",
          "@type": "BooleanProperty",
          "links": []
        },
        "shuffle": {
          "name": "shuffle",
          "value": false,
          "visible": true,
          "title": "Shuffle",
          "type": "boolean",
          "@type": "BooleanProperty",
          "links": []
        },
        "repeat": {
          "name": "repeat",
          "value": "None",
          "visible": true,
          "title": "Repeat",
          "type": "string",
          "@type": "EnumProperty",
          "enum": [
            "None",
            "One",
            "All"
          ],
          "links": []
        },
        "crossfade": {
          "name": "crossfade",
          "value": true,
          "visible": true,
          "title": "Crossfade",
          "type": "boolean",
          "@type": "BooleanProperty",
          "links": []
        },
        "track": {
          "name": "track",
          "visible": true,
          "title": "Track",
          "type": "string",
          "@type": "StringProperty",
          "readOnly": true,
          "links": []
        },
        "album": {
          "name": "album",
          "visible": true,
          "title": "Album",
          "type": "string",
          "@type": "StringProperty",
          "readOnly": true,
          "links": []
        },
        "artist": {
          "name": "artist",
          "visible": true,
          "title": "Artist",
          "type": "string",
          "@type": "StringProperty",
          "readOnly": true,
          "links": []
        },
        "progress": {
          "name": "progress",
          "value": 0,
          "visible": true,
          "title": "Progress",
          "type": "number",
          "@type": "LevelProperty",
          "links": []
        },
        "albumArt": {
          "name": "albumArt",
          "visible": true,
          "title": "Album art",
          "@type": "ImageProperty",
          "readOnly": true,
          "links": [
            {
              "mediaType": "image/png",
              "href": "/media/sonos/78-28-CA-FA-56-C0:G/album.png",
              "rel": "alternate"
            }
          ]
        },
        "muted": {
          "name": "muted",
          "value": false,
          "visible": true,
          "title": "Muted",
          "type": "boolean",
          "@type": "BooleanProperty",
          "links": []
        }
      },
      "actions": {
        "next": {
          "title": "Next",
          "description": "Skip current track and start playing next track in the queue"
        },
        "prev": {
          "title": "Previous",
          "description": "Play previous track in the queue"
        },
        "stop": {
          "title": "Stop",
          "description": "Stop current playback"
        },
        "playUri": {
          "title": "Play URI",
          "description": "Play the music from the given URI",
          "input": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string"
              }
            }
          }
        },
        "group": {
          "title": "Group/Ungroup",
          "description": "Group Sonos players",
          "input": {
            "type": "object",
            "required": [
              "Bel’s Room",
              "Loft"
            ],
            "properties": {
              "Bel’s Room": {
                "type": "boolean",
                "default": false
              },
              "Loft": {
                "type": "boolean",
                "default": false
              }
            }
          }
        }
      },
      "events": {},
      "links": [],
      "pin": {
        "required": false
      },
      "credentialsRequired": false
    },
    "pluginId": "sonos-adapter"
  }
}
2020-11-30 09:05:59.445 ERROR  : Validation error: [
  {
    "keyword": "required",
    "dataPath": ".data.device.properties['albumArt']",
    "schemaPath": "#/required",
    "params": {
      "missingProperty": "type"
    },
    "message": "should have required property 'type'"
  }
]