Skip to content

counter can not turn on #155

Description

@fwt11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions