To expand on what Bill was saying below, the Raspberry Pi doesnât have any Analog pins, so you need to add some sort of a chip or expansion to your Pi, and then to your Cayenne account. Then you can select that extension from the âConnectivityâ menu in Cayenne.
You can see a full list of our supported extensions here: Cayenne Docs
Good call, disregard what Iâve said about analog pins with regard to servos specifically. But if anyone finds this thread in the future and is wondering why the âConnectivityâ menu is greyed out, it means weâre expecting some sort of expansion to drive the hardware youâre adding, since the Pi canât do it alone.
As far as software PWM on Raspberry Pi, I know people have accomplished this with the Pi in general (perhaps with unstable results as you mention) and you can find plenty about it if you do a Google search. However Iâve confirmed with the our developers that this sort of software PWM is not compatible with Cayenne at the moment.
Hi, Probably I am just digging up the grave for this old issue. But a suggestion - Please add somewhere an information that servo actuator needs PWM functionality so canât be activated with Cayenne unless some extension is used.
I also spend time debugging why the âAdd actuatorâ is greyed out and then after a while landed on this page. The docs also do not hint about need of extension.
This is just a request / suggestion.
Thanks,
p.s.: It is quite a simple code in Raspberry Pi to enable PWM on any GPIO pin so on a physical Pi, it is a trivial task to interface and control a servo motor though.
Hi @gopal.amlekar, this is where we have it mentioned in the documentation, but agreed that it could be more discoverable, or clear why the âConnectivityâ menu was greyed in the actual Cayenne UI.
Iâm glad that you bumped this old thread though â if you have code that will enable PWM/control a servo motor without the need for this extension, I donât see why you couldnât connect your device using the âBring Your Own Thingâ/MQTT API option instead of the Raspberry Pi option in Cayenne, then integrate that code into your Cayenne client so you can use our actuator widgets to interact with it this way. This should work around whatever incompatibility the software PWM had with our legacy Pi agent.
Here is in an example where I use the MQTT API to execute arbitrary code on a Raspberry PI. In this example Iâm just running a Python script to print some text, but the same concept should allow you to run any code in the context of a Cayenne actuator widget state change.
Just a little bit of my internal development speak leaking out
We call it the âlegacyâ Pi agent because at a point in Cayenne development there was no Bring Your Own Thing option so it was the only way to connect a Pi to Cayenne. It talks to an old server so we call it legacy internally. Weâll be updating it to talk to the new server in the near future but this will be transparent to the end-user.
Reason I had asked about whether it was being phased out is, many times I get stuck with Cayenne dashboard. It just doesnât refresh or the process of installing a script on Raspberry pi and then getting data from the pi takes almost half an hour or more. Sometimes when I get the dashboard, then adding a widget like a button or light takes so long that I quit. And no, it is not the connectivity issue. I have good speed and also have tried changing the access points, locations and all such variables. This happens especially when I am taking a class of 20 students or so. In that case, I just ask only one or two groups to work on Cayenne and the rest on something else. This sometimes solves the problem but still not up to the expectations.
I thought that it may be the cause that the agent is running on an old server.
Could I ask if you have 20+ Raspberry PI devices on the same Cayenne account?
We are aware of an issue where if many Raspberry Pi and Arduino devices are on the same Cayenne account, each will open a websocket and can cause browser slowdown. I should be clear that this does NOT effect Pi and Arduino devices connected through the âBring Your Own Thingâ/MQTT option.
This issue should improve when we update the agent to interact with the new server (which uses MQTT communication under the hood)