以累积性连接Raspberry Pi [英] Connecting Raspberry Pi with cumulocity

查看:102
本文介绍了以累积性连接Raspberry Pi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用Cumulocity注册了Raspberry Pi设备. 现在我只想打开/关闭通过Cumulocity与Pi连接的LED.

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?

推荐答案

我建议使用c8y_Relay操作( http://cumulocity.com/guides/reference/sensor-library/),因为基本上就是这种开(关逻辑,并且UI中已经有小部件可以触发操作(可以是添加到仪表板).

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).

在设备端,您首先需要将c8y_Relay添加到supportedOperations,然后实现一个OperationExecutor来处理该操作并切换LED(假设您正在使用示例存储库中的代理)

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)

这篇关于以累积性连接Raspberry Pi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆