Dogsby's Blog – Its a Dogs(by's) Life

Dogsby's Blog – Its a Dogs(by's) Life -

RaspBMC – How to fix “vchiq_lib: Incompatible VCHIQ library” errors

The Raspberry Pi running RaspBMC had entered a continuous cycle of resetting, showing the message “Relax, XBMC will restart shortly”.

Looking in /var/log/syslog the culprit was found:


Mar 11 21:55:24 raspbmc xbmc: vchiq_lib: Incompatible VCHIQ library - driver version 2 (min 2), library version 6 (min 3)
Mar 11 21:55:25 raspbmc xbmc: vchiq_lib: Incompatible VCHIQ library - driver version 2 (min 2), library version 6 (min 3)
Mar 11 21:55:25 raspbmc xbmc: * failed to open vchiq instance

Various suggestions on the forums were tried, including:

rm -rf ~/.xbmc-current – this failed
and
sudo apt-get update – this failed

The problem was resolved using the rpi-update command provided by Hexxeh. The command is not already installed but the process is well documented on the rpi-update GitHub page.

Using SQLite with Google Visualisations and Python

Essentially, this is the example python code taken from Python gviz_api library. The hard coded data section has been replaced with the contents of a sqlite database.  Before starting SQLite must be installed, instructions and the download can be found on the SQLite web site.

Firstly, we need to recreate the hard coded data in a sqlite database, so open up a sqlite session with:

sqlite3 exampledb

Now create a “salaries” table and fill it with the data from the example:

create table salaries (name VARCHAR(10), salary REAL, full_time INTEGER);

insert into salaries values (“Mike”, 10000.0, 1);
insert into salaries values (“Jim”, 800.0, 0);
insert into salaries values (“Alice”, 12500.0, 1);
insert into salaries values (“Bob”, 7000.0, 1);

.quit

The converted example code (see here for the original) that reads from the sqlite database is as follows:

#!/usr/bin/python

import gviz_api
import sqlite3

page_template = """
<html>
  <script src="https://www.google.com/jsapi" type="text/javascript"></script>
  <script>
    google.load('visualization', '1', {packages:['table']});

    google.setOnLoadCallback(drawTable);
    function drawTable() {
      %(jscode)s
      var jscode_table = new google.visualization.Table(document.getElementById('table_div_jscode'));
      jscode_table.draw(jscode_data, {showRowNumber: true});

      var json_table = new google.visualization.Table(document.getElementById('table_div_json'));
      var json_data = new google.visualization.DataTable(%(json)s, 0.6);
      json_table.draw(json_data, {showRowNumber: true});
    }
  </script>
  <body>
    <H1>Table created using ToJSCode</H1>
    <div id="table_div_jscode"></div>
    <H1>Table created using ToJSon</H1>
    <div id="table_div_json"></div>
  </body>
</html>
"""

def main():
    # Don't forget to change this to match the data to be displayed
    description = {"name": ("string", "Name"),
                 "salary": ("number", "Salary"),
                 "full_time": ("boolean", "Full Time Employee")}

    #Open Sqlite database
    conn = sqlite3.connect('exampledb')

    # Loading the description into the gviz_api.DataTable
    data_table = gviz_api.DataTable(description)

    #Select the data using a cursor
    conn.row_factory = sqlite3.Row
    c = conn.cursor()
    c.execute('select * from salaries')

    # Data is a list used to hold dictionaries of salary data
    data =[]
    salary_data = {}

    for r in c.fetchall():
            salary_data = {"name": r['name'], "salary": r['salary'], "full_time": r['full_time']}
            data.append(salary_data)

    #Close the cursor
    c.close()

    #Now load the data retrieved from the database into the data table.
    data_table.LoadData(data)

    # Creating a JavaScript code string
    jscode = data_table.ToJSCode("jscode_data",
                               columns_order=("name", "salary", "full_time"),
                               order_by="salary")
    # Creating a JSon string
    json = data_table.ToJSon(columns_order=("name", "salary", "full_time"),
                           order_by="salary")

    # Putting the JS code and JSon string into the template
    print "Content-type: text/html"
    print
    print page_template % vars()

if __name__ == '__main__':
  main()

Raft Race at St. Rumwolds Church, Bonnington, 2011

Keen rafters and in some cases submariners, will be disappointed to hear that there will be no raft race at St. Rumwolds church this year.

The organisers are taking a well earned year off, but I have been told to listen out for a date for next summer.

London Eye by Night

Having a Merlin Pass allows for spontaneous trips to top attractions without the worry of cost. This is how I came to take a “flight” on the London Eye on a drizzly February evening when most people were looking for shelter. The good news was that the queues were short.

London Eye

London Eye

Despite being dark and wet the views were still amazing and the atmosphere felt more relaxed than on the day time flights.

Parliament

Parliament at night

Charing Cross

Charing Cross

St. Rumwolds Raft Race, 2010

Only 9 months over due, here are my photos of the Great St. Rumwolds Raft Race of 2010.

Raft Race at St. Rumwolds Church, Bonnington, 2010

The annual raft race at St. Rumwolds Church, Bonnington seems to be getting a lot of interest on this site. I could not find details of the day on the internet, so if you want to see the villagers fooling around on the water, then make sure you get down to St. Rumwolds Church, Bonnington for midday on Sunday 20th June.

For last years raft race see the post from 13/06/2009

Gadget Show Live 2010

Gadget Show Live 2010 at the Birmingham NEC was the UK tech event of the year.

3D was the important technology for the show and I tried the offerings from Panasonic, LG and Sony. The Panasonic definitely had the best picture. This was closely followed by LG on which I also played the XBox game Avatar. 3D gaming had always been a gimmick too far for me, but in fact it was a great experience. The picture from Sony was less impressive, the picture had a slight blur which was even more noticeable on the PS3 game Wipeout HD. The internet is awash with reviews of 3D technology, what was really exciting at the show, were the gadgets you don’t normally see.

The Incredible Festo Penguin

The Incredible Festo Penguin

Gadgets like …

The amazing Festo Air Penguins. Huge remote control penguins that literally swim through the air. Festo were also demonstrating the Airmotion Ride, a driving simulator using a racing seat mounted on 6 Festo muscles. I managed to lap the course in 1:28. When I left, the best lap time of the day was 58 seconds.

CatGenie

CatGenie. For people who really hate cleaning up after their cat.

Gadgets like …

Cat Genie, the worlds only self-flushing, self-cleaning cat box. This is quite a piece of engineering and so it should be, as it was designed by a rocket scientist. There was nothing else as unique and useful at the whole show.

Ashford on Google Street View

Ashford has finally made an appearance with Google Street View. Although the Google car was seen in Ashford some 11 months before the images were included in Street View, that cannot be taken as the amount of time it takes to process the data. A lot of updates have occurred all over Kent at the same time.

Its nice to see Ashford shown on a bright sunny day and if you look closely there is no sign of the carnage predicted in the “Shared Space”. In fact there is hardly anyone about.