Semi-Live Image (IR)

...auto-refresh ... Upgrade in progress....for more info check out posts...

Thursday, 31 December 2015

Pi-Birdies! Part VII - Priorities

...what can I say....

 
 
I spent some time writing a python code for streaming to a server (which I shall post as soon as it is completed).
 
And then I played around with the desktop settings of Raspian to be more "spacey"....for my Feng Shui and well for a myriad of other reasons, including: should I forget what it is that I do professionally, I now have to only turn on my Pi and stare at the desktop in oblivious ignorance! Soooo simple! :-)
 
And this what I have come up with so far in terms of the nesting box. I will not refine it at the moment and will play it by ear as I construct it. I have to add some inner structure to it as I will be making both the front and sides "openable".
 
 
 
Oh!...and....a happy and serene 2016 to all!

Sunday, 27 December 2015

Pi-Birdies! Part VI - Technobabbel

Trying to write a python programme to stream to a server and hence am reading up on network services, protocols, sockets and the likes and then trying to explain this to someone whilst myself trying to understand why it is not working..... what ensues is definitely technobabbel (https://en.wikipedia.org/wiki/Technobabble) on my part.... that is what it feels like at any rate!

Someone remarked: "sockets are small socks"....

Pi-Birdies! Part V - parts which are still missing

Just a few quick and rough annotations as to things that I wish to add:

Camera Multiplexer - for more than one camera (http://www.ivmech.com/)
very much like so: https://hackaday.io/project/2847-ivport-raspberry-pi-camera-module-multiplexer, requiring https://github.com/ivmech/ivport

GPS - ok just a gimmick.... because I can for the moment - bringing birdies and space together is a thrilling idea - but mostly for the future when nesting boxes will populate the woods and scientists need the GPS position of the boxes. At any rate this is what I intend to do: https://learn.adafruit.com/downloads/pdf/adafruit-ultimate-gps-on-the-raspberry-pi.pdf

Bluetooth - ...as already mentioned before

Sensors - of various types...

Pi-Birdies! Part IV - RPi-Cam-Web-Interface and JUICE: ESA's JUpiter ICy moons Explorer

And another thing....
I discovered this in my attempt to avoid programming a whole web-interface! Open-source is indeed something quite fantastic.

It is called the RPi-Cam-Web-Interface and it is great.


So all I do is:
ifconfig .... check out the ip address ... http://192.168.1.4/ ... and voila' ...

...off to Jupiter and its moons....

 
..which brings to mind ESA's JUICE Mission http://sci.esa.int/juice/
 
The mission "The JUpiter ICy moons Explorer (JUICE) will perform detailed investigations of Jupiter and its system in all their inter-relations and complexity with particular emphasis on Ganymede as a planetary body and potential habitat. Investigations of Europa and Callisto would complete a comparative picture of the Galilean moons." [http://sci.esa.int/juice/50068-science-objectives/]
 
"The JUICE mission will address two themes of ESA's Cosmic Vision programme: What are the conditions for planet formation and emergence of life? and How does the Solar System work?"
 
credit: ESA - [http://sci.esa.int/juice/50181-exploring-the-jovian-system/]


I am quite exicted about JUICE and in addition to the wonders of space science it also reminds me of "Farmer in the Sky"...
 
Fits50.jpg
 
...a 1950 science fiction novel by Robert A. Heinlein about a teenaged boy who emigrates with his family to Jupiter's moon Ganymede... [https://en.wikipedia.org/wiki/Farmer_in_the_Sky]).

...for, as an esteemed colleague pointed out to me this year at the IAC, we are Solarians....


Pi-Birdies! Part III - Pi-Python Knowledge (camera, sensors and ftp)

I feel like sharing some acquired, though by no means the finest of, pi-phython-knowledge for those that like myself need such a thing...
 
There are various parts to this code, which I again wish to precise, is by no means a finished product:
Part (1) - ftp connection
Part (2) - camera activation
Part (3) - sensory information retrieval
Part (4) - overlaying sensory information on camera stream
Part (5) - capture image
Part (6) - upload image to ftp server

----------------------------------------------------------
# -*- coding: utf-8 -*-
import io
import time
import picamera

# Part (1)
# import ftp library
import ftplib #sufficient actually to import only the class FTP
meinftp = ftplib.FTP("ftp.XXX.XXX.de","username","pwd") #important to only specify the ftp main address and not a subdirectory
directory = '/webspace/httpdocs/bought-the-pasta/videos/livestream/' #intended ftp-directory
meinftp.cwd(directory)

#local upload-directory
directory_local='/home/pi/Desktop/' #/home/pi/1-NistkastenProjekt/timelapse/
print "ftp: So sieht der Inhalt von ",directory, " vor dem Upload aus:"
print

meinftp.retrlines('LIST')

#my_stream = io.BytesIO()

# Part (2)
with picamera.PiCamera() as camera:

        #(this here should all be indented)
        # camera settings
        camera.resolution = (1024,768)
        camera.sharpness = 0
        camera.contrast = 0
        camera.brightness = 50
        camera.saturation = 0
        camera.ISO = 0
        camera.video_stabilization = False
        camera.exposure_compensation = 0
        camera.exposure_mode = 'auto'
        camera.meter_mode = 'average'
        camera.awb_mode = 'auto'
        camera.image_effect = 'none'
        camera.color_effects = None
        camera.rotation = 0
        camera.hflip = False
        camera.vflip = False
        camera.crop = (0.0, 0.0, 1.0, 1.0)

        camera.start_preview()

        # Part (3)
        from sense_hat import SenseHat
        sense = SenseHat()
        #print("check")

        while True:
         #(again indent)
                t = sense.get_temperature()
                p = sense.get_pressure()
                h = sense.get_humidity()
                t = round(t, 1)
                p = round(p, 1)
                h = round(h, 1)

                #print("Temp [C] = %s, Press =%s, Humidity =%s" % (t,p,h))

                #sense.show_message(" ", scroll_speed=0.1)
                ttext = str(t)
                ptext = str(p)
                htext = str(h)
       
                fulltext = "Temp: " + ttext + " [C]; Press: " + ptext + "; Hum: " + htext
                fulltext = "Pi-Birdies! " + fulltext
                #print(fulltext)

                # Part (4)

                camera.annotate_text = fulltext #("Pi-Birdies!""temp:",(ttext,ptext,htext))

                 # Part (5)       

                time.sleep(2)
                camera.capture(my_stream,'jpeg')
                camera.capture('/home/pi/Desktop/SnapshotStream000.jpg')
                #camera.stop_preview()

                filename = 'SnapshotStream000.jpg'


                print
                print 'Location and name of the local file: ' + directory_local + filename
                print

                 # Part (6) 

                file = open(directory_local+filename, 'rb') #reading mode

                print 'Upload: ftp-Server: ' + directory + filename

                #'STOR ' the required ftp command


                meinftp.storbinary('Stor '+filename, file)

                print "ftp: content of directory ",directory, " after upload:"
                print

                meinftp.retrlines('LIST')

                print
                print 'Die lokale Datei ' + directory_local+filename +' wird geschlossen.'
                file.close()

                #print meinftp.quit() #terminate FTP-connection
                #print
                #print 'Die FTP-connection terminated.'

Pi-Birdies! Part II - Pi-Nest 1st Design Attempt

Pi-Nest for the Pi-Birdies - Design @ 01:12 on the 27th of December...


Saturday, 26 December 2015

Pi-Birdies!...and more

2015 is coming to an end....an amazing year with several surprises and rollercoaster rides! I loved every bit.

My nesting box activities did however "suffer" from my other "adventures", but!....I had time to reflect on a few modification which I intent to make.

I wish to construct a nesting box which is more modular. More easily adaptable to configuration changes and adjustments I might have to make to the optical unit as the seasons progress.

The second thing I wish to implement is a simple, one-off solution for all the nerdiness I wish to install in the nesting boxes. By this I mean pressure sensors, temperature sensors, humidity sensors and the likes. The solutions I had so far, for lack of time, and for lack of me being a dedicated electronics person, were improvised solution requiring multiple platforms. One for the cameras, one for the temperature sensors, one for the lighting: a high maintenance configuration which, in case of lack of time, ended up suffering because I ended up dedicating my little spare time to other things.

And this is where the pi-ness comes in!

I eyed the raspberry pi (https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) as my solution!

It struck me a near-perfect as can be for my needs....including the non-negligible fact that it is open-source, allowing me to profit from all the genial minds out there improving the platform for the most varied of applications.

So this is how I now plan to turn the "birdies" into "pi-birdies".....

I decided to indulge into this endevour on the 12th of Decemeber. Ordered everything I thought I might need the same day and by the 18th (which was my last day at home prior to a weekend with my PhD Students and then some work-related travel) I had all I needed.

And this is how it continued....

Step 1: take picture....and put the basics together...

 
Step 2: install NOOBS from micro SD card...

 
 
Step 3: excitement at booting and ensuing check that space activities had not continued without me in the meantime...

 
Step 4: first light....

 
Step 5: first senses....

 
Step 5: IR vision test...



And then, and then I killed the internet.

I am only kidding, as the only thing I did manage to do was kill internet on my pi.
The thing I want to do is have a nesting box that can transmit information - optical and sensory - via wifi but at the same time be an isolated, stand-alone system. A curious soul passing by can then just tune in and check what is happening inside.

So I wanted to set-up a point-to-point wifi connection, but I kind of got stuck as I wish the two things to be functional in parallel. Now, I might sound like I know what I am talking about, but I don't. So for now I am going to leave things as they are and add bluetooth capability and then decide at a later stage, as.....

...my main priority is to have an optical  stream with overlayed sensory information ...very much like this:


And this is the current state of affairs at the Pi-Nest!

As for other thoughts.... this gave me something to chew on:
"It's the way a man chooses to limit himself that determines his character. A man without habits, consistency, redundency - and hence boredom - is not human. He's insane." [The Dice Man, George Cockcroft].


Sunday, 21 June 2015

Amazingness....!

I know perfectly well, that this should be a blog about birdies....

...but when amazingness hits you, it just hits you, and overwhelmingness ensues.

And it's been a week of amazingness and overwhelmingness and utter coolness.

Enabling is just amazing.

Ok, that is all I have to say and processed...for now.

Saturday, 13 June 2015

Emptiness

Sadly the hatchlings left while I was away, so unfortunately I missed it. 

I however think that everything went well. The protective metal grating that I had placed before leaving was still intact. So I believe that the cats did not attempt to catch the hatchlings.

I had put the metal grating in place as I had observed multiple times that two cats, attracted by the incessant chirping, more or less impatiently sat underneath the nesting box looking up.

I cleared out the nesting box this morning. There were no unhatched eggs. Maybe, as it is still quite early in the season, a new pair will come and nest. I am, however not very optimistic, as there are just toooo many cats.

When there are several nesting options available, then why take the worst one possible?!

.....Options. It is funny how given no options lack of freedom is regretted, complaints follow. But, when given options, hell breaks loose and “man” feels truly lost. 

It would thus seem that those famous "boxes" are not just limiting but seen as protective.

Why? Is not the ideal situation one in which one can create options for one’s self and for others, for the future?

Sunday, 31 May 2015

Sere 'n Geti

Many many years ago in a land far far away there lived a lonely spider. Sere was his name. He spent his days waiting and waiting. Waiting hungrily under the hot sun hoping for a dizzy fly to come by. 

Now, Sere was an intelligent spider and he tried many tricks and moved to many spots always hoping for a dizzy fly: tree tops and rock cracks, earth mounds and shrub leaves, but no flies came by and he grew hungrier and hungrier.


The land was arid and the sun was hot and Sere did not like to sit under the burning sun. But the land Sere had known his lifelong only knew sun and so Sere looked for shade wherever he could.


One day as he crouched and waited he started wondering if there was anything other than sun, perhaps in another land. Something that brought coolness like the night did. And the more he thought the more he grew convinced that there must be. Rain he called it. But as he named it he also realized that if this rain would always fall he, Sere the fly-spider, would be even hungrier because dizzy flies don't fly when it rains.


"Hmmm", he thought, "if I could eat grass and have long legs to jump from one leaf of grass to the other then I would be a happy jumpy spider."


That day when the sun disappeared behind the horizon and Sere fell asleep, rain began to fall and wet the land and the land began to change. Grass began to grow where there had been only dust. And Sere too began to change - his legs, his eyes, his body.


The morning came and as Sere woke up he smelt the wet earth and crawling hungrily from under the rocks he looked around - he was in the midst of a sea of green! He was hungry and began to eat when all of a sudden he realized that he, a fly-spider, was eating grass! He stopped chewing, a little leaf hanging from his  jaw, examined himself and spitting out the little leaf he cried "I have lost two legs!". Panic seized him and up he jumped! Higher and higher he rose and then faster and faster he fell. "Help" he screamed - but then nothing happened. He was safe on another leaf of grass, close to a grasshopper.


"I have lost two legs!" he screamed at the grasshopper.


"No you haven't", replied the grasshopper.


"But I should have eight legs!", cried Sere.


"You've been eating too much weed" replied the grasshopper, "spiders have eight legs and you're a grasshopper. Now let me be, I'm hungry." And with that the grasshopper jumped away.


A grasshopper? I'm a grasshopper? Sere looked again at himself and indeed he was a grasshopper. A grasshopper! "I need a new name" he thought, "Hmmm...Geti, yes! I will be Geti the grasshopper!"


And so it came to be that in the land of endless sun and endless rain, with each change of season, Sere the spider became Geti the grasshopper and the land came to be known as Sere 'n Geti.




Tanzania...


Saturday, 30 May 2015

A week after first light

A week has passed since the hatchlings have "seen" first light (they actually hatch with closed eyes). I was away the whole week and upon my return I was delighted to discover that the chirping from the nesting box has significantly increased.  From the live-feed I can distinguish 4 or 5, which is not very many given that Blue Tits generally lay in the order of 10 eggs.

I love to just sit outside and watch as the busy parents fly in and out and to hear an outburst of high-pitched chirping every time. 

I love it so much that I sometime sneak up to the nesting box and tap gently on it to trigger those hungry music boxes.

Today, as I was looking at the live stream I was trying to determine whether I will be home when they leave the nest in approximately two weeks. I might be lucky. It truly is the best part of it all: to see the little ones leave the nest. 

And it is nice and amazing how it is all more or less pre-programmed. This in turn gives it all an irrefutable sense of certainty, equally justified and unjustified. The uninvolved observer. The bird's eye view.

Today I was told that at my age life is good. As the lovely person that was telling me is more than a few years older, I for a second wondered if those words spoken to me were triggered by the same “bird's eye view” and associated tranquillity. 

To have both, to master both youth and this irrefutably experience-given, though not necessarily legitimate, tranquillity while pushing beyond all experience-conceived boundaries…… to master youth of the mind knowing that it will never abandon you and thus achieve the tranquillity necessary to do exactly that which is necessary at the precise moment when it is needed…. 

...a challenge for all ages alike.

Saturday, 23 May 2015

Life outside of the eggshells has begun...

The eggs have hatched!

This morning I peeked at the video and noticed the female leaving. Shortly afterwards the male came in with a tiny tiny worm in its beak.

How did I figure out it was the male? Because he behaved like all males when the eggs have just hatched and they have to interact with the hatchlings for the first time. It is really amazing and amusing. The behavioral change of the males over the first few days after hatching is truly fascinating.

Generally, early after hatching, the female spends most of the day warming the small hatchlings (they have no way of controlling their temperature and keeping warm), so when the male comes in, he gives her the food he has brought in for the hatchlings and she then proceeds to feed them.
So, when, for the first time the male comes in and there is no female, the male is taken aback and looks like he does not quite know what to do. After a few seconds of hesitation and puzzlement, he approaches the nest and feeds the hatchlings himself.

Gradually the male gets used to interacting with the hatchlings himself: calls to them to let them know that he is there with food and up pop the big heads with beaks wide open.

And after he has done this a couple of times he is then reluctant to give the food to the female and wants to feed the hatchlings himself. This is what I have observed in the last couple of years.

And it fascinates me every time.

Thursday, 21 May 2015

Super Partes Interventionism

I’m still trying to figure out if “super partes interventionism” is an oxymoron or not.

Where does it come from? Well, I invented it. Not in absolute terms, but I just came up with it for myself.
I arrived home last night to find three cats in my garden. A gray one, an orange one, and the black one. The black one. He is one special fellow. To me he is anyway. It is a pleasure to be greeted by him. The instant he sees me, he stops all activity, and with his tail straight up in the air, he runs towards me meowing quite incessantly, to then throw himself at my feet belly in the air so that I may stoop down and pet him. And as I gently caress him, he closes his eyes and remains quite still, closes his paws and looks like he could fall asleep any instant. What fascinates me is that I don’t feed him.
I used to have a black cat when I was a child, and she was very much the same. She was at my grandmother’s place and whenever I used to visit and she heard my name being called, she would suddenly appear from out of nowhere and rush into the house so that child and cat could indulge in a captivated and silent exchange of affection.
Anyway, I obviously have a dilemma: cat love on the one side - bird protection on the other. And the two just don’t mix. Uhm.

The dilemma is not acute right this moment. The female Blue Tit is still brooding, so there is not much visible activity going on. Inside the box she sits there, turns the eyes at regular intervals, changes position. But it is all very silent. It all passes very much unobserved even for the most attentive of cat eyes.
The question is what happens when things start “living”.

I will need to find a solution. Protect the nest somehow from the outside.

Tuesday, 12 May 2015

Happiness in shades of blue....

Ok, so I did not post in, well.....absolutely ages and my last attempt was a teaser really, cos I never followed through. 

Yes, I've been busy – own choice of course. And it's been a fantastic year of wonderful new experiences. Not sure I could ever describe in words what it’s been like. It's been inspirational and adventurous, inebriating and challenging on so many levels….and I’ve loved every minute of it….the incredible highs and the few lows. Lows, which, however, I must say can only be called “low” because the highs have been so intoxicatingly high. Let me just say: I have been lucky in all possible ways, and so I have seized the day, the hour, the minute,… because, well who know how long things last….I am one immensly lucky happy bunny.

That is the best description I can provide for what has kept me away from birdies and the likes. 

But the birdies have not let me down, and again I have visitors this year. 

In the old wood-concrete box (better for so many reasons admittedly) it’s Blue Tits. The female is brooding. I have no idea how many eggs there are. It’s difficult to see as the nest is not a Blue Tit one, but rather one of Eurasian Tree Sparrows. The Eurasian Tree Sparrows probably gave up after they realised that the 4-legged-enemy-density has grown exponentially since last year. Yes, I am talking about cats. Unfortunately there is not much I can do.

I have not seen the male Blue Tit come to feed the female yet. Hopefully they will both survive the new unwanted (by me) perils of my garden. 

Even this aspect of life and its unstoppable drive fascinates me beyond description:
Two little tiny blue and yellow birdies, 12.5 grams at most, against a horde of feline well-fed, down right fat, predatorial-out-of-boredom killers. And yet, they come and breed, bring me joy, and life continues hopeful, full of energy, and chirpy - beautiful in its ferocious drive and in its complex simplicity.

My new nesting box remains untouched by birds. I guess I will have to start building wood-concrete nests if this trend continues….which is a real shame, as I am kind of optimising my design for ease of access, for camera replacements, etc. Oh well!


Instead, there is a little hornet’s nest in it. Last year the hornets were killed by some kind of bird. I hope this year brings better luck. I’d love to contribute to keeping the species going.

Please don't begrudge me if I never post again ;-)

I promise to do my best to share what is next to come. Life for our two little friends and the even more little ones to come will not be an easy one.