examples icon indicating copy to clipboard operation
examples copied to clipboard

counter can not turn on

Open fwt11 opened this issue 2 years ago • 1 comments

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.

fwt11 avatar Dec 27 '23 09:12 fwt11

I also have the same problem, my kubeedge-pi-counter does not print a single log line, while kubeedge-web-controller works fine

hkm15022001 avatar Nov 27 '24 16:11 hkm15022001