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 :-)

2021-11-28

More on Highway Code (Abergavenny)

I had a very interesting debate on FaceBook over this. So I thought it worthy of a blog post.

[Update: Whilst I don't think this is in any way a grey area, the new Highway Code rules from Jan 2022 make this way more clear with rules about giving way entering or leaving a side road when someone is crossing, or waiting to cross]

This is a junction in Abergavenny that I walk across every day on my way to town. I walk both ways, but frequently (maybe once a week) someone turning in to the side road will drive at me whilst I am crossing. They are usually not in sight when I started to cross, sometimes they are and waiting on traffic when I start to cross. But the rules are really clear, if I have started to cross then they have to give way to me. Oddly, even though I have no trouble with zebra crossings (everyone is really polite and stops even if I have not started to cross), they get annoyed that they have to stop for me, for some reason. Some very annoyed, stopping, getting out of the car, shouting, etc. It is crazy!

Just to be clear, I also have a lot of cases of drivers being sensible, waiting for me to cross, no annoyance, very civil and safe. Thank you - most of the people of Abergavenny are very civil and polite.

The debate came up because of the "island" in the road. This was not something I had considered an issue. Walking in direction shown, I am crossing a road, and get to the island in the "middle", and a car approaching expects me to stop for some reason. The question being should I stop? or should I expect them to give way as I started to cross the road some time before and am still crossing, so I have priority. To be clear, I always try to make eye contact and try to avoid getting run over (so far with success) - I even wear hi-vis on many occasions.

What are the rules?

The rules are all in the Highway Code, and even though many of these are just advice, and recommendations, and even some that are clear rules are not "laws", they do define how we all use the road together and if followed they help ensure things work smoothly. At the end of the day, the rules can say which of us was right and which was wrong in a case such as this where the car driver has to stop for a pedestrian that is crossing.

  • Rule 170: "watch out for pedestrians crossing a road into which you are turning. If they have started to cross they have priority, so give way"
  • Rule 8: "At a junction. When crossing the road, look out for traffic turning into the road, especially from behind you. If you have started crossing and traffic wants to turn into the road, you have priority and they should give way (see Rule 170)."

So that is pretty clear, both for a driver and a pedestrian, if you have started to cross (just like a zebra crossing) cars have to give way.

So where does the island come in?

The confusion comes about because of rule 20: "Where there is an island in the middle of a zebra crossing, wait on the island and follow Rule 19 before you cross the second half of the road – it is a separate crossing."

This makes it clear that where there is an island in a zebra crossing, each half of the road is a "separate crossing". So "starting to cross" the crossing (not the road) is not automatically priority over cars for the other "crossing" on the other half of the road.

However, rule 30 is not the same: "Where there are no controlled crossing points available it is advisable to cross where there is an island in the middle of the road. Use the Green Cross Code (see Rule 7) to cross to the island and then stop and use it again to cross the second half of the road."

Both rules make it clear that the road may have two halves, but unlike rule 20, this rule does not say that makes it two separate "crossings" or "roads". Rules 8 and 170 talk of having priority once you have started to cross "the road" or "a road", not "a half of a road" or "a part of a road" or even a "crossing".

So, to me, rule 30 actually clarifies the this is not like a zebra crossing, it is one road, and starting to cross it at all gives the pedestrian priority. As such, when getting to the middle of the road, island or not, they still have priority, and so can reasonably expect the cars turning in to the road to give way as required by rule 170.

The island makes no difference in a side road, even though it does for a zebra crossing. Otherwise the rules are almost the same. Notably a zebra crossing would have a much more serious "island" with the orange globe lights in the middle of the road. For a side road it can be little more that something to support a keep left sign, such as the above. So sort of makes sense.

Just to be clear, the same problem happens when going the other way, where the island is not relevant, and on side roads with no island, but they are not used as much and hence it is much rarer.

Why are people even mentioning the island?

I was also surprised that the whole issue of the island came up. I think people are reading rule 30 and saying that because the pedestrian crosses to the island, stops, and then crosses to the other side of the road, the stopping means they have stopped crossing the road, and start again afterwards, so while stopped they don't have priority. I think that is what people are saying. That may have some validity.

But even if that is how rule 30 can be read, the second someone takes a step from the island they have priority anyway, so in practice cars have to expect to have to give way.

Also, rule 30 is "advice" to pedestrians only. If a pedestrian does not take the advice and crosses where there is no island, and so does not "stop", then the priority clearly starts when they start crossing (the first half of) the road all the way to the other side. Again, cars have to expect to give way to the pedestrian.

Similarly if they decide to only take part of the "advice", cross where there is an island, but do not choose to do the "stop" part. Rule 30 is only advice.

This particular crossing has two small "islands", one in front of the other, holding street furniture, and a gap between them. The gap actually looks placed for pedestrians crossing, and as the islands have no dropped kerb, the gap is the route anyone with any sort of biggie would take, so in practice I am never crossing to the island and stopping.

Does any of this matter?

Drivers and pedestrians have to be careful, and the rules help them know what to expect. If they reach a different conclusion then that can, obviously, lead to an incident. So it is important that they both come to the same conclusion, that is why it matters. It also helps resolve who was "wrong" if there is an incident (which is no consolation if the pedestrian is squished). Both have to be very careful to avoid any squishing being involved. Understanding the rules clearly helps with that.

The good news is that the Highway Code is being changed to make it so you have to give way to someone "about to cross" the road (side road or zebra crossing). Once that change is in place the whole question of the island is moot, as someone on the island in the middle of a side road is clearly about to cross the "second half of the road" and so a car has to give way anyway, even if they consider somehow each side of the road to be a separate road for the purposes of rule 8 and 170.

Conclusion?

I had no idea that there would be a debate over the "island", or that there was any ambiguity or confusion over this. As above, it seemed clear to me, so interesting. This makes the changes that are coming to the rules a welcome clarification as it will cover giving way to someone waiting to cross even if they are on an island in the middle of the road.

Even now, before the change, motorists need to basically give way to anyone crossing a side road as if a zebra crossing was there - they already cope if crossing cars coming the other way - but the rules are changing to make this even clearer. Pedestrians are king when crossing a side road...

P.S. given the confusion caused by the "island", which is all pretty irrelevant, I wish I had started with this image, which also is a cause of problems on that junction.

2021-11-20

ESP8266 vs ESP32

When I started using the Espressif processors I started with the ESP8266 and Arduino development platform. It is all C++ based (which is not really my favourite). But it is a really good starting point for anyone wanting to play around with microcontrollers.

One of the key things here is the available hardware. A "programming" lead is just a USB serial which is available for a few pounds, The Arduino development platform is free to download. But most importantly there are thousands of very cheap ESP8266 based devices on the market, easy to use, and many easy to access programming pins. The ESP8266 is possibly the most popular basis for IoT (Internet of Things) devices like smart light switches and the like.

However, having managed to make some PCBs (milled from copper boards) for ESP8266 based modules, I eventually decided to move on to using the ESP32. It had a number of advantages as a processor itself, but also the ESP IDF which works on linux and MacOS making it easy for me to code in C, which I prefer. The ESP IDF and various libraries are still a work in progress and far from perfect, but generally work well. I have made a load of projects based on ESP32.

But being ESP32 means I lack the thousands of ready made modules that I can use. I have designed and made loads of circuit boards myself, including a complete access control and alarm system.

What is now nice to see if that there are finally some ESP32 IoT devices coming out. Manufacturers are moving to ESP32 based boards. One of the most useful I have found is the Shelly 1. What is especially nice is it has direct pins for programming access - without even taking apart. It is simple, just a switch input and a relay output, but runs of mains, or 12V DC (do not use the GPIO pins when running on mains as they are live).

Shelly have just launched the Shelly plus 1, which is basically the same as the ESP8266 based Shelly 1 device, but ESP32 based. It also has programming pins easily accessible (though smaller), a relay and switch input. In this case the 12V is a screw terminal rather than a link you have to change.

The good news though is I can load my own code, ESP IDF based, on to this. It means I can use these modules directly on, say, my access control and alarm system. I had found I needed various simple 12V single input modules for the likes of a door contact or fire alarm input and previous used boards I made. But at this low price the Shelly plus 1 is a no brainer, as they say. Using my code I can set secure boot, and encrypted communications as part of the alarm system. Even something simple like an alarm bell could use one (single output for bell and single input for tamper).

My first actual project with one of these is for a servant bell system. I have an actual bell, which I want to "ding". I am using 12V DC, but the bell really only "rings" using AC. Using DC you need a small pulse to do a clean "ding". Too short and the clanger does not hit the bell. Too long and it hits it and holds, making more of a "clunk" than a "ding. Get it right and you get a nice clean "ding".

I was using tasmota32 code for this, but that is designed to do pulses of 200ms at least and not that consistent - perfect for blinking lights and the like, but no good for what I need.

So, back to my own code, ESP IDF based, using my existing libraries, and I am now starting something a bit like my own tasmota in a way - programmable inputs and outputs. Expect the outputs (which is all I have coded so far) are configurable to the millisecond.

I have found 15ms seems to be the sweet spot to make the bell ding...

2021-11-18

No, we don't have servants

But if we did, we'd need one of these beauties.

Well, the plan is to make this work for a friend of mine.

Believe it or not, it is "electric". With bare wires nailed to a board, and coils! With a bit of cleaning up and soldering, I have all the coils working.

With a bit of experimentation I could see how to drive this. I think I can even use what remains of the original wires which go round the back where they were just cut off. Basically the coils pull the swinging indicator, and on release it is left swinging back and forth. Oddly there is no sort of sounder, so I wonder how it worked to get people's attention. I'm planning an additional bell.

So, how to drive it - well it looks like a suitable resistor will allow it to work quite easily on a 12V supply, with a back EMF diode.

Relay board

One simple solution is an off the shelf relay board. Like I used for my DEFCON lights. One small snag is that they come with 8 relays and this needs 9 (10 if you include the bell).

Definitely a possibility though.

Custom board

Another simple enough idea is I make a relay board with 10 outputs. PCBTrain can turn these around in a day, and it may be a nice useful board design. I'm in two minds whether to use a relay, a solid state relay, or a driver (that drives 0V/12V). All could handle the approx 1A needed, especially as it would be a short pulse. I need to think about the other uses of these as part of the design, obviously.

The drivers are nice in that they take a lot less space, but are not as flexible as they drive the output rather than simply being an effective relay contact.

I also have to think how I make one of these - as almost all the chips I would use are on something like a year lead time! Thankfully I have several solid state relays and several driver chips in stock, and enough power supplies.

I could, of course, take the opportunity to consider using the newer ESP32-S2 modules, which seem to be available. This would all make this more of an R&D project, which is not a bad idea.

It would all take time though, and I am quite keen to have this ready for Christmas.

Shelly

There is, of course, a simple answer, and ironically likely to be the cheapest, and that is just use a Shelly1 relay module. Even needing 10 of them is not expensive, and there is space on the back of this thing. They are available and in stock for next day.

This does feel like cheating somewhat but may be the best option. Certainly worth prototyping with one of them to start with.

Then what?

One way or another I'll end up with WiFi connected indicators. So we need a way for that to work from places around the house. Buttons, or a pull cord, etc.

For this, by far the simplest is the Shelly option, as a light switch, sending an MQTT message when pressed.

P.S. Blogger is broken again, even with clearing caches, and so I cannot actually reply to comments!

P.P.S. I went with Shelly Plus 1, but my own code...

2021-11-14

Carbon cycle

I am pretty sure I did cover this in school, but I did not quite appreciate how significant it is.

One if the things that always gets me is the EXACT amount of CO₂ pulled from the atmosphere by a plant for it to grow, that I then eat, is the exact amount of CO₂ I then breath out from burning it (unless I use some of that carbon to get fatter, then that is released when one day I am cremated or eaten by bacteria). And the O₂ that is made by the plant growing is also the EXACT amount I need to use to breath to burn that plant and consume it. OK some of that goes in to poop that is used (O₂) and released (CO₂) when that is digested by bacteria. But the CO₂ is the same. It goes around in circles. The circle is complete. It works.

The carbon cycle is all about how carbon moves around in the world. Wikipedia has this the cool image.

So how to stop climate change? - it is so so simple - stop burning old carbon (i.e. fossil fuels).

It is fine to grow trees, make wood, and burn that, the carbon goes round and round.

It is fine to grow food, eat it, and breath out, the carbon goes round and round.

AFAIK cows farting is an issue, as that carbon ends up as methane with has a bigger impact, but AFAIK for less time, and apparently the answer there is feeding the cows seaweed! But generally using carbon to grow food to feed and animal that we then eat and breath out is again OK, carbon goes round and round.

Don't get me wrong, loads of other issues, too many cars and not enough walking and cycling, all sorts, but just looking at climate change, it is all down to the carbon. We'll improve a lot of other stuff by fixing the climate change issues as a side effect!

Almost anything we do with "recently" captured carbon then going to the atmosphere matters not a jot. Pull carbon from atmosphere and release it a year later - not problem. What matters is all that old carbon in fossil fuels being burned. Unless we want an atmosphere that was around a few million years ago, we need to stop.

Even all the "indirect" stuff, like carbon cost of manufacturing and transport, only matter when those processes use fossil fuels directly or indirectly. Make those processes use electricity or hydrogen from green supplies (not from fossil fuels) and they all end up carbon neutral.

The one thing, and this really is the one thing, that matters, is burning old carbon. Stuff pulled from the atmosphere millions of years ago and stuffed in the ground. Burning fossil fuels. That is what matters. That is what needs to stop. It really is as simple as that!

Heck, even making fossil fuels in to plastic which we don't burn, is not an issue! What matters is old carbon going to the atmosphere - STOP IT!

Blockchain is not the answer

Often people come up with some idea and think "blockchain" is the way to do it.

In pretty much all cases the answer is "NO!", or more often "Hell, NO", seriously. In a lot of cases the thing people are doing is something which can be, or already is, done by a central authority registry. Don't get me wrong, even a central registry may "sign" things digitally, and have signatures or signatures in a block chain style, but that is not what people mean when they talk of putting things on "blockchain".

Blockchain, as most people mean it, has some serious disadvantages too - and I mean using blockchain like the way crypto currencies are used - it means explicitly removing any central "authority". It means if you lose keys to your wallet you have lost what you "own" and no way to recover that ever. E.g. people have somehow suggested this should work for domain ownership, which is batshit insane IMHO - far better as a central authority (per top level domain), and allows the authority to resolve disputes even, and recover "lost" creds, and so on.

But hear my out - I have an idea - a sort of "ownership" which could maybe benefit from not having a central authority.

Buying a movie!

One of the things one can "buy" which is a tad on the intangible side is "a single copy of some copyright work". E.g. if I buy a movie. Once upon a time that meant I buy a physical media copy of it. You can still do this even. And you can give or sell that copy to someone else even. That instance of a copy of the movie is something that can be moved between owners as the physical object that it is.

The whole of copyright law is around the notion of "copying" a thing, so the physical copy is the key aspect here. That is all rather outdated now as copying is so basic and simple and free for data. The right more rightly exists for something like a movie in a right for me to watch that movie, not any sort of "copy" process.

However, we now live in a world where I "buy" a movie on something like Apple TV. Now this is a lot less tangible, and is more of a "licence" to "play out that movie" from "Apple TV" data storage via any of my many Apple devices.

That does not feel as useful as holding a DVD in my hand which I own. If Apple TV stopped, I could lose tens of thousands of pounds worth of video library that, in theory, I "own".

Obviously there could be some digitally signed licence of ownership of a copy, signed by the copyright holder's published public key, and identifying me. But identifying me is tricky in itself - email address? name? what? What if that ID changes?

I'm thinking this is where blockchain comes in. If a licence to own and instance of a copyright work can be created on the blockchain as owned by my digital wallet, and signed by copyright holder, then I can present that as proof to AppleTV or someone else, that has streaming services. That would provide proof that they are allowed to stream that copyright media to me. I'd have to use my wallet to sign in somehow to prove it is me, which adds to the complexity, but it identifies "me" in this context.

But it would also allow me to sell my copy to someone else if I wanted to.

It would allow for a provider that sold me the copies in the first place to go bust and I would still hold my digital wallet proving these copies are mine and I could take that to some other streamer service, even if for a nominal fee to load them on to their system.

Any such system would have to be wrapped in consumer friendly UI. It could even be a bit "behind the scenes", in that Apple could effectively manage my wallet of things purchased via them - as long as I can always obtain, and take over that wallet and legally I own it - maybe it could "live" in my apple devices that I own as a fallback, locked with my AppleID passphrase. But it could work

It would almost certainly be impossible as it would require co-operation of copyright holders, and streaming services, and the like, and possibly even legal backing. It may mean streaming services separately "sell" copyright works, and provide streaming of them for some ongoing subscription so if you come to them with your "owned" works they are not losing out.

But I think as a commercial and legal model it could, in theory, work.

I also think there is no chance of it happening :-)

2021-10-31

DEFCON Lights

A bit of fun for a change... 

Firstly, seeing as even some of my geeky mates did not know this, the US has a DEFCON level (defence condition). See wikipedia for more. There are images of DEFCON lights in a variety of films/shows (including War games, and Stargate). DEFCON 1 is most severe.

I saw RS did some rather nice 12V LED indicators, which I was using for a different projects, and realised they would make quite nice DEFCON lights.

So the shopping list:-

  • RS 791-8579 White
  • RS 791-8573 Red
  • RS 791-8589 Yellow
  • RS 791-8582 Green
  • RS 791-8585 Blue
  • RS 877-1836 Sounder
  • Amazon relay board
  • Amazon box
  • Some wire and Wagos, and I have a 12V supply in the house.

The relay board is simple, ESP12-F based (ESP8266), so flashed with Tasmota and configured the relays 1 to 8. Note these are not ideal boards as they have ground plane around the antenna. I may have to make a relay board some time for a different project that needs 9 relays, but this was fine for this fun project.

The LED modules are simple enough to wire up. As is the sounder.

The result all connects to an MQTT server over WiFi. The relays are set up on tasmota, but relay 8 (the sounder) has a pulse time set (1 second) so I can simply turn it on to make a beep. I did consider a flashing strobe light as well, but meh...

The next challenge was to work out how to drive it sensibly. Setting a light was simple, I did a cmnd/DEFCON/Backlog Power0 0;Power3 1;Power8 1 for example. This turns all lights off, turns on light 3, and makes the sounder beep for a second.

I use a FireBrick as the MQTT server, so I created some profiles for DEFCON 1 to 5. Each is testing if DHCP is active for some IPs on the WiFi, and if the higher levels are all off so only one at a time. They then have that backlog command as the "on" MQTT command with retain.

This means that I get a DEFCON depending on who is in the house. DEFCON 1 for presence of the those who shall not be named (anti-vax). Cool or what?

P.S. I am sure Letraset used to be a thing - finding transfer numbers was not easy...

2021-10-26

The COVID experience (vaccinated)

Sorry to say that COVID has managed to finally hit many of our family, in spite of (almost) all of us being very careful in lots of ways, and (almost) all of us having vaccines.

My wife has also been unwell, but we are both starting to get over it now.

I have spent the last 10 days or so feeling like shit - started like a nasty cold, and LFTs every day negative, but finally on day 4 it was +ve LFT, and then +ve PCR.

It was not until around day 8 that I lost my sense of smell, which is just weird - my nose is clear now, but I simply cannot smell, not even my ground coffee. I can still taste but it is a bit off.

Someone else described this, and I am inclined to agree - it felt like it was trying to get on my chest, but thankfully did not manage it. Even so, my blood oxygen levels dipped quite a lot. I can only imagine how bad it would have been if I had not been vaccinated.

It has been ups and downs a bit - on day 7 I really thought things were getting a lot better, I felt mostly fine with a bit of a blocked nose. I then spent days 8 and 9 in bed!

Sadly, at least one person that has now got it was unable to have a vaccine, and it looks like a newborn has it too. These are worrying times for all of us. We can only hope they recover quickly.

And those that have not got it have had to run around shopping and getting medicines for those that have - and we really do all appreciate that.

Remember, you are only as strong as the weakest link - make sure you all have your vaccines please! Don't be put off nagging people to get their vaccine, as I was. Personal choices are important, and make good sense right up until those choices impact others around you - then they are no longer just personal choices. Vaccines don't just help reduce the risk to yourself, and your family, but help reduce the spread and mutations. Getting a vaccine is being part of a community.

I do now have some IgG and IgM antibodies though. These did not show after the vaccines, which I believe is to be expected as they are different.

But everyone, stay safe.

P.S. Whilst the isolation is over, there are some symptoms lingering - a simple walk to the shops made me tired and out of breath, and I still have an annoying cough, even if no longer infectious. It will be interesting to see how long this lasts. Day 12 - can just about smell the coffee again.

P.P.S. The lingering cough is not fun - just spending an hour on a phone call really kicked it off and felt grotty for rest of the day. No idea how long this will go on for. ... Weeks later and still up and down with this.

P.P.P.S. It has lasted over a month, on and off, but finally feeling at lot more normal now.

2021-10-17

Tasmota thermostat

The tasmota code has a proper thermostat mode, but it is not in the pre-built code, so I wanted to work out a way to do this with simple rules.

There are examples, yay... But I was struggling to make sense of these.

A simple example, say I want on at 25C and off at 29C...

The obvious rules are something like this :-

ON DS18B20-1#temperature>29 DO Power 0 ENDON

ON DS18B20-1#temperature<25 DO Power 1 ENDON

This works, but every second or so it is doing Power 1 or Power 0 constantly, and reporting that on MQTT, which is a tad annoying. It is worse if you have triggers on power setting to send publish commands to other things, etc.

The other examples I have seen seem to have a similar problem, I think. Some seem to have a timer that reduces the chatter but still, I just wanted something simple that only actually logged something and only actually changed power setting, when the temperature threshold is crossed.

What I came up with is not complicated, and seems to work:-

ON DS18B20-1#temperature>%var1% do backlog var1 999;var2 25;power 0 ENDON

ON DS18B20-1#temperature<%var2% do backlog var2 -999;var1 29;power 1 ENDON

The trick is the this sets the var1/var2 meaning that the temperature is no longer triggering an event all the time once it has changed.

Bingo, it works, and is a pretty simple pair of rules. Probably worth using mem1/mem2 as the 25/29 values here to be tidier, but still. Not complicated, and reacts immediately when the temperature passes the relevant threshold.

It also means the sensor can be a separate Shelly from the relay easily, only sending the publish to change the relay on change, which is also a big improvement.

P.S. For those that do not know, a Shelly 1 is a small ESP8266 based relay/switch that can switch mains power (16A) and typically about £8 (the blue round box). It has good firmware anyway, but Tasmota is an alternative firmware (open source) which can run on most ESP8266 and ESP32 based smart devices, so can run on a Shelly 1. DS18B20 is a common temperature sensor, and more than one can be connected in parallel even (the black wire and metal tube). Shelly do an adaptor (needed for DS18B20 as they would otherwise be mains voltage) to connect to temperature sensors (the black round thing on the Shelly 1).

2021-10-15

Mitsubishi Lossnay+GUG aircon (not actually working)

We have a bit of a mystery here - the brand new, expensive, ducted air-con in the house does not work!

So what does not work exactly?

Not actually able to cool a room!

The biggest issue is it cannot cool a room - not even close. (It can't heat one much either)

This is a temperature plot for my study, 3m x 3m, you don't get a lot smaller than that in terms of a room to air-con. A=Portable unit on, B=Portable unit off, C=Start two hour cool only full fan test.

The test was with the other room vent closed so the unit was only cooling one room, in to a closed empty room, no heating on anywhere in the house, and outside temp of 19C. Not a challenge for any air-con really, and as you can see, the cheap portable unit managed with no problem (even with the door open most of the day). And yes, the fan speed control does work, and was on full.

I expected at point C the room to cool at least as fast as the cheap portable unit. What happened is it just about managed 0.8C in two hours! It was blowing cold air (measured at 9C) but not as lot...

The fix - well, the unit only has a 100mm vent in to the room. This seems small I must admit, and at full fan like this it is noisy. So they are changing to a 150mm vents today...

Did it work? In short, no. The bigger vents are quieter, which is nice, but the same tests showed maybe 1.5C drop and bottoming out just below 21C after more than an hour. Compare these big 3.5kW systems to a much cheaper 1.5kW portable unit which is able to drop my study (and hall way as door was open) from 23C to 18C in 15 minutes. With the door open the new air-con cannot cool my room at all!

This is now waiting on Mitsubishi to explain and fix. I won't say who the installers yet as they have been pretty good. Let's give them the chance to get Mitsubishi to fix it all.

But how is this even possible?

The issue for me here is that they sell this system, even with the smaller 2x 100mm outflow vents. So forgetting, for a moment, whether the suppliers got it wrong for the rooms we are trying to cool (two rooms each unit, one of which is much bigger than this 3m x 3m study), we have the issue that this whole unit running at full cooling and full fan cannot cool a 3m x 3m room.

So what the hell is the this unit for - what size room are they expecting it to be used with, ever?

The change to 150mm vents actually meant them cutting out the larger holes as the cowl as it is only supplied with the 100mm outlets.

This leads me to think something else is wrong, but we have no idea what. How could this ever work anywhere?

Cannot set temperature!

The controller has options - either "return air" temperature measured at the lossnay unit, or the room temperature at the controller. The controller has a sensor in it. Given that we have two rooms per unit, we are using the temperature at the controller (which is not in the room with the return in it). This is all as per the manual.

Only it does not work! Cooling the room down to 19C (using the portable unit, obviously), it showed 24C. Indeed, it even went up from 23C while we did this. Using freezer spray actually on its sensor does nothing, still 24C. No clue where it is measuring but it is not in the room - we even tried putting hot air in the room that has the return air flow but that did not make it go up at all.

The fix: Well, again, waiting on Mitsubishi.

Watch this space.

2021-10-08

New Mitsubishi Ducted Air-con with Lossnay (bad user interface)

As some of you will know, I have moved to sunny Wales. My new home did not have air-con so I am finally having that installed. I have gone for a ducted system this time (yes, more expensive) as it allows simple vents in the ceiling rather than a large indoor unit in the rooms, and it should be quieter. However, the main reason is that we now live on a main road, so cannot really open windows to any of the bedrooms - the ducted system I have gone for has a "lossnay" which provides fresh air as well, and saves us having to open windows. More on the actual aircon later, this post is just about the quite unbelievably bad user interface.

For a start this is an "industrial" air-con, which sadly means it is a simple wired controller and not WiFi, or anything useful like that - do not be surprised to find a "reverse engineering Mitsubishi air-con controllers" in a future blog post :-)

The air-con is three parts, an outdoor unit, and indoor unit (GUG) which does the cooling/heating, and a lossnay which does the fresh air (filtering and heat exchange). This is in the loft...

The lossnay is on the left and the GUG is on the right. To be clear, the GUG is designed to work with a lossnay, it cannot work without one as it has no fans of its own. I think the lossnay could be used for fresh air without a GUG though.

Controller

The controller is not too bad, it has a dot matrix LCD and buttons. It is newer than some where they have fixed icons on LCD. It has the obvious controls: mode, temperature, and fan speed. Good.

But, no. The fan speed says "unsupported function" if you try and change it. You need to have a separate "lossnay controller", which basically just lets you set the fan speed.

But there is a 4 wire link cable between the lossnay and GUG, what the hell is that used for? Well, all I can see is that it means is it turns off the lossnay when turning off the GUG. Remember the GUG can only be used with a lossnay attached, this is not some obscure optional extra.

We (myself and the installer) found the setting to tell the GUG it has a lossnay connected (but this unit cannot work without one so why is there even a setting?!), and it shows a nice icon indicating it has a lossnay. But still does not let you control the lossnay from it. Why? Also, the icon looks like it shows the "mode" the lossnay is in (yes, it seems to have a non heat exchange mode, which is pointless) and fan speed, but in fact the icon does not change to actually show the mode or fan speed. How shit is the UI?

Apparently you can run the lossnay without a controller, and the GUG will turn on/off at full fan speed, which is not that useful.

Of course, this also means you cannot run the fan in an auto mode as the lossnay does not know what the GUG is doing. So you cannot have full fan to get to temperature and quiet fan to maintain temperature.

Oh, and crossed zeros. A pet hate of mine. This is not a hand written COBOL coding sheet in the '70s, it is a temperature display. Why make it look like 28℃ not 20℃ to anyone with poor eyesight?

Another gem is that you can turn the temperature down to 12℃, nice, but then it snaps back to 19℃. Why 19℃, that is way higher than I have seen on other air-cons - it will probably do as I would rarely want it that cold. But still, why? And why allow setting below that if it cannot be set lower? Just stupid UI again!

Another thing that seems odd is that the controllers are identical. Same display, and buttons. Looks like identical hardware. The lossnay controller even has a thermometer in it even though it does not need it. But they must have different firmware as they cannot be swapped around. I would have made one controller and made it generic to work anything, but no, they are different!

2021-09-23

A use for the keypad

The Solar System alarm that I have created does work with a standard Honeywell Galaxy Mk7 keypad/display module.

However, until now, I have not really managed to work out a good use for how the keypad can be part of the system. But I have been working on that.

We now have clear display of inputs that trigger alarm, or inhibit setting, or faults, or tampers. We have setting the alarm, and unsetting using a PIN. Yay!

The way it all works is down to a small PCB, designed to fit inside the case of the display. It works off the same 12V supply, and provides RS485 to the keypad/display.








2021-09-04

Shelly1 on 12V

I have used Shelly1 for a while, and have loads of them in use.

One of the nice features is they can run from 12V. Well, actually, they can run from mains, 24V-60V DC, 12V DC, or (via connector pins) 3.3V DC. You move a link for 12V working. Pretty versatile.

I have used them in the house here on my door bell circuit which runs from a standard alarm system 12V battery box. All fine.

I planned to use with an alarm system as well, running from the 12V battery box. First two were fine, but then the next did not work. I tried another and it also did not work.

I did some googling and people report that the 12V is meant to be exactly 12V. I must ask Shelly to confirm really, but the comments were 12V and not a battery (which is 13.8V). My example use was actually 14V. It would be a pain if it could not run from a standard 12V battery box.

Well, pushed for time, I found some 12V LDO linear regulators and got for next day. Oddly when installing these to give an exact 12V clean DC for the Shelly, the ones that were not working still did not work?!? I tried yet more, and they did work.

What is even weirder is one that was working off 14V did not work off 12V, so I had to find another. It is a good job I had 20 of them.

So it seems the 12V working, is, err, fussy, and inconsistent.

Anyone else seen this?

What a week!

This has been a hell of a week, and far more actual hard work than I am used too, and after it all (averaging over 15k steps a day) I have not even lost any weight!

The plan was simple, replace existing 7 door system, and PIRs and exit contacts, and so on. 28 modules in total. I have carefully made and tested all the modules and spares. All ready to go.

But I ended up making work for myself by tidying the wiring. The new system just needs power, so ended up with 6 battery boxes, and removing the old power and bus wiring. Much neater. I also needed to change the exits from rangers (that were unreliable) to new exit buttons, and hence also needed to change the break-glass boxes as they were integral. And I wanted to move the break-glasses further from the letter box (for obvious reasons). This meant running wires down the aluminium door frames on the front doors (to be tidy), which is easier said than door. I probably wasted a day on that (and I had some help). I can recommend NYLON CABLE & FLEX DRAW TAPE 30M (98FT) (screwfix 75807) for the job :-)

Finding the cable runs to bell boxes was also fun, and I gave up chasing wires to original PIR and door sensors and just ran new cables. Ceiling tiles for the win.

We actually have a mystery - the original alarm when we moved in was removed something like a decade ago, but the PIRs were still in place. When the new galaxy alarm was installed new PIRs were put in. I have actually put in new PIRs this time with integral ESP32 WiFi modules in the PIR. Part of the work was removing the galaxy system which replaced have already replaced what was there before, and removing all the old battery boxes. The original PIRs still have power and blink when people move? But there are *NO* battery boxes nor alarm panels in the building at all. I have literally removed them all, and the new battery boxes only go to my new kit. So WTAF. If I had time I'd have investigated further, but it is a mystery!

The result is it took a whole week, and I have to admit I was losing my enthusiasm somewhat during the week.

What did not help is finding some bugs and issues. I expected some, and a couple of small snags were simple, but the biggest issue was the wifi mesh being unstable. It was fine at the start but got worse during the week. I found issues with multiple wifi channels (2.4GHz) which I fixed with config changes on the APs. But I would find the mesh unstable. Reseting the wifi could fix, but not always, and changes to wifi config helped, but not in a concrete way. I wasted a lot of time on that. But ploughed on with the installed.

But Friday it was clear the problem was now intractable - the modules were all resetting every 30 seconds or so. The nice thing is the system was still usable. People in the office could come and go, as it resets very quickly and works autonomously. But it cannot work as an alarm if the mesh is not working.

It seems (and I have to do a lot more bench test and investigation to be sure) that the modules may be running out of memory when the mesh gets beyond around 12 units. This is very disappointing as I I can't see why the mesh would need much memory at all - each routing entry is a 6 byte MAC and very little else. It will be interesting to investigate.

Thankfully the site is two distinct adjacent units, so the fix was to make it two sites. That is a pain, as it means provisioning fobs for two sites, and if someone had not mistakenly ordered only 2k DESFire fobs, that would be easy, so new fobs were programmed, again! Just means slightly more admin. I cut down the sites slightly and ended with both sides with 12 units. When one had 13 it was not quite stable, but 12 seems fine. So we have a work around.

It may be that in longer term we need some modules using ESPs with extra RAM to act as root nodes, something to consider if I cannot track down the memory footprint problem.

Even so, the end result seems really good. Time will tell.

P.S. I have improved stability a lot with some tweaks to the way we work the mesh, but not solved the underlying issue. I suspect big step will be waiting for mesh code in ESP IDF to mature a little. Like cheese.

2021-08-29

Solar System goes live

As I have said, I have been working on a number of boards as part of a project that provides access control and alarm functions in a modular way: https://github.com/revk/SolarSystem

I have test systems on my bench, and I now have a small system at home. It is all working well and has helped me iron out some of the bugs.

But this week is the first proper system with 28 live WiFi nodes, meshed, and linked to the back-end cloud control. Scary stuff. It has bell boxes, keypads, PIRs, reed switches on doors, fire alarm inputs, even a panic button in a disabled toilet. Importantly it has a lot of doors. The design is pretty robust, and the whole project is all open source.

My case is packed, and boxes of tools and parts are all ready. It was a lot of work making all the modules. A lot of time with a steady hand with tweezers. I even have half a dozen spares, just in case.

So the night before I head off to start the install, I have imposter syndrome kicking in. How did I think I could possibly design and make a complete access control and alarm system from scratch (PCBs and s/w)? Well, seriously, I need to give myself a kick - I have been doing this shit long enough to know this is bullshit. It will be fine.

Assuming all is well (and I know there will be teething problems, bugs, and features, all of which will need addressing), my next big challenge is whether I can progress this in to a proper product to sell. At the very least, to make the modules (as pictured above) something we can legally sell.

In the mean time, other hackspaces that are interested, do get in touch, and I can help you set up such a system.

2021-08-28

NHS covid pass

I decided to check how I get an NHS COVID19 pass / QR code.

Update: Thanks to all that pointed out the couple of subtle clues on how to get an NHS login, which I missed initially.

I googled, and it seems you can ask for a letter or get it digitally, cool. But you need an "NHS login".

Well, I don't know what an NHS login is, but there is this helpful site, https://help.login.nhs.uk which tells you all about it. Nice.

This looks comprehensive. But I don't have an "NHS login", so let's try the "How to set up [an] NHS login"... https://help.login.nhs.uk/setupnhslogin/


OK, we have "What is NHS login" and "What you need to set up an NHS login" (yes, an "an" this time). There are other pages with more information on how to prove who you are, etc. There is the "Where can you use NHS login". OK, good.

Update: For those saying "just use the NHS app", I'm in Wales now, and it does not work!

Update: Oooh, it says clicking the button lets you create a login there, missed that the first time, but the the actual login page does not say that.

But call me thick, and maybe I am being blind here, but where is the "Register for an NHS login" or "Create an NHS login" link or "how to" on that? I looked around and cannot find it. It does not seem to actually tell you "How to set up NHS login" at all, missing that one crucial step of how you start the process!

I kept looking and I found the NHS COVID pass page, https://covid-status.service.nhsx.nhs.uk which has a login link.

Nothing about registering or creating an NHS login on there either. What am I missing.

Well, on a whim, I clicked on the "Continue with NHS login" link, even though I don't have one. Is continuing with NHS login when I don't have one "hacking"? A breach of The Computer Misuse Act 1990 maybe? You then get a login page...

Well, I don't have an "NHS login". What I did not spot initially was the "If you do not have an NHS login" bit. This seems to be the first clue that maybe I can make one if I enter my email address anyway. Why is this hidden away behind a "Continue with NHS login" link?

So now I get the option to "Set up a new NHS login". This is what I had been looking for all along. How the hell is this not on the the help site, or, well, anywhere before you actually try and "login"?

Update: One page for COVID19 Pass does say "You will need an NHS login to use these services. You'll be asked to create one if you do not have an NHS login already" but the page you then go to does not say that, just "continue with NHS login".

Anyway, I continued to create an NHS login. You go on through a few info pages, and create a password, and then this error...

Well, that is helpful. Giving that the previous page was password selection, and I used the browsers password manager to make a "secure" password, I naturally assume it is as password issue. So I try entering a password manually. I tried several passwords, simpler and simpler, and no joy. It simply would not work.

Then, on a whim, I tried a different email address. Just to be clear, that first page does do some validation on email addresses, e.g. ...

So I really had no reason to expect that it was unhappy with my valid email address. But indeed, using a different email address, it actually allowed me to proceed beyond the password set up. I have emailed them asking that they correct my email address, obviously.

When it came to mobile checking, I decided to use an 07 number, rather than trying 01 number, as clearly it is a stupid web site.

The domestic (48 hour!) QR code does not need any more than name, DOB, NHS number. The other longer pass needs ID image and a video and I'm waiting for that to be confirmed now. However, having seen someone else's, I note that the document says this...

OK, so it has an expiry, but how exactly does that expiry "protect you data privacy". The barcode does not fade after 30 days. The "data" is still in the expired barcode, and can still be read. So how exactly does the expiry protection anything - how does it do any more than cause inconvenience for the user?

Indeed, I am told if you request a COVID letter, there is no expiry - so do they not care about your data privacy when sending a letter, or was that just a lie? Having an expiry actually makes "data privacy" worse - if you printed the QR code, you will have to dispose of that securely somehow every time it expires. Why not just be honest?

And finally... The Welsh site https://gov.wales/nhs-covid-pass-prove-your-vaccination-status says :-

But the "domestic" QR code it gives you says ...

So how do I get a QR code valid in Wales?

The power of eSIMs

I was always skeptical of eSIMs. The idea you have a mobile identity in a physical SIM that you control seems a sensible approach. An eSIM i...