Monday, January 31, 2022

2021 Christmas Lights

The lights have grown, the controllers are now a Falcon F16v3 (love the Falcon, but high cost is limiting) and two esp8266 home brew controllers running Espixelstick firmware.  The show is in it own vlan, run from a Raspberry Pi running fpp.  All sequencing is done in xlights.

I am about to embark on a new phase of the christmas lights with plans to expand, improve the configuration to reduce maintenance of props and controllers.

A couple of examples of current setup are on youtube


Tuesday, January 1, 2019

Christmas Lights - Part 2

So the bits started to arrive, early on were the first order of WS2812B LED Strip and a 5v power supply.  So I started looking for a way to test them.

These strips had 3 wires - 5v, Ground and Data.  I needed to find a way to send data, and then it hit me - Arduino - so out of the stash I dragged and Arduino Uno.  Found some examples of how to drive the pixels with the FastLED library.  As it had been a while since last using arduino this to a little bit of effort to remember all the steps, but I got a proof of concept up and running.

Next we needed to think about mounting the LED strips on the house.  After a bit of research on auschristmaslighting.com I found that a recommended method was to cable tie the strips to conduit and then mount hte conduit on the house.  This filled in a couple of days buying/measuring/cutting and mounting it on the house.  Then taking the conduit down to mount the lights on the conduit.  Care needs to be taken to not over-tighten the cable ties as you do not want to damage the strip, also you should resist the urge to pull the strip tight along the length of the conduit as this can cause failure.
(the reading I have done since buying strip would indicate that it is less robust than strings of LED and a number of people have had many failures)

During this process I also learned to shorten strips of led and also join strings of LED.  With care you can join it pad to pad like it is from factory.

With all the LED strips joined (total of 600 LEDS) the limitations of the Uno memory with FastLED became apparent.  I flashed the code the an Arduino Mega and this problem was eliminated for now.

During this process the DMX SPI decoders arrived.  So it was time to have a play, the end result was that until I could find time to work with sequencing software and true control of the lights this was a simple answer to drive the lights when they first got up on the house.

The reading continued looking at controllers and software....

Tuesday, December 25, 2018

Christmas Lights - Part 1

Well like a lot of people in the past I have put up a few lights on the house during December, having shifted from a house that had no street frontage this became something I could do.  I have not done this for about 7 years. So the result is a number of strings of lights of various types (incandescent and led), strings, icicles etc that all are driven from wall warts.

A couple of years ago I saw my first sequenced light show on a local house, the idea of computer control, music synchronization etc appealed to me.  I went home did a number in internet searches, realised the cost involved and then parked the idea.

2017 - found the 101 Lighting Manual on https://auschristmaslighting.com/  did some reading.  Great document but still really hard going.

Leap forward to 2018 the 11.11 sale on aliexpress and the lower prices of rgb led strips.  Then the research started properly.  It quickly became apparent that the only way I was going to get anywhere was to buy a few samples products and have a play.
  • 4x 5meters DC5V 30LED/M WS2812b led strip 30IC/M SMD5050 led, IP67 waterproof
  • 5v 40A LED power supply
  • USB to DMX Interface
  • DMX decoder 30 channels RGB LED strip lights driver DMX 512 Dimmer no Plastic Box DC 9V-24V

Anybody that knows anything about the above will know that this is a completely useless combination of parts to do anything, I was heading in two different directions at the same time.  As I read more in the evening I came to this conclusion, as a result one day later the next purchase was.

  • 5M 300Led waterproof RGB led strip light 5050 DC12V 60Leds/M
    (to use with the DMX items above)
  • DC5V ws2812B rgb controller decoder board ic led strip LED SPI Converter
    (to use with the LED strips in the first purchase)

Research continued....

Thursday, November 8, 2012

OCR on Fedora Linux

I just had a problem that I have not dealt with for many years, as most documents I can get quite easily in a soft copy.  The problem occurred as I was provided with a print out of a document that I have to include in a newsletter, and I do not have time to track down the email of the author.  As a result I decided to look for an OCR solution for fedora.

Of course there are a number of packages available in the standard repositories, after reading some reviews on the net I decided to try tesseract, as although it is quite choosy about the input format it generally does a high accuracy job.

yum install tesseract

I used my brother MFC-7420 to scan the document using simple scan in fedora.  The default setting I had were 150dpi for text.

I saved the file as PNG(lossless) and then used gimp to convert it to tiff.

tesseract test.png test

The result was a file test.txt - not the best conversion - a lot of errors where things like 'in' had become 'rn'.  Clearly this was because the letters were running into each other a bit.

I then re-scanned the document at 600 dpi, gimp convert to tiff and tesseract again.  WOW - what a difference.  Apart from a few issues with spacing (not a problem as I need to re-format all files to suit scribus anyway) it has just saved me quite a time typing.

Yeah, another open source package that works!

References:
http://www.dedoimedo.com/computers/linux-ocr.html
http://www.mscs.dal.ca/~selinger/ocr-test/

Thursday, September 15, 2011

Take time to learn Linux/Unix

Warning personal rant follows.

Over the years I have used a number of different flavours of Unix/Linux.  Unix flavour I have used include AIX (IBM), SunOS/Solaris (Was Sun, now Oracle), IRIX (SGI), HPUX (HP), Ultrix (DEC).  Linux flavours include Suse, Mandrake, Mandriva, Redhat, Fedora, DSL, Puppy and many more.

When I first started with AIX, I had come from the world of the Apple Macintosh that was all nice a fluffy - you did most things point and click (except for development).  The shock was large, I had to write some shell scripts and some C programs.  vi was the most unpleasant piece of crap I had ever seen.  So I took a couple of days out and compiled emacs on the AIX machine.  For the next year or so was happy in the world of emacs.

That was of course until a machine had a major issue and I needed to start it in maintenance mode.  Then you get a scaled back OS to fix the machine with, and you guessed it vi was the editor.

Over time I then had to administer other machines with other versions of Unix, some of these had emacs, but all had vi.  It suddenly dawned on me I need to take the time to learn vi.  From that point forward I have never looked back, I would struggle now to drive emacs.

The thing that has become clear to me in the world of computer administration is take the time to learn all the standard tools and the standard ways to do things  - if you rely of having a customised environment you will spend a lot of time  building the custom environment each time you have a new machine to look after, rather than getting on with the job at hand. 

The world is different if your job is that of programmer and you spend all your time on one computer, customise your environment on the machine, to minimise the amount of time doing all the other activities that do not involve writing code.

I expect all aspiring linux/unix sysadmins to learn vi, sed, awk, shell scripting and even perl.  The mark of a true sysadmin is when the GUI starts the first application they run is a terminal to get to the command line, and this is where they spend most their time.  Otherwise you are just a hobbyist (there is nothing wrong with having a hobby), and the title System Administrator becomes devalued.

Also take the time to learn as many tools and technologies as you can.  Each one you learn makes you more valuable to the world of IT, gives you more depth and once you move to jobs where you are given the task to architect a system you have a better understanding of more tools.  Too many systems are built using the wrong tools just because they are the only ones people know.

Sunday, September 11, 2011

After Update, FC15 does not start correctly

From time to time there are various problems after an update that result in the machine not getting all the way to the GUI prompt after an update.  With a little bit of knowledge this becomes a less concerning issue, and can be quite easily fixed.

My most recent experiences of this were a few weeks ago, I ran a yum update - there was a new kernel package installed, but the graphics drivers from rpmfusion had not been released for the kernel.  As a result the machine appear to hang during boot at the point when it should have started X11.

To help with these issues, the first thing I do when I install linux is edit the grub.conf file and change the timeout parameter from 0 to 3.  This puts a 3 second pause in the startup, that allows you to press a key and get a boot menu up, that allows you to select an older kernel to boot.  (You can also change the command line it uses to start the kernel).  When you then have these problems you can simply use this menu to boot the previous kernel.

Even without this, you can switch to another terminal session on your console with CTRL-ALT-F2  (F3, F4...)  CTRL-ALT-F1 will get you back.  You can then log in and get a command line.

When things get really bad you will need to get out you linux install media and boot off that, to get a command line to perform the recovery.

No matter how you do it, once you have a command line you can fix your install.

Most often you can fix it by changing the default boot kernel to the previous one.  Edit the /etc/grub.conf file - the line to edit the default=0,  this is a reference to the first OS entry in the file, to boot using the second one change it to default=1.

Another technique is to use yum to roll back the changes, as described in yum - help I have broken my install

Another thing to consider if you are taking a lot of updates and often have problmes is to change the number of kernels that are allowed to be installed at one time.  This is done in the /etc/yum.conf file, you can change the line installonly_limit=3 to a higher number.  I usually set mine to 5 just to have a bit more buffer when things start to go wrong.

One of the realities of linux is that it is more stable a reliable on slightly older hardware that the drivers have had the bugs ironed out in them.  When you are in the situation I have been lately where some of the hardware I have is only just supported in the latest release then this is when stability issues come to the fore.

Sunday, July 24, 2011

yum - help I have broken my install

Yes it happens from time to time - you do a yum update to get the latest packages for the fedora distribution or you install a new package which breaks your system.  The good news is that there is a record kept of what you have installed/updated.
You can look at the yum.log in /var/log/ which will show you what packages have been updated/erased with yum.

You can also use the yum history command to see what has been happening

yum history
Loaded plugins: langpacks, presto, refresh-packagekit
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
   138 |  <fred>                  | 2011-07-24 11:24 | Update         |   25 EE
   137 | root <root>              | 2011-07-24 11:08 | Downgrade      |   21 EE
   136 | root <root>              | 2011-07-24 11:04 | Downgrade      |    4  
   135 | root <root>              | 2011-07-24 10:36 | Update         |    4  
   134 |  <
fred>                  | 2011-07-23 13:25 | Update         |   55 EE
   133 |  <
fred>                  | 2011-07-17 12:00 | I, U           |   71  
   132 |  <
fred>                  | 2011-07-10 15:06 | Install        |    1  
   131 |  <
fred>                  | 2011-07-10 15:06 | Install        |    1  
   130 |  <
fred>                  | 2011-07-10 15:06 | Install        |    2  

You can then use yum history undo <number> to rollback any update.
You can see that step 136 and 137 are a result of this - I uninstalled the previous two upgrades when trying to debug a startup issue


Other handy commands

yum history info <nnn>
yum history redo <nnn>