# kubectl apply -f bluetooth-CC2650-demo/sample-crds/CC2650-device-model.yaml
The DeviceModel "cc2650-sensortag" is invalid: []: Invalid value: map[string]interface {}{"apiVersion":"devices.kubeedge.io/v1alpha1", "kind":"DeviceModel", "metadata":map[string]interface {}{"annotations":map[string]interface {}{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"devices.kubeedge.io/v1alpha1\",\"kind\":\"DeviceModel\",\"metadata\":{\"annotations\":{},\"name\":\"cc2650-sensortag\",\"namespace\":\"default\"},\"spec\":{\"properties\":[{\"description\":\"temperature in degree celsius\",\"name\":\"temperature\",\"type\":{\"int\":{\"accessMode\":\"Read\",\"maximum\":100,\"unit\":\"degree celsius\"}}},{\"description\":\"enable data collection of temperature sensor\",\"name\":\"temperature-enable\",\"type\":{\"string\":{\"accessMode\":\"ReadWrite\",\"defaultValue\":\"ON\"}}},{\"description\":\"initialize io-config with value 0\",\"name\":\"io-config-initialize\",\"type\":{\"int\":{\"accessMode\":\"ReadWrite\",\"defaultValue\":0}}},{\"description\":\"initialize io-data with value 0\",\"name\":\"io-data-initialize\",\"type\":{\"int\":{\"accessMode\":\"ReadWrite\",\"defaultValue\":0}}},{\"description\":\"register activation of io-config\",\"name\":\"io-config\",\"type\":{\"int\":{\"accessMode\":\"ReadWrite\",\"defaultValue\":1}}},{\"description\":\"data field to control io-control\",\"name\":\"io-data\",\"type\":{\"int\":{\"accessMode\":\"ReadWrite\",\"defaultValue\":0}}}],\"propertyVisitors\":[{\"bluetooth\":{\"characteristicUUID\":\"f000aa0104514000b000000000000000\",\"dataConverter\":{\"endIndex\":0,\"orderOfOperations\":[{\"operationType\":\"Multiply\",\"operationValue\":0.03125}],\"shiftRight\":2,\"startIndex\":1}},\"propertyName\":\"temperature\"},{\"bluetooth\":{\"characteristicUUID\":\"f000aa0204514000b000000000000000\",\"dataWrite\":{\"OFF\":[0],\"ON\":[1]}},\"propertyName\":\"temperature-enable\"},{\"bluetooth\":{\"characteristicUUID\":\"f000aa6604514000b000000000000000\"},\"propertyName\":\"io-config-initialize\"},{\"bluetooth\":{\"characteristicUUID\":\"f000aa6504514000b000000000000000\"},\"propertyName\":\"io-data-initialize\"},{\"bluetooth\":{\"characteristicUUID\":\"f000aa6604514000b000000000000000\"},\"propertyName\":\"io-config\"},{\"bluetooth\":{\"characteristicUUID\":\"f000aa6504514000b000000000000000\",\"dataWrite\":{\"Buzzer\":[4],\"BuzzerGreen\":[6],\"BuzzerRed\":[5],\"BuzzerRedGreen\":[7],\"Green\":[2],\"Red\":[1],\"RedGreen\":[3]}},\"propertyName\":\"io-data\"}]}}\n"}, "creationTimestamp":"2020-08-12T06:57:51Z", "generation":2, "name":"cc2650-sensortag", "namespace":"default", "resourceVersion":"4035873", "uid":"23b5a33b-dc69-11ea-8b40-fa163e94a3da"}, "spec":map[string]interface {}{"properties":[]interface {}{map[string]interface {}{"description":"temperature in degree celsius", "name":"temperature", "type":map[string]interface {}{"int":map[string]interface {}{"accessMode":"Read", "maximum":100, "unit":"degree celsius"}}}, map[string]interface {}{"description":"enable data collection of temperature sensor", "name":"temperature-enable", "type":map[string]interface {}{"string":map[string]interface {}{"accessMode":"ReadWrite", "defaultValue":"ON"}}}, map[string]interface {}{"description":"initialize io-config with value 0", "name":"io-config-initialize", "type":map[string]interface {}{"int":map[string]interface {}{"accessMode":"ReadWrite", "defaultValue":0}}}, map[string]interface {}{"description":"initialize io-data with value 0", "name":"io-data-initialize", "type":map[string]interface {}{"int":map[string]interface {}{"accessMode":"ReadWrite", "defaultValue":0}}}, map[string]interface {}{"description":"register activation of io-config", "name":"io-config", "type":map[string]interface {}{"int":map[string]interface {}{"accessMode":"ReadWrite", "defaultValue":1}}}, map[string]interface {}{"description":"data field to control io-control", "name":"io-data", "type":map[string]interface {}{"int":map[string]interface {}{"accessMode":"ReadWrite", "defaultValue":0}}}}, "propertyVisitors":[]interface {}{map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa0104514000b000000000000000", "dataConverter":map[string]interface {}{"endIndex":0, "orderOfOperations":[]interface {}{map[string]interface {}{"operationType":"Multiply", "operationValue":0.03125}}, "shiftRight":2, "startIndex":1}}, "propertyName":"temperature"}, map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa0204514000b000000000000000", "dataWrite":map[string]interface {}{"OFF":[]interface {}{0}, "ON":[]interface {}{1}}}, "propertyName":"temperature-enable"}, map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa6604514000b000000000000000"}, "propertyName":"io-config-initialize"}, map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa6504514000b000000000000000"}, "propertyName":"io-data-initialize"}, map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa6604514000b000000000000000"}, "propertyName":"io-config"}, map[string]interface {}{"bluetooth":map[string]interface {}{"characteristicUUID":"f000aa6504514000b000000000000000", "dataWrite":map[string]interface {}{"Buzzer":[]interface {}{4}, "BuzzerGreen":[]interface {}{6}, "BuzzerRed":[]interface {}{5}, "BuzzerRedGreen":[]interface {}{7}, "Green":[]interface {}{2}, "Red":[]interface {}{1}, "RedGreen":[]interface {}{3}}}, "propertyName":"io-data"}}}}: validation failure list:
spec.properties.type.int.accessMode in body should be one of [ReadOnly ReadWrite]