Troubleshooting Pi Showing Up as Offline in Dashboard


#3

#4

#5

Hello,

I tried this kind of manual, but most probably company I’m working for is blocking port 8181.

Is there some solution connect to you via some VPN ?

Thank you for your quick reply.


#6

If you have a VPN to connect to to get out of your current network it will work, but Cayenne does not provide a VPN. If 8181 is blocked unfortunately you won’t be able to connect.


#7

Awesome and thorough explanation! thanks for your post. I am experiencing a bit of an odd situation with my Cayenne connection. When I am on my home wifi, I am able to connect my arduino uno to cayenne through a serial-USB connection with my Raspberry Pi 3.

I am a teacher in a public school, so when I am on my school’s network I had to assign a static IP, subnet mask, gateway, and DNS server addresses to my Pi using an ethernet connection. My Pi connects to Cayenne, but my Arduino no longer does when connected via Serial-USB. Cayenne oddly recognizes the Arduino for a split second, and then quickly loses the connection. Do you have any thoughts??


#8

The fact that the Pi connects OK on the school network and not the Arduino make me think it could be that port 8442 is closed on that network, as we use that for Arduino but not Pi. I’m not sure if this meshes with the behavior where you see it connect for a split second but it’s worth checking.

See this post for instructions on how you can test to see if port 8442 is open on that network, and let me know if you have any questions.


#9

I entered the prompt telnet arduino.mydevices.com 8442 and it kicked back
the following:

Trying 54.174.252.197…
Connected to arduino.mydevices.com.
Escape character is ‘^]’.

Then a moment later it wrote
Connection closed by foreign host.

Please advise as to what this tells us. Thank you.


#10

That means that the port is open. I’m not sure why it wouldn’t be working.


#11

Is there anything else I should check into?


#12

Could you show us the output from the cayenne-ser.sh script when the Arduino is behind the school network and attempting to connect to Cayenne? This may provide a hint.


#13

Here is the output for the cayenne-ser.sh script:

pi@Regini:~/Downloads/Cayenne-Arduino-Library-master/extras/scripts $ ./cayenne-ser.sh
[ Press Ctrl+C to exit ]
/dev/ttyUSB0 not found.
Select serial port [ /dev/ttyACM0 ]: /dev/ttyACM0
Resetting device /dev/ttyACM0…
Warning: Server connection may be insecure!
Connecting: FILE:/dev/ttyACM0,raw,echo=0,clocal=1,cs8,nonblock=1,b9600 <-> TCP:arduino.mydevices.com:8442,nodelay
2017/05/18 06:03:15 socat[3154] N opening character device “/dev/ttyACM0” for reading and writing
2017/05/18 06:03:15 socat[3154] N opening connection to AF=2 54.174.252.197:8442
2017/05/18 06:03:15 socat[3154] N successfully connected from local address AF=2 172.32.33.26:44462
2017/05/18 06:03:15 socat[3154] N starting data transfer loop with FDs [5,5] and [6,6]
2017/05/18 06:03:15 socat[3154] N socket 2 (fd 6) is at EOF
2017/05/18 06:03:15 socat[3154] N exiting with status 0
Reconnecting in 3s…
Connecting: FILE:/dev/ttyACM0,raw,echo=0,clocal=1,cs8,nonblock=1,b9600 <-> TCP:arduino.mydevices.com:8442,nodelay
2017/05/18 06:03:18 socat[3157] N opening character device “/dev/ttyACM0” for reading and writing
2017/05/18 06:03:18 socat[3157] N opening connection to AF=2 54.174.252.197:8442
2017/05/18 06:03:18 socat[3157] N successfully connected from local address AF=2 172.32.33.26:44560
2017/05/18 06:03:18 socat[3157] N starting data transfer loop with FDs [5,5] and [6,6]


#14

Hey rsiegel,

You had asked for my output from the cayenne-sed.ch script a little over a week ago and I was wondering if it led to any insights as to what the problem may have been. Thanks.


#15

Yikes, I’m sorry, I missed your response.

Unfortunately, I was hoping for something that jumped out at me more than what I see there. I mean I see the single re-connection, but minus the different IPs this looks exactly like my Pi looks on a successful connection via serial USB.

Are you sure if /dev/ttyACM0 is the correct serial port that your Arduino is plugged into on the Pi? If you edit the cayenne-ser.sh script you’ll see there is a place where you can specify the comm port, and I wonder if this could be set to the wrong device. I always make sure it matches the one that my Arduino IDE sees the device on in the Tools>Port menu when it is plugged in.

Though I don’t see any reason to suspect why this would change between your home and school networks, unless you plugged in the Pi to a different USB port when setting things up at school, or have other USB devices plugged into the Pi in one location and not the other.


#16

Thanks for getting back to me. I am sure it is the correct port because it works when connected on my home wifi network. I am really wracking my brain on this.


#17

grep Id /etc/myDevices/AppSettings.ini
ID=
id is empti no id is showing and
nano /etc/myDevices/AppSettings.ini
no such file in the directory
although i install the cayenne through IOS ,through raspberry pi3 cnncted to laptop but dashboard isnt showing up…
whats should i do …
in ios app it stuck and the last step just a momment
and on laptop cnncted to pi3 stuck on the step 4 after pi is rebooted .!!
what should i do
kindly help !!


#18

Hi @ziashahid104 and welcome to the Cayenne Community.

I edited out the part in the first post of this thread calling about the ID entry in /etc/myDevices/AppSettings.ini, as this ID referred to an older system that we used to use that is now deprecated. It is in fact OK that your AppSettings.ini file has a blank ID= line.

Could you share with me the output from telnet cloud.mydevices.com 8181 as well as service myDevices status and service webiopi status, so I can give you the next best troubleshooting steps?


#19

rsiegel http://community.mydevices.com/u/rsiegel Technical Product
Manager
July 25

Hi @ziashahid104 http://community.mydevices.com/u/ziashahid104 and
welcome to the Cayenne Community.

I edited out the part in the first post of this thread calling about the
ID entry in /etc/myDevices/AppSettings.ini, as this ID referred to an
older system that we used to use that is now deprecated. It is in fact OK
that your AppSettings.ini file has a blank ID= line.

Could you share with me the output from telnet cloud.mydevices.com 8181
as well as service myDevices status and service webiopi status, so I can
give you the next best troubleshooting steps?

Visit Topic
http://community.mydevices.com/t/troubleshooting-pi-showing-up-as-offline-in-dashboard/720/18
or reply to this email to respond.

In Reply To
ziashahid104 http://community.mydevices.com/u/ziashahid104
July 25
grep Id /etc/myDevices/AppSettings.ini ID= id is empti no id is showing
and nano /etc/myDevices/AppSettings.ini no such file in the directory
although i install the cayenne through IOS ,through raspberry pi3 cnncted
to laptop but dashboard isnt showing up… whats should i do … in ios app it
st…

Visit Topic
http://community.mydevices.com/t/troubleshooting-pi-showing-up-as-offline-in-dashboard/720/18
or reply to this email to respond.

To unsubscribe from these emails, click here
http://community.mydevices.com/email/unsubscribe/22305f3785bba0b7e825e05a6abd17c57a9d246e0c3df9720d7e1a7792515fec
.

sir i have attached the results of the outputs of
telnet cloud.mydevices.com 8181
service myDevices status
service webiopi status

although sir im attaching the ios and andriod screenshots.
in IOS app it stuck at final step.(screenshot attached).
in andriod app after installation it add the device but show this
(screenshot attached).

waiting for the solution !
thankyou


#20

This part looks like it is the explanation. The myDevices service is the core component of our Pi agent, and if it’s not running then it explains why the device wasn’t able to communicate back to Cayenne that the install finished.

As a first troubleshooting step, if you haven’t already, reboot the Pi and see if service myDevices status switches to ‘active’ after the reboot. If it does, your device should be showing online in the Cayenne dashboard now. If it still shows ‘failed’, let’s try a re-install to make sure that the agent install is going OK. We can do it from the web dashboard rather than from the mobile apps, because the commands provided from the web dashboard will offer better output for debug. To do this:

  1. Uninstall what’s currently on the Pi by running:
    sudo /etc/myDevices/uninstall/./uninstall.sh
    then:
    sudo /etc/webiopi/uninstall/./uninstall.sh

  2. Log into the Web Dashboard and add a new Raspberry Pi. On the “Connect your Raspberry Pi” screen, use the 2 commands under ‘Option 2’ instead of the mobile apps. The first command downloads the installer to your Pi, and the second one runs it.

  3. If it stops anywhere during the installation, please share the full output from your command line when running that 2nd command so I can help troublshoot. If it completes installation OK, it will automatically reboot your Pi at the end of installation.

  4. Once the Pi is back up from reboot, check service myDevices status one more time. If the myDevices service is still showing ‘failed’ at this point, then it’s likely some conflict with other software on the Pi, or some OS setting or package. We can look at that next if that is the case.


#21

I made some more edits, mostly formatting. It also stated that Jessie Lite is not supported, which it is now.


#22

Hi everyone!

I’m new in Cayenne, I’d appreciate your patience :grin:

I was trying to connect my Raspberry Pi 2 B with cayenne, but the dashboard shows it is offline… I have checked the troubleshooting list and it’s strange that everything seems to be working (connectionsestablished, services running, config file, internet connection…).

I have tried installing and uninstalling several times, and I only get from the dashboard some variables (which are only refreshed once I press the reset dashboard button). Is that normal? I have the impression that everything’s running fine, but I’m making some noob mistakes… any ideas?

Here I leave a screenshot of the appearance:

And the log file is:

pi@raspberrypi ~ $ tail -n 50 /var/log/myDevices.log
2017-09-01 12:35:27 - myDevices - INFO - History CalculateAverages increment: 54
2017-09-01 12:35:27 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:35:27 - myDevices - INFO - Save History Averages
2017-09-01 12:35:27 - myDevices - INFO - Memory usage : 55 size: 21328
2017-09-01 12:35:27 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=508.4, ru_stime=48.86, ru_maxrss=21328, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=539431, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=4800, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=162706, ru_nivcsw=54025)
2017-09-01 12:35:27 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:35:27 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-09-01 12:35:29 - myDevices - INFO - Checking for updates…
2017-09-01 12:35:32 - myDevices - INFO - Checking update version
2017-09-01 12:35:32 - myDevices - INFO - https://updates.mydevices.com/raspberry/update /etc/myDevices/updates/update
2017-09-01 12:35:33 - myDevices - INFO - Updater retrieve update success
2017-09-01 12:35:35 - myDevices - INFO - No new version detected. Closing update…
2017-09-01 12:35:53 - myDevices - INFO - SendHistoryData previously SendFailed items: []
2017-09-01 12:35:57 - myDevices - INFO - History CalculateAverages increment: 55
2017-09-01 12:35:57 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:35:57 - myDevices - INFO - Save History Averages
2017-09-01 12:35:57 - myDevices - INFO - Memory usage : 56 size: 21332
2017-09-01 12:35:57 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=518.29, ru_stime=49.84, ru_maxrss=21332, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=550776, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=4880, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=166410, ru_nivcsw=55158)
2017-09-01 12:35:57 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:35:57 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-09-01 12:36:27 - myDevices - INFO - History CalculateAverages increment: 56
2017-09-01 12:36:27 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:36:27 - myDevices - INFO - Save History Averages
2017-09-01 12:36:28 - myDevices - INFO - Memory usage : 57 size: 21336
2017-09-01 12:36:28 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=527.78, ru_stime=50.85, ru_maxrss=21336, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=561426, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=4944, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=169849, ru_nivcsw=56265)
2017-09-01 12:36:28 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:36:28 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-09-01 12:36:53 - myDevices - INFO - SendHistoryData previously SendFailed items: []
2017-09-01 12:36:57 - myDevices - INFO - History CalculateAverages increment: 57
2017-09-01 12:36:57 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:36:57 - myDevices - INFO - Save History Averages
2017-09-01 12:36:57 - myDevices - INFO - Memory usage : 58 size: 21336
2017-09-01 12:36:57 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=536.84, ru_stime=51.85, ru_maxrss=21336, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=572442, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=5000, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=173173, ru_nivcsw=57164)
2017-09-01 12:36:57 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:36:58 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-09-01 12:37:27 - myDevices - INFO - History CalculateAverages increment: 58
2017-09-01 12:37:27 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:37:27 - myDevices - INFO - Save History Averages
2017-09-01 12:37:27 - myDevices - INFO - Memory usage : 59 size: 21336
2017-09-01 12:37:27 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=546.05, ru_stime=52.84, ru_maxrss=21336, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=583048, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=5064, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=176464, ru_nivcsw=58172)
2017-09-01 12:37:27 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:37:28 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-09-01 12:37:53 - myDevices - INFO - SendHistoryData previously SendFailed items: []
2017-09-01 12:37:57 - myDevices - INFO - History CalculateAverages increment: 59
2017-09-01 12:37:57 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {}}
2017-09-01 12:37:57 - myDevices - INFO - Save History Averages
2017-09-01 12:37:57 - myDevices - INFO - Memory usage : 60 size: 21340
2017-09-01 12:37:57 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=555.39, ru_stime=53.59, ru_maxrss=21340, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=593884, ru_majflt=18, ru_nswap=0, ru_inblock=15272, ru_oublock=5120, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=179862, ru_nivcsw=59266)
2017-09-01 12:37:57 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-09-01 12:37:58 - myDevices - INFO - PacketTypes.PT_UTILIZATION

Thank you very much in advance!

Best Regards,
Celia