overriding the low-light switch on a “lidl” solar outdoor lamp

I bought a solar lamp at “LIDL” a few days ago. at €9.99 this was a steal. it even includes a pir movement sensor. (see the LIVARNO LUX LED-Solarstrahler)

sadly, the lamp had an integrated low-light switch: the pir mode would only be active when the light shining on the solar panel was low (night). however, I planned to use the light in a fairly dim environment (carport extension). at the same time I wanted to keep the panel outside (sun!). this wold switch the light on at night only (and not in the late afternoon, when I’d need it inside because there may be enough light shining on the panel, outside.

so I opened the enclosure and looked for a way to remove the low-light sensor circuit. spoiler: you can do this by removing one resistor!

the livarno is a beast!

 

 

 

 

 

 

 

 

after opening the case, unscrew the circuit board. on the back side you will have to remove resistor R2 as shown in the pix (blue circle):

 

as you can see, I kinda “parked” the resistor in case I may want to restore the low-light function at a later point in time.

et voilá: solar powered battery led light with a movement sensor and working just the way you’d expect it to.

22,371 total views, 4 views today

seriously, Apple?

Pages-seriously

Seriously, Apple? Seriously?

You know, people are actually using Pages to get some work done – and you don’t bother with a consistent converter across document versions?

And on top of that, the new Software is perfectly able to read the old document when I manually change the version number in the metadata! That’s BS.

Fuck you Apple!
Seriously.

462 total views, 1 views today

archiving my old floppy disks

the other day i stumbled upon those boxes with the 3.5″ floppy disks from  about 20 years ago (blyme! is it 20 years already?). so i decided to get rid of them. w4floppies-4hile browsing through the disks with the handwritten labels, i remembered all that time that went into the programs, documents and other data on there. i was on the verge of packing them away again, not being able to simply thrash them, when i decided to solve the dilemma once and for all: i would be brave and back up all that was on there!

the first challenge was to find the hardware to read 3.5 floppies: merely two weeks earlier i had thrown away the last pc capable of connecting a floppy drive. sifting through the treasure trove in my dungeon, i unearthed my very first laptop computer: a dell dpi-a 366xt, outfitted with a pentium-II and a multifunction bay for a cd-rom or a floppy drive. the laptop now runs a console version of linux (some outdated ubuntu). the only reason, this machine had not been auctioned off at ebay years ago was my emotional attachment to it….

software

I wanted to put as little effort as necessary into the workflow. however, i was not ready to build myself a full-blown auto ripper like this guy did. in the end, i counted only around 250 floppy disks that i wanted to backup.

i started to hack together a short bash script that will allow for the following tasks:

  • take a description for the current floppy. at best this was something from the label (if it was still readable) or from the floppy’s directory listing.
  • if the user gives no description, the script creates a unique one (the current date and time).
  • maintain and increase a running number for the backup. this comes in handy later on when referencing the label pix (see below)
  • create a target directory on the local hdd with the information above
  • copy all the files from the disk to the target directory
  • create a block image from the floppy and save it in the target directory as well
  • create a text file with the original directory listing
  • record all the errors we’re running into, during the process

after reading dweller’s writeup (in the link above), i saw that he also took a picture of the floppy label. after looking at my disks, i decided to go the same way. labels tend to hold additional information like licenses or serial numbers. an automatic match between label pic and floppy data seemed pretty hard, so i decided to just snap a photo of each of the labels and match them manually afterwards. i set up a camera on a tripod, looking down on the floppies and slightly ahead in order to minimize flash glare on the labels.

the workflow

  • take the floppies out of the boxes and stack them in front of the camera
  • take a photo of the topmost floppy
  • read the label and/or run a directory listing for the description
  • put the floppy into the disk drive and start the script with a floppy name/description on the command line
  • wait until the script finishes doing its magic, praying the gods of magnetic data storage have been merciful to your digital treasures.
  • take the disk out and throw it away
  • GOTO 10

DSC_3821-Heap

pitfalls encountered in the process:

  • the script requires a fair amount of mounting and unmounting of devices. i therefore run it in an su’d shell (sudo -i)
  • some floppies were partially or completely dead. those lead to a non responding or endlessly looping script. In that case … well ^C and move on.
  • the hardware is a standard pc floppy drive. i have a few amiga and old macintosh  formatted floppies. the dell was of course not able to read those. i will keep them for now.

creating the floppy image through the dd utility requires the floppy to be dismounted. this may be a problem when you run the  directory listing in order to grasp an idea on the content. the dir list command therefore includes mounting/dismounting the floppy:

mount /media/floppy0 ; ls -la /media/floppy0 ; umount /media/floppy0

 

using this workflow and the simple script below i was able to harvest the data from about 200 floppy disks, now hogging a moot 240 megabytes on my nas device. this doesn’t include the the label pics with an additional 270 mb.

floppyLabels

so without further ado, here’s ..

the script:

#!/bin/bash
#
#
# Floppy disk copy script
# 2015-08-22 Oliver Huf oli@huf.org
#

## where the floppy images end up
export targetroot="/root/fdstack"
## where your floppy gets mounted to
export fdd=/media/floppy0
## this is where we store the last number
export cntf=cnt.txt

## get, increase and write back running number
export counter=`cat $cntf`
((counter++))
## leading zeroes on the directory names allows for cleaner sorting later on
## padding to 4 digits. YMMV
export lz=`printf "%04d" $counter`
## write the current number to disk:
echo $counter > $cntf

## in case we forget to add a name on the command line, we want at least a time-stamped directory name:
export datetime=`date +%Y-%m-%d_%H-%M`
export dname=$1
if test -z $dname; then
 export dname=$datetime
fi

## adding the padded number to the directory name:
dname=${lz}"_"${dname}
## setting up the directories
export targetdir=$targetroot/$dname
mkdir -p $targetroot
mkdir -p $targetdir
## the directory listing
export dirfile=$targetdir/_FloppyDir.txt
## the error log
export errfile=$targetdir/_FloppyERR.txt

## Say Hello!
echo Diskname= $dname

## aaand they're off..

## we're mounting the floppy read-only. This saves us from an annoying warning, when the floppy is write-protected.
mount -r $fdd

## we output the start timestamp and the dir listing 
echo $datetime > $dirfile
echo "" >> $dirfile
ls -laR $fdd >> $dirfile


## while a simple 'cp' would work, I like to use rsync for this
## option -t retains the original timestamp on the files
## all output (stdout as well as stderr) goes to the errfile
rsync -avtz $fdd/ $targetdir 2>&1 | tee -a $errfile

## in order to create the floppy image, we need to unmount the floppy...
umount $fdd
echo creating image...
dd if=/dev/fd0 of=$targetdir/_Floppy${counter}IMG.DD

## show what we did:
ls -laR $targetdir

echo "Disk $dname successfully copied!"

 

one more thing

depending on the confidentiality of the data, it’s never enough to just trash the floppies. someone could try to salvage the data (and nobody wants to see their ex -spouses pics on 4chan … well … different story).

in order to make sure the data is unusable you should destroy the floppies: you could snip them apart with some scissors, shoot at them … again: YMMV

schuette-1recycling

living in an environmentally aware culture, I wanted to make the best out of it. taking the floppies apart is not too hard. even a nine year-old can do it:

Entsorgung2

the extraction leaves you with a lot of plastics from the casing. some metal from the protective slider, a tiny spring and the center nave and the magnetic film-disc.

the discs can be cut up or fed into a shredder.

 

that’s all.. let me know when you use it or improve on it.

 

1,397 total views, 1 views today

System-Druckdialog in Chrome (Mac OS)

Chrome öffnet beim Drucken einer Webseite, oder eines eingebetteten Dokuments stets seinen eigenen Druckdialog. Seit heute habe ich das Problem, dass der Druckdialog für eingebettete pdf’s unterhalb des Dokumentes geöffnet wird und somit vom Bildschirm verschwindet.

Abhilfe: 1) größeren Monitor verwenden, oder 2) Chrome dazu überreden, den System-Druckdialog zu benutzen. Während Lösung 1 auch nach einem Systemupgrade noch sicher funktioniert, ist Lösung 2 ein wenig günstiger zu haben ;-)Chrome druckt

Folgender Befehl in einem “Terminal” Fenster veranlasst Chrome, seinen eigenen Druck-Dialog nicht zu verwenden:

defaults write com.google.Chrome DisablePrintPreview -bool true

ggfs. Chrome neu starten, und dann… Happy Printing!

1,855 total views, no views today