GPIO dashboard

Hi,
maybe I can understand something but after installation Cayenne I dont see my gpio in dashboard
I turn gpio remote control in raspi-config, but nothing happens
Please help with this problem

Hi @hypnojesus, welcome to the Cayenne Community!

Could you post your output from the command uname -a ? I think this could be because you are running a Linux kernel on the pi newer than 4.4. Currently we support what is in Raspbian Jessie and Jessie Lite, the 4.4 kernel, and are aware of issues with the 4.9 kernel.

1 Like

You actually rigth,
Linux raspberrypi 4.9.16-v7+ #978 SMP Sat Mar 18 13:59:01 GMT 2017 armv7l GNU/Linux
I just downgrade kernel on 4.4.50 and you now my problem completely solved
Thank you so much

1 Like

Hi, I have the same issue (no GPIO dashboard, itā€™s empty):

root@raspholepi:~# uname -a
Linux raspholepi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux

PS) I donā€™t understand in the previous description by hypnojesus ā€œI turn gpio remote control in raspi-configā€ ā€¦ I donā€™t see any option to enable it.

Thanks in advance.

hi @gianluca.torriglia

he meant ā€œRaspberry Pi Configurationā€, you can access through the Menu

Hi thanks,

I understood I donā€™t have this menu on my version but I installed it and itā€™s running (netstat -lnput):

tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 4192/pigpiod

ā€¦ but unlikely the GPIO dashboard is empty.

Is there any command to debug my situation?

Thanks in advance.

Gianluca

Hi @gianluca.torriglia,

This looks to me like you might have the opposite version ā€“ a very old kernel? Iā€™m used to seeing the 4.4 Linux kernel on Piā€™s running Raspbian Jessie. Could you run:

cat /etc/os-release

to see what version of Raspbian youā€™re running? The Cayenne Pi Agent currently supports Raspbian Jessie and Jessie Lite, though if youā€™re tied to some other OS, perhaps the Cayenne Linux Agent or a Python MQTT Client would be other options to explore for connecting your device to Cayenne.

I have this same problem. I canā€™t seem to do anything related to GPIO.

If I create a Generic Device on GPIO 17 (pin 11), yet it doesnā€™t show up on the left side when created.

pi@RPI-Generator:~ $ uname -a
Linux RPI-Generator 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux
pi@RPI-Generator:~ $ cat /etc/os-release
PRETTY_NAME=ā€œRaspbian GNU/Linux 8 (jessie)ā€
NAME=ā€œRaspbian GNU/Linuxā€
VERSION_ID=ā€œ8ā€
VERSION=ā€œ8 (jessie)ā€
ID=raspbian
ID_LIKE=debian

pi@RPI-Generator:~ $

This is a clean build. Am I missing something obvious, or is this a bug or limitation?

The Icon is created, but is missing on the left side, so you canā€™t drag anything in to create a trigger. Also, when you look at the GPIO page, you donā€™t see that port as an input or output.

Mike

Hi Rsiegel,

I have an older version (Raspbian GNU/Linux 7 (wheezy)), Iā€™ve tried with another SD card with Jessie onboard and I confirm it works.

Iā€™ll check if Cayenne Linux Agent can work on my Wheezy version as suggested.

Thanks for the support.

GL

1 Like

Hi @mike7 and welcome to the Cayenne Community.

The issue is that webiopi, a component of the Cayenne Pi software, is not yet compatible with the 4.9 Linux Kernel. There are a few options to resolve this until we push an update with support for this kernel:

If you have no specific need for the 4.9 kernel on your Pi (most people would not), you can downgrade to 4.4 by running this command (it will require a reboot after it runs)

sudo rpi-update 52241088c1da59a359110d39c1875cda56496764

After youā€™re running 4.4 again the problems youā€™ve described should automatically go away.

If you do need the 4.9 kernel or donā€™t want to downgrade, you can try a beta of the new agent weā€™re testing resolve this issue, and a number of others. Just be aware this is beta software and you may encounter bugs (please let us know if you go this route, and do have trouble)

To try it out:

First get the test agent install script:
wget http://updates.mydevices.com/raspberry/rpi_testing.sh

If updating an existing install run:
sudo bash rpi_testing.sh -update

If this is a new install get the invite code from adding a new Raspberry Pi via the Cayenne Dashboard. The invite code is part of the install file name listed in the Terminal/SSH instructions: rpi_[invitecode].sh.
Run the rpi_testing.sh script with this invite code:
sudo bash rpi_testing.sh -code [invite code]

Thanks

I downgraded the firmware and that solved it. I should have asked about 4 hours earlier. :slight_smile:
Mike

1 Like

Glad it worked. Sorry for the trouble, itā€™s a bit of a frustrating one if you donā€™t know what youā€™re looking for.

Hi,

Thanks for sharing the test agent script. I tried it with Linux Kernel 4.9 and I confirm that I can control the GPIO pins from the web interface on my laptop. However, the pins still cannot be controlled through the Cayenne app on my iphone. Is there a way to make this work as well?

All the best,

David

@rsiegel can confirm, but Iā€™m pretty sure the test agent uses MQTT for communication which means the iPhone and Android apps will not work correctly until the test agent is officially pushed out.

@salekd @mike7 @gianluca.torriglia @tiendle @hypnojesus We have just released an updated Cayenne Pi agent version that includes the fix for 4.9 Linux kernel. It can be downloaded by installing a new Raspberry Pi through the Cayenne add device process.

We will be updating all existing Pi agents w/ this fix very soon, so you may prefer to wait until we roll out the fix. Either way, Iā€™m hoping that you will be able to confirm our fix is working :slight_smile:

~Benny

Just bumping one more time to note that the existing agent auto-update has been released as well. Itā€™s totally a silent update, so there would not be any indication on the user side. Feel free to use rpi-update to move forward to the 4.9 kernel at this point if youā€™d like!

@salekd Iā€™d be interested to hear if this new agent is allowing you to manipulate the pins via the iOS app, and if not, if you could share a bit more information on what exactly youā€™re trying to do in the app that isnā€™t working.

Hi @rsiegel and @bestes,

Thanks for mentioning rpi-update, I used it to move from kernel 4.9.35 to 4.9.54 which, as I understand, includes the new Cayenne Pi agent. However, I still cannot control the pins through the GPIO section of the iPhone Cayenne app.

I have also defined a button in the dashboard, connected to one of the output GPIO pins. I can switch this button on and off from my iPhone (I was not able to do even this before), but nothing happens in reality. From this I conclude that the new firmware still does not fix the problem. Or did I miss any important step in the firmware update?

Cheers,

David

Hi @salekd,

Basically our new agent version should have come down the pipe automatically. The goal was to fix an incompatibility with the 4.9.x Linux kernel in general. You can check if you have the newest update with the command curl http://127.0.0.1:8000/version. The old version is 0.7.22, new one is 0.7.23.

That being said, Iā€™m not aware of any incompatibilities between different sub-versions of 4.9. After seeing your post, I tested with 4.9.41 and 4.9.56 (just what my Pi was on, and what rpi-update updated it to without demanding something specific), and in both cases I was able to control a LED with both the GPIO tab, and a button widget, with both iOS and web browser Cayenne.

If you do have that newest agent version, the next thing Iā€™d test is if youā€™re able to turn on and off the pin outside the context of Cayenne, with something like a Python script. Let me know if you need help finding one to do this. It would also be a good sanity check of your wiring to make sure thatā€™s not the issue here. Might be worth trying on a different pin as there are a few that have reserved uses that could be causing an issue as well (which pin are you having trouble with?)

Hi @rsiegel,

Thanks for testing this. As I said previously, controlling GPIO pins through Cayenne in a web browser on my laptop works for me. It is only the iPhone app that doesnā€™t work. Following your suggestion, I tried testing the version by doing curl http://127.0.0.1:8000/version on my Raspberry Pi Zero and I got the following error:

curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused

Can this be part of the problem?

Cheers,

David