问题
I've registered my Raspberry Pi device with Cumulocity. Now I just wanted to switch on/off LED which is connected with Pi through Cumulocity.
Is it possible and if so how to proceed?
回答1:
I would propose to use the operation c8y_Relay (http://cumulocity.com/guides/reference/sensor-library/) because it is basically this on(off logic and there are already widgets in the UI to trigger the operation (Can be added to dashboards).
On the device side you would first need to add c8y_Relay to the supportedOperations and then implement an OperationExecutor that will handle the operation and switch the LED (assuming you are using the agent from the example repository)
来源:https://stackoverflow.com/questions/40630006/connecting-raspberry-pi-with-cumulocity