Viewing Dashboard on Gateway Pi?

Started by ohmetimothy, February 25, 2016, 12:56:02 AM

ohmetimothy

Hello,

I have fully configured and setup a Raspberry Pi 2 with the Moteino Gateway Ready image V8.1. I am able to access and view my sensor/node information from devices both inside and outside my home network. One thing I have not yet been able to figure out though is viewing the Moteino Gateway Dashboard from the RaspberryPi itself. I have it configured to boot to the desktop and would love to see the graphing and dashboard interface right on the device. Thanks in advance for any help you can provide. 1st time poster  :o

syrinxtech

Do you have a monitor connected to the HDMI port and a keyboard/mouse connected to the USB ports? 

Any reason you can't start a web browser locally and view the information?

HeneryH

#2
I have an older Pi so the details might be different.  My older Pi does not have a video driver built in so I purchased a video card from https://www.adafruit.com/categories/400 .

Once you get your video card working, you can log in via command line and run "startx" which will bring up the windowing environment where you can launch a browser.

Edit correction - The Pi does have an HDMI driver but I used a small screen that required a separate HDMI -- TTL adapter.  If you have an HDMI monitor you shouldn't need any extra hardware.

ohmetimothy

Thanks for the responses everyone! I should have provided more information. I do have a 5 inch HDMI screen that is physically mounted to the Pi. I have tried opening Localhost and the IP of the device itself in the Epiphany browser just like I do on my other devices and I just get an error message in the browser window. I'll try to screen cap it and pass it along.

syrinxtech

You should be able to browse to one of the following:

https://localhost
https://<IP address of PI>
https://<hostname>.local


ohmetimothy

Quote from: syrinxtech on February 25, 2016, 03:14:25 PM
You should be able to browse to one of the following:

https://localhost
https://<IP address of PI>
https://<hostname>.local

I've actually tried those without any luck. I will grab the exact error that is coming up. It appears to be hitting the Moteino Dashboard but just surfaces an error in the browser (like a 404 but not that exact error). I didnt know if maybe I needed to change a setting or something.

ohmetimothy

When I hit the IP or Localhost I am prompted with a login popup as expected. The page attempts to load and even says Moteino Gateway Dashboard at the top of the browser itself. But the only thing displayed is "Error:jQuery/mobile could not be loaded from the CDNs. Check the internet connection."

syrinxtech

And you don't get these error messages when using any other device to remotely connect to the PI's web browser?  In other words, you only get this error message when connecting from the web browser running on the PI?


ohmetimothy

Quote from: syrinxtech on February 25, 2016, 03:58:20 PM
And you don't get these error messages when using any other device to remotely connect to the PI's web browser?  In other words, you only get this error message when connecting from the web browser running on the PI?

Correct. I only see this error on the RapsberryPi itself. I can access the dashboard just fine from devices on my local network at home and from work or any other outside network.

syrinxtech

Well, I don't know the answer for sure but I did Google this:

http://stackoverflow.com/questions/12877255/jquery-mobile-works-online-but-not-locally

According to it, the jquery call needs to come before jquery-mobile.  I looked at the index.html file on my v8 g/w:

<head>
  <title>Home Gateway Dashboard</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="images/favicon.ico" type="image/x-icon">
  <script src="/socket.io/socket.io.js"></script>
  <link type="text/css" rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
  <link type="text/css" rel="stylesheet" href="css/jqm-font-awesome-usvg-upng.min.css" />
  <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
  <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

If the theory is correct, you might try moving the line in red below the line in blue?  Keep in mind, I'm totally guessing here.

ohmetimothy

Quote from: syrinxtech on February 25, 2016, 04:15:45 PM
Well, I don't know the answer for sure but I did Google this:

http://stackoverflow.com/questions/12877255/jquery-mobile-works-online-but-not-locally

According to it, the jquery call needs to come before jquery-mobile.  I looked at the index.html file on my v8 g/w:

<head>
  <title>Home Gateway Dashboard</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="images/favicon.ico" type="image/x-icon">
  <script src="/socket.io/socket.io.js"></script>
  <link type="text/css" rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
  <link type="text/css" rel="stylesheet" href="css/jqm-font-awesome-usvg-upng.min.css" />
  <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
  <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

If the theory is correct, you might try moving the line in red below the line in blue?  Keep in mind, I'm totally guessing here.

oh interesting! I really appreciate you looking in to it. I just created a backup image so I could dive in and goof around with stuff. I'll try it out and let you know.

syrinxtech

No problem, hope it works.  Let us know how it goes.


ohmetimothy

Quote from: syrinxtech on February 25, 2016, 05:38:00 PM
No problem, hope it works.  Let us know how it goes.

Just made the change, rebooted, and I'm still getting the same error. Everything works the same as before even with the modification to index.html.

syrinxtech

Sorry it didn't work.  I'll keep looking around.

ohmetimothy

Quote from: syrinxtech on February 25, 2016, 05:59:30 PM
Sorry it didn't work.  I'll keep looking around.

Very much appreciated! I am also looking around myself. Seems like an odd issue. I didnt know if maybe the Epiphany browser maybe didnt have the proper plug ins etc.