Ubuntu 16.10 on the HP Stream 7

Yesterday I finally got sick of windows 10 and installed Ubuntu 16.10 on the HP Stream 7. There are load of instructions out there to install earlier versions, but nothing up to date.

Intel created a world of pain when it introduced 32bit UEFI for 64bit machines, the Stream 7 is one of many Baytrail devices that have this ridiculous boot firmware configuration. Linux distros have completely ignore this boot combination and 3 years after these devices started appearing haven't started to ship the bootia32.efi files on the install media.

Thankfully there are people spinning builds with the correct media and a whole load of drivers to help support silly little Intel convertible tablet things. I used Linuxium's Ubuntu 16.10 build. I flashed it to a USB stick and used my awesome little otg usb hub to connect the install media. I did have to disable secure boot in the bios to get the media to boot.

I needed a separate keyboard for the install, but the touch screen and WiFi worked out of the box. The hardware support is okay, there is no screen brightness control out of the box and suspend is missing. I spent a while setting up the on screen keyboard onboard , it looks like I am going to have to create my own layout to get a split keyboard.

The install was painless, much much easier than the Baytrail device I tried to use ubuntu on in 2014. It does still baffle me that distros don't have boot support for these devices on the installers.


Reading: Nemesis Games

UDP Panel

Congress is coming, 18 days to go!

The whole point of sharing my plans yesterday was to make sure I actually do them. Easiest on the list is to set up the UDP controlled blinkenlights panel. I am going to attach this to my bag or something, there must be cool blinkenlights everywhere I go.

The panel is a 8x8 Addressable RGB pixel array made from the super popular WS2812. Control is a NodeMCU board running micropython, the NodeMCU board is a ESP8266 broken out in a sensible way, it means I can get this cool little project on the network.

I have some pieces of clear acrylic and foam sandwiched together to diffuse the light, all held everything together with some bolts. Here is the small test script I have put together so far:

import machine
import neopixel
import time

pin = machine.Pin(14, machine.Pin.OUT)

np = neopixel.NeoPixel(pin, 64)

skull = [
0,0,1,1,1,1,1,0,
0,1,1,1,1,1,1,1,
1,0,0,1,0,0,1,1,
1,0,0,1,0,0,1,1,
0,1,1,0,1,1,1,0,
0,0,0,1,1,1,0,0,
0,0,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,]

while True:
    colour = uos.urandom(3)

    for x in range(len(skull)):
        if skull[x]:
            np[x] = colour

    np.write()
    time.sleep(1)

I am going to accept any 8x8 RGB frame (any 192 byte packet) that is sent and take any other shorter packet and use it to set the colour on the skull. I will include a timeout to change the colour so it isn't just a static panel.

If I find a load of spare time between the sofa cushions I will throw together a web interface.


Reading: Virtual Light

Congress Plans

The most important twitter account counts down the remaining days to congress. Today there are just 19 days left until a hole opens in the universe and excellent people appear to keep the base going.

Ignoring the large amount of realwork™ I have to do, there is a lot of important stuff to be prepared for congress. I have tried to avoid committing to doing anything on my holiday, but I plan to bring the following three ideas:

  • RGB Pixel Display
    • I have a 8x8 neopixel display with a small case. I am planning to make it controllable via UDP packets and leave it on the open network for other people to find and play with.
  • Slow TV
    • Multicast video feed showing relaxing slow paced video. I have a lot of driving from my trip to Iceland. I will include some other feeds I have picked up in the last few month. We might include a radio station a long side, but that bit hasn't been figured out yet.
  • Some sort of display showing:
    • rainbowstream
    • cool stuff pulled of the open wifi, images, password wall of sheep style.

Reading: Virtual Light

Hacktoberfest Pay off

I looked up reverse geocoding with openstreetmap and found a keyless api. Reverse geocoding is the process of turning a location as a latitude and longitude into a place name. This is handy for creating my daily post footer, I want to have a script that will take in a lat/lng pair and output the full location name and weather with a map link.

I can use the kindly provided nominatim reverse geocoding URI and a bit of python. I guess openstreetmap thinks I am in a weird parallel UK that is made up of states, that is easy to deal with thankfully.

base_url = "http://nominatim.openstreetmap.org/reverse?format=json&lat={}&lon={}&zoom=18&addressdetails=1"
uri = base_url.format(lat, lng)

fp = urllib.request.urlopen(uri)
response = fp.read()

location = json.loads(response.decode("utf8"))
fp.close()

city = location['address']['city']
country = location['address']['country']

if country == "UK" or country == "US":
    country = location['address']['state']

return {'country':country, 'city':city}

I end up with a single script for generating the location/weather block. The script will default my 'work' location or it will try and format a lat/lng out of any arguments passed in.

#!/usr/bin/env python3.5

import forecastio
import pprint
import urllib.request
import json 
import sys

api_key = "yer_key_here_bawbag"
lat = 57.168
lng = -2.1055

def forwardweather(lat, lng):
    forecast = forecastio.load_forecast(api_key, lat, lng)

    weather = forecast.daily().data[0]

    temperatureMax = int(weather.apparentTemperatureMax)
    temperatureMin = int(weather.apparentTemperatureMin)
    summary = weather.summary

    return {'temperature':temperatureMax, 'summary':summary}

def reversegeocode(lat, lng):
    base_url = "http://nominatim.openstreetmap.org/reverse?format=json&lat={}&lon={}&zoom=18&addressdetails=1"
    uri = base_url.format(lat, lng)

    fp = urllib.request.urlopen(uri)
    response = fp.read()

    location = json.loads(response.decode("utf8"))
    fp.close()

    city = location['address']['city']
    country = location['address']['country']

    if country == "UK" or country == "US":
        country = location['address']['state']

    return {'country':country, 'city':city}

if __name__ == "__main__":
    if len(sys.argv) == 2:
        loc = sys.argv[1].split(',') 
        if len(loc) != 2:
            exit()
        lat = float(loc[0])
        lng = float(loc[1])
    if len(sys.argv) == 3:
        lat = float(sys.argv[1])
        lng = float(sys.argv[2])

    print("Getting weather for: {}, {}\n\n".format(lat, lng))

    weather = forwardweather(lat, lng)
    location = reversegeocode(lat, lng)

    base_url = "http://www.openstreetmap.org/search?query={}%2C%20{}"
    uri = base_url.format(lat, lng)

    print("[{}, {}][0]: {}°C, {}".format(location['city'], location['country'], 
        weather['temperature'], weather['summary']))
    print("\n[0]: {}".format(uri))

Reading: Virtual Light

Blogs about blogging

I am still playing with other fields to stick onto the daily post. So far I have been sticking on a reading field that can sort of track how I am progressing with books. I want to include a fuzzy location and the state of the weather around me, obviously I know where I am looking back it will be interesting to me having a record of where I was when I posted.

I have tried with outside , reality , being and a load of other vague terms, writing this out those all look ridiculous. Now I have tried just letting the info hang there instead, my current lat/long converted to a place name with a link to a map, followed by the weather.


Reading: Cibola Burn, Virtual Light