Donnerstag, 20. Dezember 2012

PogoPlug Pro + ArchLinuxARM + Motion

 Status: motion detection funktioniert bild wird noch nicht angezeigt



Quelle:
http://downloads.sourceforge.net/project/motiongui/motion-gui%28source%29/motion-Gui-1.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmotiongui%2F&ts=1356038786&use_mirror=ignum





Now it’s worth changing the root password and setting up a new user (which I’ll name “pi”):
passwd root
adduser
# Add a user named pi - accept default options
We’ll stay logged in as root, for now, as we still have some work to do to get things ready to have effective use of the device as a standard user.
Linux distributions have different command-line tools for installing approved component packages – much as some of you may be used to with NuGet in recent versions of Visual Studio. Raspbian has apt-get, Arch Linux ARM has pacman. To make sure pacman is installed and (along with the OS itself) up-to-date, run these operations:
pacman -Syu
pacman-key --init
pacman -Syu
Now you can use pacman to install the various packages we want to use. We’ll start with sudo (which stands for “super-user do” rather than being a mis-spelling of “pseudo” :-), which will allow our pi user to perform operations as root.
pacman -S sudo
It’s one thing to have sudo installed, it’s another to be able to use it. You can edit the sudo privileges directly using this command, which unfortunately uses the vi editor to open the file (I’ve mostly switched over to the much more intuitive nano editor, at this stage):
visudo
# Scroll down to "root ALL=(ALL) ALL", i to insert:
pi ALL=(ALL) ALL
Esc ZZ # (to quite & save)
At this stage it’s worth logging out (you can type exit or logout to do so) and logging back in via a new ssh session as the “pi” user:
ssh pi@192.168.1.110
One last step is helpful but not strictly necessary, in that it enables command-completion via the Tab key when executing commands using sudo:
sudo pacman -S bash-completion
Now we basically have our OS up and ready. If we were on “wheezy” we’d now be thinking about installing (or building) a webcam driver. That happens to be built into Arch Linux ARM, so we can skip on ahead to installing Motion:
sudo pacman -S motion
At this stage we have most of the packaged components in place that we need to run our motion-detecting security cam. Now we’ll start configuring Motion.
We’re going to ask Motion to save it's running process ID in a file in the /var/run/motion folder. First, though, we need to create that folder:
sudo mkdir -p /var/run/motion
[As mentioned last time, it’s helpful – but not necessary – to set up a killmotion script that uses this ID to kill the motion process (which is really only for when you’re running in daemon mode). That said, it’s also simple enough to run the “pstree –p” command to see the running process tree with the IDs at each node, and then just use “kill 1234” (assuming the process ID is 1234).]
Next we’re going to install Python and the GData component we need to access GMail and Google Drive.
sudo pacman -S python2 python2-pip
sudo pip2 install gdata
We’re going to ask Motion to save one frame per event – that we can use as an email attachment in our email, to help recipients – especially those on a mobile device – decide whether it’s worth watching the uploaded video. Both the capture frame and the video will be stored to /home/pi/motion, which we need to create:
mkdir /home/pi/motion
We might also have kept the default location – which I believe is under /var/tmp – but that’s a folder that gets cleared between sessions (when the device is rebooted). When my device was regularly being reset – back when I was using “wheezy” – I moved across to this folder, so I could see when images/videos were captured successfully. So far I haven’t seen the need to switch back.
Now we can download and install the Uploader.py file, which I’ve adapted from the one in this post (with the help of the information in this page). You might download the file and FTP it across, or you could use the following approach to download it directly using the Pi (and then make it executable):
cd /etc/motion
sudo wget "http://through-the-interface.typepad.com/files/uploader.py"
sudo chmod +x uploader.py
You’ll also need an uploader.cfg file in the same location. The simplest approach is to run “sudo nano uploader.cfg” and paste the contents in (after having modified them with your login information, of course):
[gmail]
# GMail account credentials
name = Kean Walmsley
user = keanrw@gmail.com
password = this_is_not_really_my_password
sender = keanrw@gmail.com

# Recipient email address (could be same as from_addr)
recipient = kean.walmsley@autodesk.com

# Subject line for email
subject = You have a visitor

# First line of email message
message = See attachment. Video of visitor uploaded to:

[docs]
# Folder (or collection) in Docs where you want the videos to go
folder = motion

[options]
# Delete the local video file after the upload
delete-after-upload = true

# Send an email after the upload
send-email = true
You should now be able to test the script, to see that it works:
cd ~
wget "http://through-the-interface.typepad.com/files/VidTest.avi"
wget "http://through-the-interface.typepad.com/files/VidTest.jpg"
/etc/motion/uploader.py /etc/motion/uploader.cfg ./VidTest.avi
[I had previously thought to post instructions to use fswebcam to capture a still and ffmpeg to capture a video, but the former involved installing an additional component and the latter didn’t actually work when called directly on my Pi (even though Motion uses it successfully to encode video, as far as I can tell)].
Once you’ve executed the uploader script, you should receive an email with a link to the video on Google Drive (assuming it’s enabled for your Gmail account) and the image as an attachment:
Test email with attachmentNow the various pieces are in place, it should be a simple matter of getting and adjusting the Motion configuration file. To get the one that I have working with my webcam, you can:
cd /etc/motion
sudo wget "http://through-the-interface.typepad.com/files/motion.conf"
Motion has a lot of settings that you may want to adjust – it’s a really flexible, powerful component – but I won’t go into the details on that, here.
To run Motion simply type “sudo motion” at the command-line. The configuration I’ve provided will run it in daemon (i.e. as a background service) mode, but if you hit problems you may want to run it in interactive mode, or even with the –s flag. A couple of handy features provide the ability to change configuration options at runtime via a URL (in my case this is http://192.168.1.110:7071) and to view the live webcam output via another (http://192.168.1.110:7070).
If all is working well, you should start to get emails with detected motion events:
Email on motion detection - with attachment
Once you’re ready to have it enter daemon mode on boot, you can edit the /etc/rc.conf file (using sudo nano …) to add it to the list of startup daemons on the very last line of the file.
One thing to note about this particular configuration: as mentioned, we save a single .jpg to accompany the .avi file that gets recorded (both files will appear in the same /home/pi/motion folder with the same name). The uploader script gets called when the .avi gets saved but assumes the .jpg will be there.
These files get created once motion has fully stopped (and there’s a configurable 60 delay to make sure that’s the case) which means that at some point we’ll want to change the configuration to have Motion take more regular snapshots – and use a different naming convention, as we’ll have more .jpg files per .avi – as that will allow us to run them through the facial recognition system and present the results without waiting for 60 seconds after the person has left. A change will also be needed for the uploader module, of course. But all that’s for another day and another series of posts. :-)
Update:
Alex Fielder reminded me that the uploader will look for a folder called "motion" in your Google Drive - be sure to make that folder before you try uploading. Thanks, Alex! :-)

PogoPlug Pro + ArchLinuxARM

PogoPlugPro ArchLinuxARM VS. Debian (alarm geht Debian noch nicht)


ArchLinuARM
------------------------------------------------------------

Quelle:
http://archlinuxarm.org/platforms/armv6/pogoplug-provideov3



Download and extract the root filesystem tarball onto the new ext3 partition as the root user, not just sudo.

sudo bash

tar xvfz /home/XXXXX/Downloads/ArchLinuxARM-oxnas-latest.tar.gz

 Create a file at /usr/local/mac_addr and place in it your Pro's MAC address (its on the bottom of the unit) in the format XX:XX:XX:XX:XX:XX. Safely umount the drive from the computer, plug it back in to the powered-off Pogoplug, and then plug in the Pogoplug.

#######################################################################

Debian (funktioniert nicht)
----------------------------------------------------------
Quelle:
http://forum.doozan.com/read.php?3,6336

Varkey has created and hosted a Debian rootfs for those who want to skip the manual step installation. Just grab Varkey's rootfs, untar it to a USB drive and you're done! See this post for Varkey's Debian rootfs:
http://forum.doozan.com/read.php?3,6336,6371#msg-6371


No such errors for me as well. Anyway if anyone needs the debian rootfs with all the above modifications done, here it is -- http://www.varkey.in/files/debian-rootfs-pogopro-varkey.tar.gz

als root auf den usb-stick navigieren

sudo bash

tar xvfz /home/XXXXX/Downloads/debian-rootfs-pogopro-varkey.tar.gz

Just extract it to an ext3 formatted disk. After extracting update your correct ethernet MAC address in /etc/network/interfaces

sudo cp /home/XXXXX/Arbeitsfläche/debian-pogo/interfaces /media/debian/etc/network

Also regenerate your SSH keys once you are logged it to the debian system as given here -- http://www.cyberciti.biz/faq/howto-regenerate-openssh-host-keys/
The default login is root / root and the md5sum of the file is e77e6cfb585c1df7f0f0b0ab6c8796bc



Mittwoch, 12. Dezember 2012

Windows 8 + Samsung NC10

Quelle:
http://www.early-adopter.info/2012/10/windows-8-apps-bei-1024x600-netbook-aufloesung-ausfuehren-so-gehts/



Windows 8 lässt sich auch auf einem Netbook problemlos installieren und ein Großteil des Systems läuft auch einwandfrei. Die neuen Windows 8 Apps (und diese machen das System ja gerade aus) verweigern allerdings den Dienst und können erst gar nicht gestartet werden. Es erscheint lediglich die Meldung:
“Diese App kann nicht geöffnet werden. Die Bildschirmauflösung ist für die Ausführung dieser App zu niedrig.”
Klickt man auf den “Bildschirmauflösung ändern” Link, lässt sich die Auflösung jedoch nicht erhöhen. Klar: 1024x600 ist bereits das Maximum.
Wer seine Windows 8 Apps trotzdem auf dem Netbook ausführen möchte, muss nach folgender Anleitung vorgehen (funktioniert nur bei Intel Grafikchips!).
  1. Startet den Registrierungseditor: Windows-Taste drücken und “regedit” eingeben. Achtung, falsche Änderungen im Registrierungseditor können euer System beschädigen. Beachtet die folgenden Angaben also ganz genau.
  2. Drückt Strg+F um die Suchmaske zu öffnen / alternativ im Menü auf “Bearbeiten” und “Suchen” klicken
  3. Sucht nach “Display1_DownScalingSupported”.
  4. Sobald der Eintrag gefunden wurde, klickt ihr doppelt auf diesen und ändert den Wert von 0 auf 1.
  5. Weitersuchen bis alle Display1_DownScalingSupported Einträge gefunden wurden und auf 1 stehen.
  6. Abschließend den Computer neustarten.
Nach dem Neustart wechselt ihr zum Desktop und wählt per Rechtsklick auf diesen den Punkt “Bildschirmauflösung”. Et voilà: Ab sofort könnt ihr eure Auflösung erhöhen. Ihr solltet diese nun auf den nächst höheren Wert 1024x768 ändern.
Einziger Nachteil:
Da diese neue Auflösung nicht der nativen Auflösung eures Netbooks entspricht, sieht alles etwas gequetscht