I cannot get cayenne to communicate with my Pi 3. Currently have Raspbian installed on a 32-gb SD. Have performed the wget and the install of the cayenne software multiple times from the pi user using sudo; it always installs good, no errors. ps -ef shows running processes (webiopi and python3 running myDevices). When I log into Cayenne, it sets up for a new project; I select Raspberry Pi; it says to install the software on the pi (already done that!) and then it just sits there, never connects to the device. I went through all the debugging stages, checked the network config; can see the cloud and can telnet to port 8181. Made sure my device ID in the install log matches that in the configuration file. Tried connecting directly to the device using that device ID specified in my browser. Can use VNC to talk to the unit. Am using Firefox on Windows 7. Not blocking any popups. On my iPhone, I installed the app, it sees my device and IP; but when I enter in the pi user and password and set for ssh, it never connects there either. Pi is configured so all hardware devices are enabled.
Hi @jemsiway, welcome to the Cayenne Community!
Can I ask if you got the
wget line from the Add New Pi process while logged into your account?
The reason I ask is that there are custom invite codes that are appended to each installer so they know which account to attach to when install finishes and they phone back to our server. It sounds like this could be a case where your current installed version of Cayenne (on the pi) has an invalid/expired invite code and thus isn’t connecting to your account even though it does have an unrestricted internet connection.
What I’d try is:
First uninstall the existing Cayenne install from your Pi using these two commands:
Log back into the web dashboard at https://cayenne.mydevices.com/cayenne/login
If you have any Pending Pi installs (they’d show up as grey and offline), please ignore them for a moment, we can clean them up later. Create a new Pi install by going to Add New > Device Widget > Single Board Computers > Raspberry Pi. This will give you a fresh set of commands with a fresh invite code in the ‘Option 2’ area.
Run those commands to get and run the new installer. Leave your web browser open. After the pi reboots, it should advance to a connected state where you’ll see some default widgets on that Pi’s dashboard for things like CPU/RAM/Storage etc. If it does not, then there is something deeper at play here, and let me know so I can continue to help you troubleshoot.
Thanks, will try this tonight. One other thing I thought of; I saw the specific key mentioned in the log, and the debugging steps I followed earlier said to make sure that the key in the log file matches the key in the config file under /etc (it did). But maybe the problem is that my pi key is different from that which is currently registered against my cayenne account on the cloud server. This could explain why I cannot connect with either my Windows PC or my iPhone. Possible, since I was having problems from the beginning and I actually re-installed the product several times (I started out with an 8gb SD card and ended up re-deploying on a 32gb SD because I had run out of room due to other stuff I have on it). Your tjhoughts? I can reply tonight with the specific key number I have if that will help.
You lost me on Step 3; I don’t see Add New, but I did get Choose a device, and I followed that. Since I had previously already installed the software I was ignoring the two command lines (the wget and the install) thinking I had already done that, and had not picked up on the fact that these commands include a device-specific text string as part of the name of the software being installed. Additionally, after I installed the software, I didn’t see any action taking place on the web page on the Windows side. Getting impatient I guess. Suggestion - please improve documentation to tell people what to do AFTER they install the software on the Pi side. They need to wait long enough for it to reboot and for the cloud to connect in. I was not doing that… I’m re-installing now; it will reboot soon so I will close this before I lose the window… Will let you know if it worked.
That fixed it, thanks! So in retrospect, I think the documentation could be improved a bit, especially in two areas:
- When you display the two commands used to install the software on the Pi (or whatever remote device you have, Arduino etc…), this should emphasize that the name of the file to wget is specific to that cayenne web page cloud server connection, and that previously installed bits using a previous web page cloud connection will not work. In fact, if you have previously installed the software and are re-installing it, then you should un-install it first and then use the commands shown with the very specific file name to install. (and provide a link for un-install process).
2 Currently the web page tells you to issue the wget download and install instructions on the remote device (Pi in my case). But then it doesn’t say anything else. My reaction was OK, now what? It should say something on the web page about needing to keep the page active, do not leave the page etc. and wait till the software installs on the remote device and it reboots, then syncs up with the cloud. This can take several minutes. I was left with the feeling that nothing was happening, closed the web page, re-entered it (which provided me with a new wget filename but I didn’t catch that - after all, I had already installed the software so I could “ignore” that step!
BTW, you’re probably thinking how dumb can this guy be. All I can tell you is that I have over 30 years as a Unix Systems Administrator under my belt. I’m not a total ignoramus. But quite frankly, the poor documentation especially during the initial install phase of the software left me hanging in the breeze. Now I’m sure I’ll get flamed here as a total idiot but that’s life. We all make mistakes. Again, thanks for the prompt reply and accurate diagnosis of what was probably wrong and how to fix it.
We’re all down to earth people here, so that won’t happen. Cayenne was made for people with little coding skills, so there are people here with all ranges of expertise.
As far as your points there, I can’t say I agree with everything but then again I’ve been using Cayenne for over a year so maybe I’m just used to it? I have some questions below to see if there is anything in the docs that can be improved.
I agree it should probably have a note that this command will only work for 1 Pi and any additional Pi’s will need to be added through add new>device which will generate another unique installer. Also note that you can install over a previous install without issue and all your widgets will be transferred over to the new Pi on the dashboard (this is not documented). The best option, as with any software, is to do what you said and perform an uninstall first before reinstalling.
Once you issue both commands you should see output from the installer telling you where it’s at in the install process. I guess there could be some kind of synchronization back to the browser but personally I think the SSH output should be enough. What were you thinking it should do here? Also (again not specifically documented) you can leave the installer web page at any time. When the Pi is ready the installer page with disappear and when you come back to the dashboard you will see the Pi.
Glad you were able to work your way through it. No flaming here, as Adam said we are a friendly community and we understand that we have a new platform on our hands, so we’re not too proud to think there aren’t improvements and tweaks needed as we mature.
To speak to a few of the points that you’ve made:
Losing you for a bit in my steps above was actually the fault of the steps I gave you, so noted and apologies. In short we have a ‘no device’ scenario on the dashboard when you log in with no devices attached that gives you 4 large buttons for the different device types we support. I didn’t consider you were in that state, and instead wrote instructions that would have followed better for someone with at least one device on their account.
As for your documentation suggestions, I (also) agree that we should have a note on Option 2 to let people know that the installer is a one-time use thing, as you’re not the first person I’ve seen try to re-use one or share it publicly. I also think that, somewhere, much as we want everyone to love Cayenne, we need to document the Raspberry Pi uninstall process. I’m going to bring both of these to the rest of our team to discuss implementing.
What Adam said is true, you don’t need to remain on the webpage during installation, so I don’t think that needs to be explicitly stated.
Part of my problem was that this Pi happens to be on a very slow network so the update time after rebooting it to the time that it starts communicating to the cloud and everything wakes up is much longer than on a very fast connection, thus my reaction “OK, now what?..”.
When I did my initial install, I filled up my 4gb SD immediately (there was other stuff on it as well). I upgraded that to an 8gb SD (but made the mistake of copying the previously downloaded cayenne bits from the old SD to the new one!!!). And filled that up too with even more stuff, so I finally went with a 32gb SD (and copied the downloaded bits again!. Thus this was at least the 3rd if not the 4th or 5th time I had installed the SAME software. I wasn’t paying attention that the links provided were unique. I was thinking that I could just re-use the same stuff I had already installed before. Once you suggested to uninstall and then re-install using the specific file name, that put me on the right track. IMHO the docs could be improved there to note that each install is unique and must be followed exactly to enable the cloud to recognize that connection and device, and not to re-use previously installed bits.
Regarding the Pi uninstall process, you actually documented it very well in your reply to me, and anyone going through the same issues I did and reviewing this problem report submission would see that. But you could maybe copy that portion of your reply to me and add it in a new section somewhere on the Pi install page.
On my Part 2 above, as I say, I was not thinking it through, that the remote system after rebooting had to communicate with the cloud server and that my web page would then “wake up” and see the device. I think the easiest solution to this is to add some text under the area that says “run these two commands” that tells you what will be going on under the hood when you do so and to just wait till the new device daemons wake up and the web page updates with the device parameters. As it stands now, there isn’t sufficient information to tell you what to expect or what to do after you run those two install commands.
Thanks again for the quick replies and friendly advice; looking forward to tinkering with the GPIO and a mini display for starters.