mailto: blog -at- heyrick -dot- eu

Tea jar

I opened a new sack of Tetley on Sunday. A fresh selection of 1,100 bags to work my way through. That's only 220 days with five teas a day. Which is "about average". Of course, when I'm home (weekend, holiday) I consume more.

My last couple of tea sacks I just cut a corner off and dived in whenever I needed a bag. Which meant the tea wasn't it's best coming towards the end of the sack. It doesn't have that punch, you know? Well, maybe not if you're a coffee drinker, but we don't use the C-word around here. ☺

So I dug up the old Le Parfait jar (with rubber seal) that used to hold flour. A clean up, then a few minutes in the oven to dry and sterilise, and it's ready for being repurposed.

All that's required for the perfect cuppa
All that's required for the perfect cuppa.

 

Daylight hours

Still light at half six. Not so much fifteen minutes later, but the sun at at 6pm. Either way, the days are slowly getting longer.
Oh, look, GOF.
Oh, look, GOF.

It went up to 8.4°C, which is more than it's been in quite a while. So fog gof is beginning.
Just looked and it's 1031mb (or hPa if you prefer). Could explain why I have a headache. Looks like there's going to be a high out off the western tip of Spain through the week, so ought to be milder and probably a bit rainy.

 

All of the rest is to do with hacking around with my new internet radio...

 

Denver IR-135 battery life

After running the radio on battery for four hours, I still had between 25% and 50% of the battery remaining. I turned it off at this point at it was 9pm so I went to bed and watched some Netflix with a hot chocolate.
Ought to be good for 5-5.5 hours?
Ought to be good for 5-5½ hours?

The WiFi access point was close, so a signal of -22dBm, and it stayed playing the one channel with volume about a third of maximum, and the display dimmed at 3% intensity. Obviously these things will affect the overall battery life, but it's not bad from a dinky little 18650.

 

Denver IR-135 and user-side SkyTune integration

I had a play over the weekend.

UPDATE July 2023: The URLs have changed. Where it used to be /newweb/php/..., it is now just /php/....
This page has been updated accordingly.

There are four prerequisites:

These files are for building arrays in JavaScript, so all come through as one lump. It may be easier for you to read them in your text editor if you replace "{" with "\n{".

 

The Genre list

The genre list is for matching the genre numbers to their names. The file begins with the text {"genre_name":[ and ends with ]} because it's a JavaScript array.

In between are numerous genres, sorted in alphabetical order, that look like this:

{"id":"88","name":"00s & 10s","clzId":"2"},
Where the '88' is the genre number, the text following "name" is the genre name (in English), and clzId is either '1' (talk radio) or '2' (music).

 

The Continent list

This one is very short. Laid out much like the above, it's a set of "id"s and "name"s to define Africa (5), Americas (1), Asia (2), Europe (3), Internet only (7), MidEast (4), and Oceania (6).

 

The Country list

The countries look like this:
{"id":"138","name":"Afghanistan","continent_id":"2","has_state":0},
It finishes with a list of country numbers (in the same order as the country list) and whether or not state information is provided... which is already present in the main definition...?

The following countries have state information: Canada (2), China (6), Germany (15), and United States (1).

 

The State list

The state list provides state/region/province names for the aforementioned countries.
It looks like this:
{"id":"34","name":"Alabama","country_id":"1"},

 

Searching for stations

There are three ways to search for stations.

  • By country
  • By genre
  • By search string

 

Searching by country

You'll want to send a POST request to http://www.skytune.net/php/GetStationByCountry.php with the following fields:
  • lan - the language. Just set it to 'EN', other values don't seen to make any difference (I tried FR, ES, and CN).
  • country_id - the ID of a country. For reminding, '16' is France and '17' is the UK.
  • page - the start page; there are 30 entries given per page.
  • op - is 'C', other values tried didn't seem to make any difference, but I'm guessing 'C' for Country?
  • active - is 'Y', I tried 'N' and 'X', no difference.

Here's a convenient form to fiddle with:

language
country_id
page
op
active

 

Search by genre

This is very similar to the above, but you call http://www.skytune.net/php/GetStationByGenre.php, and you pass a "genre_id" instead of the "country_id".
The "op" this time is 'G', G for Genre, but sending 'C' instead made no difference.

Here's a form to play with, and genre 38 is "Rock (punk and goth)". If you prefer something else, 52 is Classic Rock, 24 is Country, and 90 is Celtic. For others, grab a copy of the genre list...

language
genre_id
page
op
active

 

Search by text

In this case, the *_id is replaced by key which is the text string to look for, and method which is either 0 for containing, 1 for begins with, or 2 for ends with.
It's a substring match, wildcards aren't supported.
And, this time, op is 'F' for Find.

Here's a form to play with:

language
key
method
page
op
active

 

The returned data

The file begins with this:
{"stat":{"currentp":1,"lastp",1,"total":"10","count":10:,"firstr":1,"lastr":10},"stations":[
where
  • currentp is the current page
  • lastp is the last page
  • total is the total number of stations found
  • count is the number of stations on this page
  • firstr is the starting station on this page
  • lastr is the ending station on this page
There is regularity. For many matches, page 2's count is 30 and firstr=31, lastr=60. Page 3 is 30, 61, and 90 respectively.

Once the header has been output, a list of stations will follow, like:

{"id":"71407","name":102.7 Jack FM - Baltimore","icon":null","web":0,"act":"1","country":"1","state":"53"},

This provides the following information:

  • id - the channel ID, you'll need this
  • name - the channel name (note if it says something like "(US listeners only)".
  • icon - this will be either "null", a URL to the icon (with slashes escaped), or in some cases you may see ""data:image\/png;base64," followed by a lot of gibberish. An example of an embedded PNG is WYPR-HD2 BBC World Service Stream - Baltimore, MD.
  • web - is sometimes '0' and sometimes '1'. I'm not sure what the significance is.
  • act - seems to always be '1'.
  • country - the country number
  • state - the state number, or '0' if not applicable.

 

Sending this to your radio

You'll want to send a POST request to /doApi.cgi?SL=EN&AI=129 on your radio. Mine is at IP address 192.168.1.31 so the full URL would be: http://192.168.1.31/doApi.cgi?SL=EN&AI=129

The following fields should be supplied:

  • chName - a name to display in the upper blue banner. This can be anything up to 64 characters in length (and no, it doesn't crash if you provide 300 characters) which will scroll once and then display the leftmost part. It's supposed to be the station name, but you can have some fun with this.
    Note that what you provide will be recorded in the station history, and it's not erasable (well, not without a complete system reset).
  • chUrl - this is supposed to be the station ID number prefixed with '*#' and suffixed with '#', like '*#2878#' for 100.7 The Bay - WZBA, but it looks like this is actually unused.
  • chUrl2 - this is the station number as a plain number (like '2878') and this is used to tell the radio what to tune to.
  • chCountry - is always set to '-1', which makes a mockery of the requirement to provide a country for custom added stations.
  • chGenre - is always set to '-1', which makes a mockery of the requirement to provide a genre for custom added stations.

Here's a form. It won't work for you unless your radio is at IP address 192.168.1.31, but you might like to look at the HTML source to see what's going on.

chName
chUrl
chUrl2
chCountry
chGenre

Messing with the caption
Messing with the caption.

 

And translating station IDs into stream URLs?
Sadly, this is an entirely different proposition because it's not possible to get in between the radio and the WiFi access point to snoop on what's being sent and received. At least, not with my equipment.
Therefore, for now, how it actually works internally will remain an enigma.

 

Denver IR-135 IR remote control

By a lot of brute force hacking, thanks to my mobile phone and the irCode Finder app, I can tell you that the radio responds to a standard NEC control packet, as device &10EF (which is actually just device ID '10' (#3) because the &EF part is the inverted device ID.

Running at 38.222kHz (nominal), NEC codes send four bytes as follows. There's a 9ms leading burst, a 4.5ms space, the 8 bit address of the device, the 8 bit logical inverse of the address, an 8 bit command, the 8 bit logical inverse of the command, and a final 562.5µs burst to signal the end of the transmission.
The bytes are sent least significant byte first.

Here is the mapping of recognised key codes:

Device    Command    Key                    
10EF(3)   00FF(0)    0
          807F(1)    1
          40BF(2)    2
          C03F(3)    3
          20DF(4)    4
          A05F(5)    5
          609F(6)    6
          E01F(7)    7
          10EF(8)    8
          906F(9)    9
          50AF(10)   Mute
          D02F(11)   On/Off (Sleep)  <-- only when running on mains power
              (13)   -
          708F(14)   Alarm settings
              (15)   -
          08F7(16)   Home
          8877(17)   EQ
          48B7(18)   Rotate left
          C837(19)   Rotate right
          28D7(20)   Right
          A857(21)   Left
              (22)   -
          E817(23)   Favourites
          18E7(24)   Stop/Play (but only in channel info screen)
          9867(25)   Next station
              (26)   -
              (27)   -
          38C7(28)   Sleep timer
          B847(29)   Add to favourites
          7887(30)   Select (button press)
          F807(31)   Previous station
              (..)   -
          827D(65)   Volume +
          42BD(66)   Volume -
              (..)   -
          32CD(76)   Go to Internet radio -> Local radio
          B24D(77)   Go to Information menu
          728D(78)   Go to Dimmer setup
          F20D(79)   Briefly show icon to show source (My Favourite / Internet Radio)
              (..)   -

Note: There doesn't appear to be an Off keypress.

Adding all of this together, if you have an Android phone with an IR blaster/output, and the free irplus app, you can set up something like this:

IR control using the irplus app
IR control using the irplus app.

You can download the XML file of the above layout:

Import that file into irplus and you're good to go.

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

David Pilling, 1st February 2023, 12:48
Kilner jar - invented by a relation of Jeremy Clarkson - boycott now! 
I wonder if putting in one of those desiccant sachets would help.
Rick, 1st February 2023, 15:34
The original Kilner jar was a screw top jar made in 1842. 
 
The Le Parfait jar has a clasp to keep it shut, with an attached lid, and it was first made in 1830. 
 
So no Clarkson here. ;)
David Pilling, 1st February 2023, 19:09
You're right 8-( although these days Kilner are commonly thought to be clip top - On YouTube it is possible to see the episode of Who Do you think you are?, where JC visits his past, the old jars he demonstrates are screw top.
J.G.Harston, 2nd February 2023, 02:15
I drink about the same as you, and 240 tea bags is too much before they start going stale, 1000 would be horrendous. I sometimes have people give me sacks of 500+ teabags thinking they're doing me a favour, not realising that 300+ of them will get thrown away.
Rick, 2nd February 2023, 07:36
Given the lack of decent tea, I can't afford to be overly choosy. Stale tea is better than the insipid stuff on sale here. 
However, my last few (hundred) tea bags have been functional rather than nice, which is why I'm trying out keeping them sealed.
C Ferris, 3rd February 2023, 13:43
Best to keep the Tea in the Dark!
Rick, 4th June 2023, 09:03
Okay, the radio had a full workout yesterday while I was tidying the living room. 
 
Located next to the Livebox (so a good WiFi signal) and using line out with the internal speaker muted, the battery started flashing at around the 6 hour mark, but the radio kept on playing until it finally powered itself off after six hours and forty seven minutes. 

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 29644 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   January 2023   »
MonTueWedThuFriSatSun
      
3456
91215
16171819
2324252729
31     

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery
 
Alphabetical:

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 23:58 on 2024/11/21.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2023 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2023/02/04
Return to top of page