LinuxMCE Forums

General => Users => Topic started by: krys on December 29, 2008, 04:29:30 pm

Title: digital picture frame
Post by: krys on December 29, 2008, 04:29:30 pm
I took apart a laptop that I was using as an MD and reassembled it into a picture frame which is now hanging on my wall. It works and looks good. Now I would like for the core to send a command to turn this on and off at a certain time each day (say on at 7am of at 12pm) just to save some life on the lcd. Is this possible? The laptop has the wake on lan option in the bios.
Title: Re: digital picture frame
Post by: bulek on December 29, 2008, 11:29:47 pm
AFAIK, waking up MDs via Wake-on-lan works currently (if not limited by certain HW). Just sniff logs when this happens and then do the same....

Regards,

Bulek.
Title: Re: digital picture frame
Post by: tschak909 on December 30, 2008, 04:07:40 am
does

Code: [Select]
xset dpms force off
turn off the screen?

-Thom
Title: Re: digital picture frame
Post by: krys on December 30, 2008, 06:47:44 am
yes
Title: Re: digital picture frame
Post by: tschak909 on December 30, 2008, 07:00:19 am
Well, I will release the Generic PC Workstation device as part of 0810, but until then,

You can create a new type of TV It has to be a member of the TV category under  a/v devices. you can use wizard > av devices > add new device > create device template to do this.

Make it a GSD device

and implement commands for Off and On.

for Off

Code: [Select]
system("xset dpms force off")

for On
Code: [Select]
system("xset dpms force on")

Make sure the TV is added, and it is part of the room.

You can then test it by going into the power menu and tapping display off.

If this works, then...

* The Display will shut off after x number of seconds, and will turn on when menu is triggered, unless set to 0
* You can send On and Off commands to the media director in events etc to turn the display on and off.

-Thom
Title: Re: digital picture frame
Post by: krys on December 30, 2008, 03:24:00 pm
awesome, thanks Thom. I will try that out and post the results.
Title: Re: digital picture frame
Post by: krys on December 31, 2008, 07:26:52 am
I must not be setting this up correctly as the display off command is not working from the orbiter or from the admin page.
I went to wizard>devices>AV then clicked add device
I then selected a brand and under Device category I selected Generic Serial Device then Add device template
In the next screen I clicked the bottom radio button saying that it will be controlled via pluto GSD typed in a name and hit ok.

Now the way I set this up it appears under GSD's for the room, not AV equip, is this incorrect? After this I went to advanced and added the code you told me to and set the device up as a tv/plasma/lcd,  it didnt work either with the display off button on the orbiter or the send command link on the admin page.

Title: Re: digital picture frame
Post by: tschak909 on December 31, 2008, 01:14:05 pm
Oh, no. The category is TV/LCDs/Projectors < AV Devices, not GSD devices..

You merely specify that it is a GSD device when you first CREATE the template, and it asks you what type of device it is

-Thom
Title: Re: digital picture frame
Post by: krys on December 31, 2008, 03:54:14 pm
I thought that might be the case, but when I specify it as a TV then create a device template it asked me about IR signals and stuff and it just didnt seem like it was going in the right direction. Also when it asked me how I wanted to control it I recall seeing GSD on the list, I seem to remember the options being usb, ethernet, rs232, etc. I will take another look when I get home. I wish I had it in front of me right now so I could be more specific.
Title: Re: digital picture frame
Post by: tschak909 on December 31, 2008, 04:10:06 pm
When you create a new device template, of any kind, you get three options, radio buttons:

Code: [Select]
* Create a Simple IR Device
* Create a serial device to control via GSD (use this one)
* Create a C++ device.

Next >>

-Thom
Title: Re: digital picture frame
Post by: krys on December 31, 2008, 04:26:07 pm
It was late last night so I will give it another go when I get home....thanks for not 'TWACKING_ME_over_the_HEAD' ;)
Title: Re: digital picture frame
Post by: krys on January 01, 2009, 12:52:59 am
I must be in the wrong place or something... on the admin page I go to wizard>devices>AV equip. It brings up the Av equip page and I hit the button add device. A pop up window appears where I can select the mfg and category. I put in mfg and use TV/plasma/lcd as the category. Under the dialogue "model not on the list" I hit the button add device template. This walks me through 6 screens, none of which give me 3 options.
However if i use GSD as the category instead of Tv/plasma/lcd i do and hit add device template I do get the 3 options that you refer to.
Sorry if I am missing the obvious here.
Title: Re: digital picture frame
Post by: tschak909 on January 01, 2009, 03:22:47 am
okay, no. sorry. Looks like you found an interesting bug, here.

No big deal, just specify RS232 and save all the way through.

Then go to the new device you've created, click Advanced.

Then You'll see that it is indeed a Generic Serial Device, with the button to edit the Ruby Codes. :)

-Thom
Title: Re: digital picture frame
Post by: stampeder on January 01, 2009, 06:33:51 pm
krys:

Here's another approach for you.
Get yourself a X10 appliance module for your picture frame. Also, buy a CM11A module and set up LinuxMCE to control it. It's well documented in the Wiki. Then you just set the X10 to turn on when you want it up and turn off when you want it off. Your picture frame should self boot and be ready for you when you want.

I have a number of touch screen in the house that I am going to use in the same fashion as you are doing. I plan to implement the X10 solution.

Incidently, I've been using the X10 solution since they came out originally in the 70's. I still have modules from then that are currently in day to day use.

Good luck.
Title: Re: digital picture frame
Post by: tschak909 on January 01, 2009, 06:52:40 pm
ew.

-Thom
Title: Re: digital picture frame
Post by: krys on January 02, 2009, 04:17:33 pm
Thom,
I created the device, its in the proper room and I pasted the codes that you gave me into the on and off boxes when you click on the edit codes button. However, when I go to the power screen on the Web DT orbiter and click "display off" nothing happens. When I go to the orbiter on the actual MD that I am trying to turn off and click the "display off" button all it does is immediately close the orbiter screen and shows the picture slideshow. I tried it a few times and it happened like this every time.
Any ideas?
Is there a log somewhere that I can pull up to see where it is sending the code to and if it is sending it correctly?
I also tried sending the command from the web admin with no luck.
Title: Re: digital picture frame
Post by: tschak909 on January 02, 2009, 05:02:53 pm
You can check the output of the /var/log/pluto/DCERouter.log at the exact time you send the command to see a detailed list of the command and if it delegates to any other devices.

-Thom
Title: Re: digital picture frame
Post by: jondecker76 on January 02, 2009, 05:12:44 pm
If you are running this digital picture frame as an MD, why not just send it and On/Off command directly? You'll turn the entire thing off instead of the whole screen, but it works on my MD's. Though I have run across some that don't like to turn on/off remotely.
Title: Re: digital picture frame
Post by: tschak909 on January 02, 2009, 05:15:05 pm
sending on/off to the md should blank the screen and turn off any devices in any active pipes.

-Thom
Title: Re: digital picture frame
Post by: krys on January 02, 2009, 05:23:18 pm
Well, for some reason this MD doesn't seem to like the on off process. All my other md's will reboot when the core reboots, and automatically kick on if the core has been off for a while then turns on. This MD turns off when the core turns off, but will not come back on. I checked in the bios and WOL was not enabled, so I enabled it but it still doesn't want to wake. I tried running etherwake <mac address> from the core and that wouldn't wake it either. Honestly either would be sufficient, but my main goal is to save lcd life and I dont like this thing glowing in the middle of the night.
Title: Re: digital picture frame
Post by: krys on January 02, 2009, 05:25:02 pm
do you think it is possible that I need to rebuild the image for this now that WOL is enabled in the bios?
Title: Re: digital picture frame
Post by: tschak909 on January 02, 2009, 05:31:30 pm
no.

-Thom
Title: Re: digital picture frame
Post by: stampeder on January 05, 2009, 10:11:55 pm
krys:

Can you post some pictures of how you built your picture frame?
I for one would like to see them.

Thanks.
Title: Re: digital picture frame
Post by: jeangot on January 06, 2009, 05:11:34 pm
Krys,
there is this bug with certain Nvidia ethernet chipsets where the Mac address is reversed for WOL. So Instead of sending aa:bb:cc:dd:ee you need to send ee:dd:cc:bb:aa. Although it's unlikely that you rpicture frame has an Nvidia chipset, you could always try that just in case, by sending the reversed mac address with etherwake and see what happens...

Jean
Title: Re: digital picture frame
Post by: tschak909 on January 06, 2009, 05:13:11 pm
guys, you are all pointing to the wrong bloody problem. He just wants the screen to dim!

Pay attention.

-Thom
Title: Re: digital picture frame
Post by: jeangot on January 06, 2009, 05:53:15 pm
Thom,

thanks a lot for posting the information on how to create a generic PC monitor device. I was waiting for this for a long time. I tried following your instructions but I am also running into problems.
Some questions to cover my basics: where do I put the PC monitor device? As child of the MD, of the MD's orbiter, or perhaps under some GSD device that belongs to the MD? Do I need to create a video pipe for this to work?

Right now I can see in the logs that the orbiter is sending the off command to the MD, but nothing more is logged after that. I have right now the Monitor as child of the MD, with ON and OFF commands implemented, and located in the right room.

I am really interested in getting this to work. Thank you!

Jean
Title: Re: digital picture frame
Post by: krys on January 06, 2009, 07:22:14 pm
Here are some pics of the picture frame build, sorry I didnt take many and I dont have any that show me stuffing it into the frame.
(http://wiki.linuxmce.org/images/9/9e/Laptoppieces.jpg)
(http://wiki.linuxmce.org/images/5/58/DPF.jpg)
(http://wiki.linuxmce.org/images/d/d8/DPF1.jpg)

I will add a picture of it turned on in its final location, the one where it is hanging on the wall is before I ran the cat5 and power to it.
Basically I just took the laptop apart so I could free up enough wire for the monitor to be on the bottom side of the mother board. I stripped out crap I didn't need to slim it down and loose some weight (keyboard, battery, dvd drive, plastic parts, etc) I built the frame from 1x2 oak, routed the groove for the glass, took my measurements to Lowe's and had them cut the glass, had hobby lobby cut the matte board (they cut it exact and put a nice 45 degree bevel on it). Painted the frame black, put in the glass and matte board. Put the lcd screen in face down and used hot glue to hold it to the matte, used the back of the lcd case for support, hot glued the motherboard to the back of the lcd case, tucked wires and used a usb wireless keyboard and mouse. Hung it on the wall and ran the cables behind the drywall. I am really happy with the way it turned out. I used Roy's flickfetcher program and now all my wife has to do is add photo's to her flickr account and they automatically populate to the LMCE screensaver which just runs non-stop on this media director (unless we watch a video on it or something). All I really have left to do is solve the lcd on/off situation and i will be totally done, right now I can only turn it off through lmce, it wont come back on on its own.
I would prefer Thom's method to work because then I can set it up to turn the screen on and off based on events or time of day. I have not yet had a chance to check my logs to see what the problem is.
Title: Re: digital picture frame
Post by: stampeder on January 06, 2009, 11:00:58 pm
Thanks for the pictures and explanation Krys ;D.
I bought four touchpanel computers off eBay and I plan on doing something very similar to what you are. Only I want them more for orbiters to do media director controls. I do want to have our digital pictures displayed while they are not doing anything else so I may have to set them up as media directors to do that. I like the flickr idea as well.
As mine are touch screen I'll have to develop a different kind of frame idea. That's going to take some more thought.

Thanks again for sharing you idea and the results.

Glenn.
Title: Re: digital picture frame
Post by: krys on January 06, 2009, 11:24:40 pm
Actually I originally wanted this as a touchscreen also, but I wanted it to look like any ordinary picture frame (to please my picky wife) so that required glass across the front which obviously wouldn't work with a touch screen. I am more techie myself an would have just mounted the touchscreen in the wall if it was up to me.
If I were you I would definitely just set them up as media directors because it give you more flexibility, I can use my picture frame to watch tv, dvd's, surf the web, or run applications on KDE as well as control the music I have running through my house, and eventually the lights and sprinklers etc.
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 04:16:58 am
Victory.... not sure if this was my problem or not, but I didnt have the picture frame set up as a video device pipe for that MD. I am sure Thom mentioned this.... but I added it as a video pipe, and now I can turn the display of via the web dt.
SWEET! Now I just have to set it up to do it automatically.
Title: Re: digital picture frame
Post by: tschak909 on January 07, 2009, 04:24:18 am
Ok, now that this works, you can create a Timed Event.

Create two timed events that're based on day of week.

Call them Display On, and Display Off, for example.

Select all days of the week,

For the time, use 24 hour time: (23:00, for 11pm, 05:00 for 5am)

And then be sure to select the Advanced Wizard.

For the device on the left, Select your Media Director.

For the command on the right, select On, or Off as appropriate.


So in the end, you'll have two events.
One of them with an On command at the time you want the display to turn on
One of them with an Off command at the time you want the display to turn off.

-Thom
Title: Re: digital picture frame
Post by: golgoj4 on January 07, 2009, 04:35:26 am
that is pretty damn cool.
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 05:46:38 am
well, I set up the timed event but it doesnt seem to be working right away (surprise surprise). I set it up just as Thom suggested, but it doesnt seem to turn on or off at the specified time. I tried 12hr time format and 24hr. The strange thing is in the event set up screen when I click test command it works just perfectly...
I am just going to set it for now and see if it starts working.
Title: Re: digital picture frame
Post by: tschak909 on January 07, 2009, 05:48:51 am
you need to reload router, to make sure the event will be loaded by the event plugin.

You may wish to temporarily check the alarm checkbox for that room, so you can verify that it is counting down.

-Thom
Title: Re: digital picture frame
Post by: jeangot on January 07, 2009, 06:11:36 am
Krys,

after adding the device pipe, I can also see that the "off" command is being sent to my monitor now, however the logs /var/log/pluto/DCERouter.log then say that my monitor device has not registered.

05      01/06/09 21:08:01.921           The target device 360 (routed to 360) has not registered. <0x40800950>

Do your logs say the same? You put the system(xset blah) command under Ruby codes, right, not under "Commands" in a command group lower on the template page?

Jean

EDIT: Another question I guess is whether you made the Monitor a child of the MD, of the MD's orbiter, or of something else?
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 06:20:52 am
I never did look at the logs because it started working. I didnt do anything special with parent/child settings. The xset blah does go under the edit ruby codes button
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 06:23:40 am
Hey Thom,
I accidentally told LMCE to add the HDD from this picture frame as a share when I was prompted, now under when i go to play music under audio I have Kubuntu sound files and extra crap showing up. How do I get LMCE to stop pulling files from this HDD (hide/unshare it)
Title: Re: digital picture frame
Post by: jeangot on January 07, 2009, 07:11:20 am
Krys,
when you look in your device tree, is the Monitor "under" the MD, or under the MD's Orbiter or under something else?
I created it so that it belongs to the MD, I'm not sure if that was correct.
Jean
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 03:29:17 pm
Yes it is under the MD.

On a side note, the event started working as it was supposed to last night. It shut the LCD off at 11:30pm and turned it back on sometime before I woke up.

The last thing I have to do now before I can call this a victory is get it to play some sound. I have messed with alsamixer but have yet to hear anything out of the onboard speakers.
Title: Re: digital picture frame
Post by: tschak909 on January 07, 2009, 03:34:13 pm
the Play Sound command is not currently implemented in Orbiter. You'll need to use the App Server, and use a Spawn Application command to achieve what you want.

-Thom
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 03:35:57 pm
Don't forget this is a MD, it wont play sound for audio, video, or when in KDE
Title: Re: digital picture frame
Post by: jondecker76 on January 07, 2009, 07:18:39 pm
what is the audio chipset?
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 08:19:33 pm
its an intel "insert some numbers here i dont remember at the current time" 4ch AC'97
I will look again once I get home but that is how I remember it.
The strange thing to me is that it seems to be recognized because in alsamixer it shows up. In alsamixer I just turned everything up to 100% and I get no sound even in KDE.
Title: Re: digital picture frame
Post by: tschak909 on January 07, 2009, 08:21:06 pm
time to crack it open, fiddle some wires i guess, and run the following command:

Code: [Select]
cat /dev/urandom >/dev/dsp

WARNING: This outputs WHITE NOISE!

-Thom
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 08:31:46 pm
I will do that tonight, I have been wondering if the problem might have something to do with the fact that there is a volume control on the side of the laptop. It is not just a dial that you can turn all the way up or down, it is a springloaded two way lever that under windows you hold it one way and the volume goes up, or the other way for down. I remember when I reloaded xp on the machine the sound wouldn't work until I used the restore CD that came with the laptop and installed some volume control driver. Just a thought.
Title: Re: digital picture frame
Post by: tschak909 on January 07, 2009, 08:32:27 pm
oh ___YUCK___

-Thom
Title: Re: digital picture frame
Post by: krys on January 07, 2009, 11:45:03 pm
Should I assume that means you concur that this indeed could be my problem? If so I think I will just try to use a USB sound dongle that I have laying around, it had a headphone jack and an SPDIF port. I could just run that through the wall to some computer speakers hiding under the desk below the frame. I dont know how well the laptop speakers would work in a large room anyway.
Title: Re: digital picture frame
Post by: jondecker76 on January 08, 2009, 12:35:08 am
krys - I'd be interested in hearing what chipset your sound card uses.

I have an MD that I'm playing around with that uses the snd-intel8x0 driver that I can't get working for nothing so far. I wonder if yours needs the same driver??
Recently in the source tree I noticed that there are a few setup scripts for the i8x0 cards..