Tuesday 23 March 2021

Mac graphic user interface (GUI) application for TL866 programmer (minipro wrapper)

I can't believe that no-one has done this already but as far as I can see, we Mac users have to use the command-line when using our TL866 programmers.

That's absolutely fine; the man page exists, is short and easy to understand.  Purely to save myself from trying to remember what options I need to use, or last used*,  I've built GUMP (Graphic User-interface for MiniPro) which is just a wrapper for the minipro command**




It's pretty basic and a bit clunky, it just allows Read (save contents to file), Write and Verify with a few checkboxes for some of the minipro options. 

In time, I'll add anything that I will personally find useful and maybe build a 'hexedit' viewer into this app (in the screenshot it's my hexedit-style app Peep which is displaying the contents of the ROM, as saved to a file by GUMP.)

I'm throwing this out there so that if anyone else is interested in having this, I'll tidy it up a bit and make it publicly available. (Comment below or contact me using the usual channels.)



* or having to type the string somewhere and then trying to remember where I saved it

** which you need to install separately. However, if you already have homebrew, this is as simple as: 

brew install minipro

Monday 22 March 2021

Review of Hue motion sensors and possible Integration into Hue-topia for Mac

I first made Hue-topia and LIFXstyle some years ago after becoming very paranoid (justifiably) about intruders. 

At the time, no sensors existed for the system (at least as consumer products - Philips went with the zigbee network system, which in theory means that there were other third-party products that would work). I experimented with sound and motion detection using EyeSpy cameras, which worked. The security aspects of Hue-topia and LIFXstyle were the reason for the dragon icon (someone asked this question recently).


Both Philips and LIFX added products to their range - more bulbs, switches, sensors. I had to purchase any products I wanted to support, which would have cost more than the revenue from the apps. For this reason I stuck to supporting only the lights in my apps.

This is the reason that I'm very late to the party with the motion sensor, and I have to be honest, wanting an outside temperature reading is the main reason I went for one. 

Yes, each Philips motion sensor, despite the name, also contains a thermometer and possibly daylight sensor (though I've a feeling this may be calculated by the bridge and not a sensor, but I can't go back in time and check whether this pre-existed my first motion sensor).

Anyhow. Thanks to Philips' open API and REST interface, it's very simple to read these sensor values. As you can see in the first screenshot I've added a little functionality to Hue-topia (in my development version thus far). I can now see the outside temperature* from the status bar of any of my computers/laptops.

I have to say that adding my first motion sensor to my network was a breeze. A magnetic mount makes it very easy to put up (and take down to change the battery). It's a tiny thing, which makes it discreet. It's battery-powered which was important to me. The last thing you need is another thing to plug into a socket.  Having to route wires is a pain and restricts where you can place it.   When I pulled the tab to connect the battery it started to flash, which seemed to indicate that it was searching.  I chose 'Discover' in Hue-topia and the flashing stopped. It was then working on the network without me even having to walk to the bridge and press a button. I obviously have yet to discover how long the batteries (2xAAA I think) last. 

Traditionally and personally I've leaned towards the LIFX system; the bulbs were brighter and did more colours*. I have to say that, many years on and many bulbs later, I own more broken LIFX bulbs than Hue bulbs (3:1). As well as this apparent better reliability, the Hue bridge is a good thing. Yes, it's an extra product to buy and give space (and a power socket) to. LIFX use 'bridgeless' as a selling point. But the Hue bridge does have a lot of functionality and is always on, more reliable and maintenance-free than my 'always on' mac. After moving house, the Hue bulbs have been easier to get working again than my LIFX bulbs and strips.

In short I'm warming to the Hue system and I'm liking the motion sensors a lot. My rule for switching the porch light on when motion is detected is working really well*. Its sensitivity seems just right, it seems to talk to the bridge reliably even though they are at opposite ends of the house and the sensor is outside (I seem to remember that the hue/zigbee system is a mesh, so the bulbs themselves may be serving as relays). 

At this point I'm not sure how much of the 'rule' functionality I'm going to build into Hue-topia. Philips seem to have the 'formula' system sewn up into their mobile app. I've been using the built-in debug tool to add and edit my own rules (because I don't personally like cloud-based systems). Once they're set up, they're set up and it'll probably be only groups and scenes that I need to edit, so I suspect that building a 'rule builder' into HT would be a lot of work which would be of interest to very few people. Tell me if I'm wrong. 

I may well release a little update that puts any temperatures detected into the status bar menu.



* I have read that this may be a degree or two out (I don't have a reliable thermometer here to calibrate mine) but it's a very simple matter to adjust this in software. I'll probably add a box in Preferences so that the user can enter "-1.2" or whatever

*I think some of the 'friends of hue' range did the full range of colours, but in the early days, the domestic-style Hue bulbs had a limited colour space. Green was weak and blue almost non-existent. I haven't tried more recently-produced bulbs. To be objective, I probably only sweep the colour range when showing off to friends and family. Other than Halloween parties or effects lighting, I can't see a use for a strong green or strong blue. In normal use I find that I like to use the Hue colour bulbs in 'white' mode, which gives you a spectrum from cold to very warm. That's all you really need in a domestic setting.

*switching off after a period of being on is not.  I suspect that this may be because the porch light illuminates an area that can be seen by the sensor (which is part of the point) and so switching it off may be triggering it to come on again. I need to experiment more with this.

Friday 19 March 2021

Album art lookup using MusicBrainz - experimental free app

ScreenSleeves generally receives the album cover  art from whatever music player you're using (Spotify, Apple Music, iTunes and many others).

There are cases where it doesn't. For example when listening to an internet radio stream using certain apps, often only the artist and track name are provided. 

ScreenSleeves has traditionally had the option to look up album art online where necessary. (In fact, it had the option to *always* look up art online when using Snowtape, because the method SS used was more likely to produce the correct art than Snowtape itself.)

ScreensSleeves has used Gracenote for a few years. GN is a firmly commercial operation but they allowed me (with the actual number of requests capped) to use the service for free.  At some point recently that lookup service seems to have unceremoniously stopped. My account doesn't exist any more and there's no longer any information about the lookup / API. (Often the way when you make use of 3rd-party services.) A quick Google shows that software and even hardware that made use of CDDB for CD information no longer works since a certain date. 

MusicBrainz is a much more open music database. They allow free non-commercial use. I have discussed Screensleeves with them and come to an arrangement which allows SS to perform the necessary lookups when necessary. 

This is a good solution. I have some old and obscure albums that it doesn't have artwork for, and even the odd album that it doesn't even have in the database (I must learn how to contribute to the database). However, the search works beautifully and when the artwork is available it's very good quality. 

With this up and running in the development version of Screensleeves,  I was impressed with the quality of the artwork and wanted a way to simply perform a lookup and save the cover for my own use in iTunes.  (My personal media server uses an old version of MacOS and iTunes, because when something works I like it to remain the way it is, rather than changing at the whim of the maker.)

I've built an interface around the MusicBrainz cover art lookup that I'd written for ScreenSleeves and this is the result. 


The download is here (well done for finding it. At this point I won't publish it on the peacockmedia.software main site or anywhere else). 

If this interests you, please let me know in the comments or by email. Other apps are available but they do tend to integrate with your iTunes/Music library rather than simply allowing you to save the artwork and do what you like with it.