This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to correctly specify custom mesh model ID in Interactive PyACI commands

I have some custom models in my mesh application in addition to SIG standard models.  As can be seen with interactive_pyaci script when i read the composition data of my device, my custom model IDs are 0x03300001, 0x03300002, 0x03300003, and 0x03300004 (where 0x0330 is my company ID) in the second and third elements in my device.

{
  "pid": "cafe",
  "crpl": 40,
  "features": {
    "friend": 2,
    "low_power": 2,
    "relay": 0,
    "proxy": 2
  },
  "cid": "0330",
  "vid": "0000",
  "elements": [
    {
      "models": [
        {
          "modelId": "0000"
        },
        {
          "modelId": "0002"
        }
      ],
      "location": "0000",
      "index": 0
    },
    {
      "models": [
        {
          "modelId": "03300001"
        },
        {
          "modelId": "03300002"
        },
        {
          "modelId": "03300004"
        }
      ],
      "location": "0000",
      "index": 1
    },
    {
      "models": [
        {
          "modelId": "1000"
        },
        {
          "modelId": "03300003"
        }
      ],
      "location": "0000",
      "index": 2
    }
  ]
}

The issue I'm having is how to specify the custom model ID in the pyACI commands?

The following 3 cases fail:

In [12]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0001, 0x0330))
2019-09-30 14:02:08,854 - INFO - COM19.ConfigurationClient: blocked = 0, timeout = 10

2019-09-30 14:02:08,861 - INFO - COM19: PacketSend: {'token': 3}
In [13]: 2019-09-30 14:02:08,909 - INFO - COM19: {event: MeshTxComplete, data: {'token': 3}}

In [13]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0330, 0x0001))
2019-09-30 14:05:18,933 - INFO - COM19.ConfigurationClient: blocked = 0, timeout = 10

In [14]: 2019-09-30 14:05:18,949 - INFO - COM19: PacketSend: {'token': 4}
2019-09-30 14:05:18,996 - INFO - COM19: {event: MeshTxComplete, data: {'token': 4}}

In [14]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0001))
2019-09-30 14:15:58,464 - INFO - COM19.ConfigurationClient: blocked = 0, timeout = 10

2019-09-30 14:15:58,473 - INFO - COM19: PacketSend: {'token': 5}
In [15]: 2019-09-30 14:15:58,504 - INFO - COM19: {event: MeshTxComplete, data: {'token': 5}}
2019-09-30 14:15:58,536 - INFO - COM19.ConfigurationClient: Model app bind status: AccessStatus.INVALID_MODEL

Related