* Pi 2 Model B * Web, IOS * Can not add a servo as "Connectivity" "Channel" not working


#1

Thank you for taking the time to submit your bug/issue! Please use the points below as a guide when submitting.

  • Device & model you are using (Ex: Pi 2 Model B or Arduino Uno with W5100 ethernet shield)

  • What dashboard are you using? (Web, iOS, Android)

  • Please describe the bug / issue as detailed as possible. Attaching the code and any relevant screenshots would be very helpful!

Screenshot: http://joxi.ru/RmzxXNXh0jl1WA


#2

What are you using to control the PWM input on the servo? Which chip? I mean, the servo must have something to drive it- yes? Like https://www.adafruit.com/product/815


#3

Hi @Dykefman, welcome to the Cayenne Community.

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: https://mydevices.com/cayenne/docs/#supported-hardware-extensions


#4

Servos need PWM, not analog- :wink:
I’ve heard that the GPIO pins can possibly be used directly to modulate PWM, but I’m not sure.

Because of the Pi “overhead”, using PWM directly from the Pi GPIO results in unstable PWM (I’m told).


#5

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.


#6

#7

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.


#8

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.


#9

@rsiegel, thanks for agreeing, :slight_smile:
I had not seen that tutorial earlier.

I have not yet explored the “Bring your own thing”. Will do that later.

Meanwhile, do you mean the Pi agent is a legacy one and will be deprecated or something like?


#10

Just a little bit of my internal development speak leaking out :slight_smile:

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.


#11

Ok :slight_smile:
Thanks for the update @rsiegel.

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.


#12

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)


#13

No not same account. Each Pi has a separate account.