Local display on RPi

Hi.  I hope someone might be able to help?

I have a standard system based around an RPi which has been running for >6 months now, and I am very happy with this.  I can see the data plots over my network just fine (eg by typing http://192.168.1.100/emoncms/ and logging in).  I would also like to continuously display the real time consumption data on a small screen attached directly to the RPi.  I am sure someone must have done this, but I can't seem to see anything more on this screen than the prompt and the text lines that you get on the RPi at boot up.  Presumably there is some command to do this, but I am not very familiar with Linux, or networks - typing "emoncms" doesn't work when logged in.  Sorry if this is a silly question! 

Cheers

Andy

glyn.hudson's picture

Re: Local display on RPi

Hi Andy,

I am in the early stages of developing such a display for use with the forthcoming emonPi (Raspberry Pi enregy monitoring shield) using a 16 x 2 character LCD connected to the Pi via I2C. See photos of it in action here: http://openenergymonitor.org/emon/node/3937

Demo code is up on github://github.com/glynhudson/emonpi/tree/master/LCD

Insturctions here to enable I2C on the Pi: http://wiki.openenergymonitor.org/index.php?title=EmonPi#LCD

Charly86's picture

Re: Local display on RPi

Andy,

are you talking about something like that ?

 

 

 

AndyB's picture

Re: Local display on RPi

Hi

I was actually thinking about using a standard monitor screen as used in aircraft seat-backs and sold now commonly and cheaply for use with car reversing cameras (connecting with a yellow coaxial (RCA) plug).  I have one about 150mm wide with 480x272 pixels that plugs straight into the RPi and is used just like a normal monitor with relatively poor resolution.  The power consumption is low and this could be left connected all the time, or powered up independently of the RPi with a proximity sensor.

My question might better have been phrased "how can I display the EmonCMS graphic screen directly on a monitor connected to the RPi?"   Sorry I wasn't so clear.

Cheers

Andy

 

Bramco's picture

Re: Local display on RPi

Hi Andy,

I had a plan to do exactly the same but haven't found the time to investigate yet.

I was planning to simply boot the pi with the display in place, kick off the browser and then bring up the relevant dashboard.

The downside would be of course that on power outage the pi would reboot but you'd have to connect a keyboard to get the browser and dashboard up again.

What  I want to look into is the possibility of kicking off the browser with a specified address for the dashboard in a startup file. I know nothing about Linux so would have to work out how to do this unless someone has already done it or can explain how to do it? I'm guessing it's pretty easy to do.

Simon.

pb66's picture

Re: Local display on RPi

If the Pi is configured to automatically log in to a desktop in raspi-config then you should be able to autostart the midori browser in full screen mode on the webpage or emoncms dashboard of your choice by editing the autostart file as described in this guide.

http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/auto-run-browser-on-startup

you may need to design a dashboard scaled specifically for the small resolution to get the best out of it.

I have a dashboard set up just for my mobile it is pretty much identical to my main page but miniaturized.

I did that by opening my std main page in chrome and used the browsers "view source" function and then copy and pasted the whole "page-container" div into a single text box widget on a new dashboard called "mobile". This gives you a complete second copy of the first dashboard but in a text form that allows you to manually edit all the sizes used so you can have miniature dials etc

Paul

 

serbat's picture

Re: Local display on RPi

Great, also I want to implement this feature ..
thanks for the tip I'll definitely try

Bramco's picture

Re: Local display on RPi

Thanks Paul - as usual a font of knowledge in this area. I'll give it a go when the days get a bit shorter still.

The garden makover still has priority.....

serbat's picture

Re: Local display on RPi

I tried the code to start the raspberry on the front

page, but it does not work, what is wrong?

 

$ sudo nano /etc/xdg/lxsession/LXDE/autostart

Comment everything and add the following lines:

@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://192.168.1.40/emoncms

pb66's picture

Re: Local display on RPi

I've not tried it I just recalled seeing it when looking for something else not long ago. However if you could expand on "it does not work" it may give us some idea of "what is wrong".

Assuming you have a screen attached

Does the Pi boot in to the desktop?

Does the browser open?

Does it attempt to open the page you want?

Does the page open if you manually type the url into the midori browser?

Are there any error messages?

What does it do?

serbat's picture

Re: Local display on RPi

essentially does nothing.

arrives at the end of loading, asks username and password, then stops like in the picture

attached, errors did not seem to read

 

 

pb66's picture

Re: Local display on RPi

Looks like you haven't configured it to "boot to desktop", immediately after the bit you have done on that page is

 

If necessary use the configuration tool to enable auto running of the GUI on powerup

      sudo raspi-config

 

You should also read further down the page as there is a note about installing another package and also a link to another page about internet connections. 

serbat's picture

Re: Local display on RPi

I tried but did not succeed.

would you be so kind as to tell me how to do it, unfortunately with

English are in trouble and I struggle to understand

pb66's picture

Re: Local display on RPi

From the command prompt

rpi-rw

sudo raspi-config

then using the down arrow, select

"3 Enable Boot to Desktop/Scratch Choose whether to boot into a desktop environment, Scratch, or the command-line"

enter, Then select

"Desktop Log in as user 'pi' at the graphical desktop"

enter, tab to <Finish>, enter again.

Then enter to reboot.

This should make the Pi reboot into the graphical user interface (GUI) or "desktop" and the autostart script should open midori, if it doesn't you may need to install another package

rpi-rw

sudo apt-get install x11-xserver-utils

sudo shutdown -r now

See how you get on with that :-)

 

serbat's picture

Re: Local display on RPi

thanks
very nice as always, now I feel.

serbat's picture

Re: Local display on RPi

Ok, I tried it and it works, I alone I would not have arrived, you're a legend :)

Thank you very much

Bramco's picture

Re: Local display on RPi

@ Paul

I finally got round to setting thisu up this week and it worked a great - for the first ten minutes. Then the screen blanks....

Could it be that I need to install xset? I notice one of the commands in the init file is 'xset s noblank'

Thanks for any advice..

pb66's picture

Re: Local display on RPi

 xset should be installed already as part of "x11-xserver-utils" what do you get if you type xset at the prompt?

Some of the comments on the page linked above discuss this and more can be found on the topic using a well known search engine eg Disable screen blanking in X-Windows on Raspbian and How do I prevent the screen from going blank?

Depending on your needs and application, is it worth considering a movement sensor connected via the gpio to wake the display if someone is in the vicinity rather than permanently displayed?

Paul

Bramco's picture

Re: Local display on RPi

Hi Paul, stupid of me but not being a Linux person....

Xset gives command not found,so I'll follow the instructions in the earlier link.

Thanks for the other pointers. Who knows maybe I'll need those next!   :-)

Bramco's picture

Re: Local display on RPi

Paul Thx. The download fettled it!

Although now I have another project to do the proximity sensor!

I was wondering idly if a simple bit of cardboard flapped over the screen might be technical enough for my wife....

We'll see.     :-)

pb66's picture

Re: Local display on RPi

Great to hear you got it sorted :-)

glyn.hudson's picture

Re: Local display on RPi

Nice! Good idea, keen to see some photos of this in action! We have a hdmi Pi (kickstarter) sitting here in the lab. I've been inspired to connect it up to make an updated emonGLCD! 

pb66's picture

Re: Local display on RPi

I have a nice looking 15 inch lcd monitor in the loft, I did fish it out with the intention of buying one of those cheap touch screen overlays for it but found it doesn't have hdmi OR coaxial video so I sort of lost momentum.

Paul

PS something else I'd like to try and do is repurpose a couple of kindle touches as glcd come heating controllers. apparently they are linux too with built in wifi and fantastic battery life.

glyn.hudson's picture

Re: Local display on RPi

I had a go displaying emoncms my electric on a hacked nook in a Web browser. Looked nice. Bit  clumsy  to navigate but worked ok once running 

https://mobile.twitter.com/openenergymon/status/532822565820309505

JD's picture

Re: Local display on RPi

I've been messing with this also, using a small HDMI monitor and trying to use the Pi as both emonhub and dashboard display.  The Chromium browser has a "kiosk mode" that seems to fit the bill... got to expand the first partition on the SD card in order to try this option but it looks promising in theory.  

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.