Wednesday, October 22, 2014

Onki 0.0.3 released

Where did the days go, already 22 days since 0.0.2 docked in the Harbour. Well, anyway, I just uploaded 0.0.3 to Harbour ja OpenRepos.

Whats new you ask ? Well, plenty:
  • Loosing sync with the device should be fixed now
  • Audio settings on a separate page, the basic Bass and Treble, Center and Subwoofer volume adjustments. Also Music Optimizer toggler.
  • Preliminary zones support. Input selection only for now, need to do some more internal re-working for this to work ok. Oh and only Zone 2 has been tested, so if you happen to have one of those more expensive that support 3 or 4 zones, please let me know if it works or not.
  • And that means preliminary, you can select a source for other zones, but not much else.
  • Tuner presets, yay :)
  • Device is asked for supported inputs and zones and if it knows how tell use that then we will use them
  • Remorse timer for Power-off button
  • Optional autoconnect on start (if only one device is found by device discovery)

Tuner presets!
Known bugs/features missing:
  • No way to power-off zones 2,3,4
  • Sometimes query for inputs,zones and presets fails. Re-connect and it should work.

Enjoy!

Friday, October 17, 2014

Raspberry Pi doing i2c LCD display in C++

I'm working on a Raspberry Pi project that needs to be running headless but still be able to communicate with the outside world in some way. We are currently using a simple Red (error), Yellow (waiting for something), Green (Ok) (+blinking) to inform the user of various conditions (you can see them in the picture).

For most features that seem to be ok, but we are thinking about having somekind of display for a bit more details. A cheap 16x1/16x2 display would work quite nicely I think.

Today inspiration hit me to look into that a bit more. I had a 16x1 LCD laying around and a PCF8574T i2c I/O-expander backpack. Wired it up to the Raspberry Pi and started to look for some (proper aka C++) code. No luck there. Just some silly python this and python that. meh.
Well, it works fine on the Arduino.. and that is C++.. hmm, let's port it to plain Linux i2c interface (well, ok, wiringPi i2c wrappers). And so I did.

Here you go:

Raspberry Pi controlling LCD display with i2c in C++

I will do a bit cleanup and then code will be up on github.

You can get LCDs and i2c backpacks from Amazon:

Wednesday, October 15, 2014

Some Kotibussi progress and backend thoughts

The first Kotibussi demo used the very basic ENC28J60 Ethernet controller based ethernet shield. That means the TCP/IP stack had to be run on the Arduino itself, taking up a lot of precious memory. I'm moving it now over to a WizNet W5200 based shield that takes care of the TCP/IP stack in hardware for me, makes a ton of difference in the amount of memory I now have to play with.

Some ideas are to have an integrated RTC and some way to configure the device without re-flashing, aka some control buttons and menu system, the added memory helps a ton in this.

And the backend. Luckily there is a standard for M2M transport data, Siri, unfortunately it is not well suited for low-bandwidth/low-speed/low-memory devices as it is XML based and extremely verbose. And it is also pull based so I would need to poll the data and that is just stupid.

So a Siri2MQTT gateway needs to be created, some minor progress in there, just a skeleton for now but  getting there.

Then there is the minor issue that Turku does not provide any data yet (no timetable, they hope to get it open in 2015), luckily some cities in Finland aren't that behind in progress so I will use Tampere Public Transport SIRI service for now.


Monday, October 06, 2014

Zone handling in Onkyo ISCP

Is kinda annoying.

My device has 2 zones, Master and Zone 2. Onkyo devices can have up to four zones. You can ask the device if the zones are powered, and it can say 01 for powered, 00 if off and N/A if the zone does not exist. So probing what zones are available should be just a matter of asking the power information, and ignore zones that say N/A, right ?

Nope, my 2 zone device answers for Zone 3 with a 00 and for Zone 4 N/A. Sigh...

Oh and no, I can't turn on Zone 3, it just answers with 00. And just for fun I plugged in a USB Sound card as I noticed the firmware contains snd-usb-audio.ko module, but no, no such luck, no Zone 3. Oh, yes, your Onyko runs Linux in case you didn't know that yet.

Tuesday, September 30, 2014

KotiBussi, 3 place and shared challenge price

Related to the previous post in Finnish. It is a description of my entry to the regional app4finland competition, a simple home Buss information display concept.

The idea is to have realtime display of buss(es) on a simple display so you know when to run to the buss-stop. The idea came when I started to think about what is the most annoying thing with using public transport here in my home city of Turku. I personally hate to stand at the buss-stop and wonder where the hell is it, or did it go already ? And at this time there are just a handfull of stops with information displays (that don't even display correct information, last time I needed to take a local buss).

Yes, you can get that from an app or web site. But not everyone has a smartphone. And how much time does it take to first dig the from somewhere, start the app, wait for it to load, then find the particular buss/buss-stop, etc (but the backend could be used for a mobile app, so that is not ruled out)

And this could be used not only at home, but for example at the work place, stores and hospitals. Well, you get the picture.

And instead of having the device polling the information, it uses MQTT to passively listen for changes and that means it does not need much of processing power, a basic arduino is just fine.

The backend part is still to be written, basically a SIRI to MQTT gateway.

Oh, the important part, I won! Third place in one category and shared winner of a specific challenge (transport).

Thursday, September 25, 2014

Kotibussi, Apps4Finland demo konsepti

Kotibussi, Apps4Finland innosta sarjaan demokonseptilaite, josta näkee nopeasti seuraavan bussin tiedot kotoa, ilman tarvetta puhelimelle tai tietokoneelle.

Demolaitte on toteutettu Arduino, Ethernet shieldillä ja LCD näyttöllä.

Arduinossa pyörii MQTT client joka kuuntelee MQTT palvelimella olevia pysäkkitietoja ja päivittää realiajassa tiedot tulevasta bussista, sekä sitä seuraavasta.

Oikeassa toteutuksessa MQTT palvelimelle tiedot haettaisiin reaaliaikaisesta SIRI syötteestä, joka Turun seudulla on tulossa 2015.



Näin bussin käyttäjän ei tarvitse juosta pysäkille seisomaan turhan takia vaan voi rauhassa katsoa näytötä ehtiikö vaikka vielä juomaan aamukahvin loppuun vai ei.

BS: Pysäkin numero
L: Linjanumero
N: Nyt tuleva bussin arvioitu min:sec saapumisaika
S: Seuraavan bussin arvioitu min:sec saapumisaika


Demo ohjelman koodi löytyy github:sta.

Friday, September 19, 2014

Onki now in Jolla Store

Just a quick one to tell you that Onki got trough QA and is now available in the Jolla Store, have fun and a nice weekend!