paulhoule / tentacruel

MIT License
0 stars 0 forks source link

Heos device id is not stable #35

Closed paulhoule closed 5 years ago

paulhoule commented 5 years ago

Yesterday the wake up application crashed because it couldn't find the HEOS 3 in the bedroom.

I didn't know how this id got assigned, if it could change, etc. I haven't observed a change until now, but it does change.

I am referring to the device via a name in the configuration file. I can interrogate the list of players and find them by any characteristic such as

here is the data available:

{
  "heos": {
    "command": "player/get_players",
    "result": "success",
    "message": ""
  },
  "payload": [
    {
      "name": "Bedroom",
      "pid": -1465756839,
      "gid": 706236690,
      "model": "HEOS 3",
      "version": "1.505.130",
      "ip": "192.168.0.37",
      "network": "wifi",
      "lineout": 0
    },
    {
      "name": "Kitchen",
      "pid": -874971210,
      "model": "HEOS HomeCinema",
      "version": "1.505.130",
      "ip": "192.168.0.33",
      "network": "wired",
      "lineout": 0
    },
    {
      "name": "Guest Room",
      "pid": 1963553040,
      "model": "HEOS 1",
      "version": "1.505.130",
      "ip": "192.168.0.16",
      "network": "wifi",
      "lineout": 0,
      "serial": "ACJG9180716504"
    },
    {
      "name": "Room 23",
      "pid": 706236690,
      "gid": 706236690,
      "model": "Denon AVR-S730H",
      "version": "1.505.130",
      "ip": "192.168.0.10",
      "network": "wired",
      "lineout": 0,
      "serial": "ALY12180244073"
    }
  ]
}

I am inclined to let somebody specify whatever fields they want in a name declaration -- if they pick something that is a bad idea, then that is their problem. We'll at least give a good error message.