2021-12-26

Is Boxing day 2021 a holiday?

It is an odd day, and notably it is especially odd when on a Sunday.

I have, in the past, had arguments with the likes of BT who were refusing to fix a fault on "7 hour fix, 24/7" on a boxing day Sunday because "that team don't work bank holidays". I kept pointing out it is not a "bank holiday", and got nowhere.

So I was trying to work out what Boxing day actually is!

[England and Wales specific]

The Banking and Financial Dealings Act 1971 defines bank holidays. So that is a good start. It explains "No person shall be compellable to make any payment or to do any act on a bank holiday under this Act which he would not be compellable to make or do on Christmas Day or Good Friday".

From that, I conclude that Christmas Day and Good Friday are already a "holiday" of some sort. These would be common law public holidays.

This explains why the Act does not make either of these "bank holidays". For England and Wales it defines these:-

  • Easter Monday.
  • The last Monday in May.
  • The last Monday in August.
  • 26th December, if it be not a Sunday.
  • 27th December in a year in which 25th or 26th December is a Sunday.

OK, so where does Boxing day come in?

Well, it is clearly not an existing common law public holiday, as it is created as a bank holiday instead by the Act "26th December, if it be not a Sunday".

But when it is a Sunday, it is not a "bank holiday" or a "common law public holiday", it is just a Sunday, a normal Sunday.

So this year, we have :-

  • 25th: Saturday - Christmas day, a common law public holiday
  • 26th: Sunday - A normal Sunday
  • 27th: Monday - A bank holiday
  • 28th: Tuesday - err?

Hang on? I thought Tuesday 28th was a bank holiday. I don't see it. Which law or SI has made 28th a bank holiday?

Update: The Queen can declare days as such, and has done so. https://www.thegazette.co.uk/notice/3846398 for Tuesday 28th.

To be honest, given that a delayed Boxing day is always done as a bank holiday, and so is a New Year's day, it seems odd they would not simply update the Act, and make royal decree only apply to special occasions.

See also wikipedia.

But what we can conclude is that today, Boxing day 2021, is not a "holiday" of either sort, just a Sunday. Even so, I hope you all had a Merry Christmas and I wish you a Happy New Year.

Why?

At first, the Act seems broken, as some times you seem to have 4 days at a weekend and sometimes 3. Why?

The answer is that the Act clearly sees Saturday as a "normal working day". When you realise that it becomes obvious, near weekends you get Fri/Sat/Sun, Sat/Sun/Mon, or Sun/Mon/Tue. Indeed, when Christmas is Friday, you have an explicit Bank Holiday on a Saturday!

Until now I never realised a Saturday could be a Bank Holiday!

P.S. Saturday 1st is also not a holiday. The Queen made 3rd Jan a holiday. She could have made 1st a holiday but did not. That does not stop half the shops being closed :-(

Irrational numbers and copyright

One of the fun concepts in mathematics is that every (finite) sequence of digits exists somewhere in π.

There are webs sites that explain this (e.g. here) and point out that it has not been proven. It sort of makes some sense, as π is irrational, meaning the digit sequence in infinitely long and never starts to repeat. It seems intuitive that it must therefore contain all finite sequences of digits.

If true, then yes, every possible sequence exists. and the idea is Don't work out π in binary. If you do, you breach copyright (not true, just creating the same thing originally rather than copying it is not a breach of copyright), trademark infringement, and a whole load of other issues.

Of course the same argument applies to creating a near infinite random number :-)

A rational number will always start to repeat - that is pretty easy to prove, and even that the repetition is going to be no longer than the denominator. π, being irrational, does not repeat.

My first reaction to this idea is that just being irrational (and so infinitely long), does not mean it has every finite digit sequence. My argument is simple, take π, and add a 0 between every digit. You still have an infinite sequence, and it still won't start to repeat and so is irrational, but does not even have the sequence 123 in it.

But then it occurred to me - is what I am suggesting a sane thing to do? Someone else pointed out (on twitter) that they do not know of any mathematical function that could insert a 0 every other digit. OK, but does what I am doing have to be a mathematical function?

Today it occurred to me that maybe what I am saying, even though it sounds simple, may not actually be a reasonably thing to suggest. That maybe the number I am creating is not "genuine" in some way, a number that could not be created. So maybe my argument is not sound.

Bear with me - it is not as daft as it sounds to dismiss a number I have created by description as not genuine.

E.g. take the number ⅓, in decimal, and add a 7 to the end of it. Now it is not rational, is it?

That clearly is nonsense. You cannot add a 7 to the end of an infinite sequence of digits (well, not that end anyway). So that concept is easy to dismiss as not "genuine".

But suggesting a 0 is added between each digit of π is equally impossible - I am adding infinite digits. If ever I stop doing so, π goes on as normal and maybe contains every finite sequence of digits.

So is what I suggested not sensible. Could there by a genuine irrational number that does obviously not contain every finite sequences of digits?

2021-12-19

Proposal: Updates to the QR specification.

I'd love to know where one can formally make a proposed change to the QR code spec, a new version.

What I think is needed is these very simple changes.

1. The whitespace border of a QR code is defined as four units. This takes up a lot of space, and is ignored by a *LOT* of people. Clearly readers cope with only a one unit white border, so I'd like to see that defined as "valid" in the QR code spec, even if a four unit border is "recommended".

2. I'd like to see the padding after the end of the QR code content to be defined as allowed to be arbitrary unused data. This allows QR codes to be made with silly graphics in them and be 100% valid if done correctly. At present, this works, and people love doing this stuff, but technically is not what the padding should be.

3. I'd like to see an additional coding, using a base64 alphabet, coded (obviously) to 6 bits. The reason for this is that whilst QR codes can be used to carry binary data, they are more commonly embedded binary data as part of a format like JSON. Other formats like base45 are also used. Allowing a base64 alphabet means that raw binary data or embedded binary data in JSON, etc, can be coded 100% efficiently in the QR code, but is defined as printable text. It can be used for parts of JSON that are binary coded as base64. Even a 100% binary data QR code would read as a printable string if using such a coding, which is far easier to handle in general applications. Given the way codings work, this would be simple to add. It would mean base64 coding would be better than base45, for example.

4. I'd love to see UTF-8 make the default character coding.

Impact of these ideas?

The change of border, and padding data has basically no impact, readers already cope, so this is a no-brainer.

The additional of a new coding is more complex. It is not backwards compatible. However, it fits well with the possible use cases. The usage would be where raw binary would be better handled as printable data, and where using coding like JSON to carry binary data in parts. These are both cases that need a specific application to use the data. I.e. they are not some generic use case like a URL. So these are cases that are likely to be read by a specific application, and the application could be one that is designed to use a new version QR reader library. Even so, it probably makes sense for such a change to have a future date by which readers are expected to have been updated, and QR codes should not use the new coding before then unless intended to be used only with a specific application designed to read it. QR encoders should have an option to use the new version or not as well, obviously. The standard can state all of these objectives.

Now, daft question - where do I send my proposal?

P.S. I have had an email now confirming exactly how the process works, thank you (happy to quote you name, let me know). Also, I did not know this about my Datamatrix coder... "you wrote the Data Matrix library that was adopted by Zint and is probably (?) the most pervasive DM encoder in use today", nice.

Other ideas

One idea I did not mention, but do now as mentioned in that email, is the notion of an additional coding for URLs. This would be a subtly different set of characters to be URL friendly. For example, the "alphanumeric" alphabet coding has / and : and . but no ? or _ and no lower case. A new coding could make URL encoding better. Indeed, including a single character for "https://" even would make sense, or some other coding (like FC1) to indicate https:// at the start, would also make sense. It would take some research to work out the best way to do this, analysing lots of URLs.

Also, to be fair, anyone putting a URL in a barcode is mad to not do a bare minimum such as https://domain/argument which are all within the standard alphanumeric coding already (i.e. upper case) - putting a long complex URL in a QR code is generally a daft idea and makes for a big QR code anyway. A web server can easily handle a simple URL even if it then redirects to some more complex one internally. It is also worth having a short domain for such use.

The big issue I see with this, which is not a show stopper in itself, is that URLs tend to be used more generically - i.e. in the camera app on a phone, and not by specific applications. This would mean the new coding is no use until almost all readers understand it.

The good news is we live in a world of software updates, largely for security and vulnerability reasons, so things like a phone camera app would be updated. What is more difficult is hardware scanners, as used in supermarkets. But again, the good news is that those are generally used for specific applications that know what QR codes they are going to see and those QR codes could be coded not to use the new standard.

2021-12-16

More fun with LEDs

Having made a Stargate I decided to play a little more - there are loads of "rings" of these addressable LEDs, so the obvious thing to make was a clock. I used a 24 LED ring.

For the hands I went with a simple red=hour, green=minute, blue=second.

My initial idea was to fade from one LED to the next during the period of the LEDs, so over a period of half an hour the hour LED fades from one to the next (being 24 LEDs on a 12 hour clock face).

This was a bad idea as it looked crap and actually made it harder to tell the time!


So, I decided a better idea was to make it a single LED. But I still did not want it to "hard tick" from one to the next, so I made it take a fixed time to fade to the next LED, in this case 1 second.

This looked a lot better and was way easier to read the time.


As you can see, it looks really neat using the LEDs "through paper". But some of this, especially the blue, is a side effect of using the iPhone. It makes the LEDs look a little better than reality.

Using a proper camera shows more what they really look like. Still pretty good.

Finally printed a better case...



2021-12-13

Dial the gate

One of the things I have not previously tried is LED strips/panels.

These are quite clever as they daisy chain one data line, allowing you to send colour data to every LED in a sequence, and hence make them all have any pattern you like. They are pretty quick too. There are a few chips out there, but Amazon have loads of strips and panels, such as a 1m/144 LED strip for £12 using WS2812B controllers.

Obviously libraries exist to make this easy to control. I use the ESP32 chips with the ESP-IDF development environment. However I am (for reasons too tedious to go in to) using CMake now instead of Make. I really do not know CMake well. So was fooled initially. Trying to include "led_strip.h" did not work.

It turned out that all I had to do was add "led_strip" to the CMakeLists.txt in COMPONENT_REQUIRES. And bingo. I am sure I tried that first, but must have got it wrong, but worked in the end.

It is then easy to use. Simple call to initialise, clear, set pixel colours, and flush out.

So what was the project? Well, I printed one of these from thingiverse. It is designed as a light. I struggled the thread the LED strip into it, and so I recommend printing 10% larger. I then wired directly to a USB powered ESP32 module, so 5V to the LED strip, and the 3.3V data line. To my surprise that works, as I was expecting to need to switch it to 5V data. Also, the LEDs can easily draw too much power causing USB to shut down, but by limiting the brightness (it was way too bright anyway) and using only 72 not 144 LEDs, I have kept it working. I just needed a bit of glue gun then.

This is the result :-)

The sequence is too fast for proper dialling, obviously, and it is spinning a blue LED not actually turning the ring. It lights in the chevron positions, but not the actual chevrons. But the bright light for the kwoosh, and then sparkly/fadey for the open gate, seem to work quite well. All on github.

It talks MQTT so I made it that when the house (electric) gates open, the gate opens in the living room :-)

That said, I also have a Shelly button1 lying around that does it too.

2021-12-07

Where are we with the air-con?

I had aircon in my old house - standard split system with indoor units on the wall. It worked well. Summer or winter, extreme hot or cold, I was able to ensure bedroom and office stayed well controlled and comfortable. Not once could it not cope.

For the new house I put some money aside to invest in an even more serious aircon, ducted, with a lossnay and for fresh air as well. We are directly on the A40 with no vents in windows, so needed. It is far from cheap (A lot of houses in wales are probably cheaper than this installation!). I was keen, and happy, to pay "top dollar" for a "proper" system. This is my retirement, my comfort, I deserve this!

As I have said on twitter, that it is Major Cooling & Heating that are doing this. They were recommended, and have been in business some time.

They are nice, and friendly, and do seem reasonably competent on the face of it. So we ordered the system and it is installed. It took some time. It involved a lot of work we had to do with help from my son-in-law/sparky.

But it is not right, sorry. I do feel a tad sorry for them - as it looks like they took all the room sizes, and so on, and contacted their suppliers that recommended a Mitsubishi system with Lossnay and GUG. It was installed, then the issues started.

There are two big issues.

1. It cannot read the room temperature from the controller. This is the controller that comes with it, which they says is not even a "standard spare part" as it is specially for the GUG, yet it has a thermistor in it, and has a setting to use the controller temperature, which it accepts. This fooled us as clearly it was not using the controller, freezer spray made that really easy to demonstrate!

2. It does not seem to be powerful enough.

The first point is pretty much a show stopper. We have two rooms on each of two systems, and may want to run one or the other or both. The fact we want to cool the "secondary" room was important as my wife and her sister when using the guest room, have very different ideas on a "comfortable temperature"! We do accept that if we are running both rooms at once, then they are not separately controllable - we know that.  That was not actually a problem for us. For the "one or the other" we actually put motorised vents to each room and switched the controllers in each room so only one was connected. Simple, or so we thought. But apparently, even though it has at thermistor and a setting, it can only read the "return air flow", which only comes from one room! Not impossible to fix with more vents and more motorised vents in the pipes for the return air flow, but for one room this meant removing wardrobes, and plaster board and trunking a vent in the wall and lots of work (which we paid for separately) and may now need doing for the "return air" if we do that. Not good. Not impossible to fix.

Even so, we now know that this also means much more careful placement of the vents in the rooms else the feed air just runs along the ceiling to the return vent and thinks all is well and the room is warm. This meant changes to vents, and lots of testing. Getting the airflow matters way more if the temperature sensor is not the controller, put where we want it.

The second point is, frankly, a bigger concern. It got to over 28℃ in my office last summer. So a system that can cool even that one room to 21℃ is needed. I was clear I wanted an "over spec'd" system if necessary to do that. But as it is not the height of summer I have no way to test that. All I can test is heating. Well the system says it can do 28℃ heating. So let's try!

The answer is a solid "nope", by several degrees. One system managed one room (not the two rooms and en-suites it should do, just the one) up to 25℃ after some hours. The other much the same 24℃. Yes, it works for 20℃ and so is actually fine for now, but if it cannot cope with heating many degrees now, how will it cope with cooling many degrees, as many as 7℃, in summer?

At the end of the day this gives me zero confidence the system has enough "oomph" to cool my office in the summer at all.

Can I help? Well, I am. I have invested in more test equipment, calibrated sensors, etc. I have tried everything even moving and changing vents. We had the vents all changed to larger size at the start when it was apparent it would not cope. I am doing everything I can to make this work if at all possible. But no luck.

I am now putting in several sensors in one room at 0.5m height intervals to see if the air circulation and heat distribution is somehow a factor. But even so, the basics of "not enough oomph" is pretty clear.

So next step is down to Major Cooling & Heating to see if they have an answer, changes to the system, an alternative system, or a refund. We will see how good they are.

2021-12-06

Tech, and mince pies

We have environmental sensors in the house. They are linked to HomeKit (via a firebrick, and raspberry pi, don't ask).

My phone went mad, telling me several of the rooms had High CO₂. This happens occasionally in the kitchen (aka living room) when we have a few people around, but it is only the two of us, and it is lots of the rooms in the house.

I checked, not the loft, not the outhouse, so not coming from outside it seems. But several rooms throughout the house!

Seems I have found the answer...



It seems that "Vinegar ( ethanoic or acetic acid ) is used in pickles and mincemeat and ... The acid reacts with sodium hydrogen carbonate to produce carbon dioxide ."

So yes, mince pies are picked up by the technology! wow.

They do look yummy though :-)

Fencing

Bit of fun... We usually put up some Christmas lights on the house - some fairy lights on the metal fencing at the front, but a pain as mean...