examples
examples copied to clipboard
counter can not turn on
After i created device model and device instance for counter, I got this with kubectl get device counter -ojson
"apiVersion": "devices.kubeedge.io/v1beta1",
"kind": "Device",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"devices.kubeedge.io/v1alpha2\",\"kind\":\"Device\",\"metadata\":{\"annotations\":{},\"labels\":{\"description\":\"counter\"},\"name\":\"counter\",\"namespace\":\"default\"},\"spec\":{\"deviceModelRef\":{\"name\":\"counter-model\"},\"nodeSelector\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"kubernetes.io/hostname\",\"operator\":\"In\",\"values\":[\"vm-68-m\"]}]}]}},\"status\":{\"twins\":[{\"desired\":{\"metadata\":{\"type\":\"string\"},\"value\":\"ON\"},\"propertyName\":\"status\",\"reported\":{\"metadata\":{\"type\":\"string\"},\"value\":\"0\"}}]}}\n"
},
"creationTimestamp": "2023-12-27T09:29:46Z",
"generation": 1,
"labels": {
"description": "counter"
},
"name": "counter",
"namespace": "default",
"resourceVersion": "642280",
"uid": "7f24f748-115f-4e19-b253-0b970ac62649"
},
"spec": {
"deviceModelRef": {
"name": "counter-model"
}
},
"status": {
"twins": [
{
"propertyName": "status",
"reported": {
"metadata": {
"type": "string"
},
"value": "0"
}
}
]
}
}
there is no
metadata:
type: string
value: 'OFF'` # or `ON`
and the thus the counter can not be ON.
There is nothing output from the kubeedge-pi-counter app on the edge node.
I also have the same problem, my kubeedge-pi-counter does not print a single log line, while kubeedge-web-controller works fine