Raspberry PI Zero W as Chromecast

So one of the thing which I tried out was to see if the PI Zero can handle video streaming to our TV.

In order to setup the Raspberry PI Zero W as Chromecast, I followed the series of 7 videos below and plugged it into our large TV. However the result was unusable. The video did only play for a second or two before the whole thing stopped and tried to continue playing.

This is not too surprising considering that the PI Zero has only a single core 1GHz CPU while the instructions assume the PI 2 or 3 which has a quad core CPU to handle the stress.

Step 1 : Raspbian Jessie Lite Install Guide
https://youtu.be/R9UDL1JxP7I

Step 2: Raspbian Jessie Lite wifi config
https://youtu.be/N2ZjrBC2bv0

Step 3 : Raspbian update upgrade omxplayer
https://youtu.be/JV7nbAsQKO0

Step 4 : Install youtube download video and python
https://youtu.be/ukujbwn7XiQ

Step 5 : Raspbian Jessie Lite Golang
https://youtu.be/gVhMYRaKGXU

Step 6 : Raspberry pi as Youtube TV
https://youtu.be/dWjfkwz6MWk

Please feel free to sign up or follow my home made hardware projects here …

Loading

AstraNOS for the stars

So I have not written anything about AstraNOS, my web desktop, for a while. That was for a good reason, as I was busy doing a batch of other things the past months.

However I have never give up on it and I am still using it heavily all the time to store pics, ideas, notes, videos and other things.

Progress

I recently fixed my AWS instance and re-enabled Conference, my WebRTC based video conferencing tool. Also since I always have a multitude of windows open I added a virtual desktop feature to the mix.

 

The number of virtual desktops is currently hardcoded to 4 however I believe that this will be plenty. The current version of AstraNOS is now grown up enough to handle a lot of the everyday tasks. It provides a central place online to -feel-at-home.

Feel free to sign up for a free account <a href=”https://www.AstraNOS.org/virtual”>Here</a>, connect your DropBox account and link some youtube videos to your folders.

Raspberry PI Video Doorbell

I recently went to a Microcenter near by and bought an Raspberry PI Zero W

Raspberry Pi Zero W
Raspberry Pi Zero W

For $5,- I could simply not resist. Not only is this a full blown computer with micro-hdmi out, it also can be used to connect other hardware to it with ease. The connector on the right is there to connect a camera to the PI Zero.
Well, after installing raspbian onto a micro-SD card, I went ahead and bought a camera as open-box item for only $12,- and got the combo to work in no time flat.

That is all well and good but what can you truly do with this hardware ? The answer for me is/was

Home Automation.

I have looked into

Ring Video Doorbell
Ring Video Doorbell

However my issue was not so much the price of these devices, after all it takes a lot of effort and money to develop a great product, it was the physical shape and size which made any of the available products unusabe for me.

So I thought I would simply add a few pieces together and create my own Video Doorbell from scratch using the PI and a few other software and hardware parts, which can be found online.

It is of course very helpful, that there is such a huge community behind the PI and that almost everything you can come up with has been attempted before. So googling around I found a bunch of sites with similar goals, like this one here.

Raspberry Pi Security System

Here are the next steps to get from idea to finished project.

  1. Building the chassis ( and BOM )
  2. Connecting the camera
  3. Adding microphone and speaker
  4. Installing a notification server ( pushd )
  5. Writing a cross platform app ( iOS / Android )
  6. Connecting all the pieces

Feel free to subscribe to my blog

Loading

DyGraphs Pie Chart Plotter

DyGraphs is a decent Javascript library to plot time series data points.

DyGraphs plotter
DyGrpahs

I chose DyGraphs a long time ago mainly due to its small footprint of 123530 bytes for dygraph.2.0.0.min.js

One of the things it allows you to do now is to add a different plotter algorithm to plot data. One such example can be found on the demo page is that of a BarChart plotter. If you look at the code it is a fairly small addition.

One of the possible plots missing though is a PieChart. It happened that I needed a PieChart for my project and I did not want to switch to E.g. ChartJS [ Release 2.5.0 ] so I wrote my own little PieChart function for DyGraphs.

function pieChartPlotter ( e ) {
        var ctx  = e.drawingContext;
        var self = e.dygraph.user_attrs_.myCtx;
        var itm, nme, data = self._pieData;
        if ( ! data )  {
          var t, i, y, all, total = 0;
          data = {};
          all = e.allSeriesPoints; // array of array
          for ( t=0; t

The one thing you will see in this code is that I calculate the required PieChart data once and then check for its existance each time I enter this function. This is requried beause DyGraph does currently not call the plotter function in a context but rather in the global browser context ( I.e. the this object is the browser Window ).

So instead I ‘added’ ( read hacked ) myCtx to the dygraphs – plotter options to gain access to my local JavaScript object where I buffer the _pieData.

DyGraphs Pie Chart plotter
DyGraphs Pie Chart plotter

While this may not be the nicest pie chart around, it is a small, basic function which can be expanded on fairly easily.

Addendum: Here is how to use this code

    this._options  = {
      labels: ["Date","Count"],
      legend: 'always',
      title:  "  ",
      myCtx: this,
      animatedZooms: true,
      hideOverlayOnMouseOut: false,
      stackedGraph: false,
      clickCallback    : this.onGraphClicked,
      showRangeSelector: true,
      underlayCallback : this.highlightWeekend,
      legendFormatter  : this.legendFormatter,
      highlightSeriesOpts : {
        strokeWidth: 3,
        strokeBorderWidth: 1,
        highlightCircleSize: 5
      }
    };
    this._chart = new Dygraph ( dom, this._data.data, this._options );
    ...