-->

Connecting Raspberry Pi with cumulocity

2019-09-07 13:38发布

问题:

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)



标签: cumulocity