2024-03-24

Hot tubbing...

I have a hot tub, it came with the house over 3 years ago.

Managing a hot tub is complicated, and expensive. The expensive part is the power. But chemicals also cost. For reference, it uses around 17kWh a day on average.

I use it, I spend typically an hour or two reading a (waterproof) e-book in the hot tub most days. It is very relaxing and I feel worth it. And then Alice (granddaughter) might like to join me on occasion too :-)

When we moved in, a hot tub was new to me, and I read up on it. You need to maintain the pH, and chlorine levels, which means chemicals (last people left some for us).

Initially it got cloudy quickly, but after some time I found "clarifier" stuff. Eventually I found some cool "tablets" that have chlorine and clarifier and you put in a "floater" to dissolve slowly over several days. This worked well.

I eventually got to the stage that for at least a month the hot tub was clear and nice. But it would gradually go off. It would change a tad from a slight blue (which is normal, unless you have heavy water which is clear!), and change to a green tinge. The pH test strip would go a colour not even on the bottle. It would become a tad cloudy and more unpleasant and I would empty and refill it. This would typically take a month or so to happen.

More recently (and this is over there years now), it has changed. I got some new "pH increaser" (as what the previous people left had run out) and new "chlorine and clarifier tablets", and a new "floater" that allow slower dissolving. I have no idea which of these has helped.

But for the last, nearly, three months (and I had to check my power logs to confirm last refill), it has been nice. Crystal clear, blue not green, not cloudy. I have not even had to change the filter (which I typically do when empty/refill as compared to power cost of doing so a new filter is cheap). The pH has been stable, and sensible, and not a stupid colour.

I do have a wet vacuum cleaner thing that allows me to extract any flotsam that, err, sinks, (leaves and shit), so does not get to filters, rather nicely.

I don't know which of these things helped, but it is way better now.

I can only conclude hot tub chemistry is basically voodoo, much like RF PCB tracking design.

P.S. Environmentalists, we make more solar than the hot tub uses on average.

Learning to count [in recycling] ♳♴♵♶♷♸♹

It was predicted the first rant would be about council not collecting a bin - sorry to disappoint, it is about the Brady label printer and its labels.

You will notice the recycling symbol on the cartridge. I can only assume there are incentives for companies to do this or possible some apparent PR in doing so.

But let's consider this specific case, a plastic cartridge for printed labels. I wonder what bin that goes in, especially as my council seem to have quite a complicated mix of bins to choose from.

Well, helpfully, Brady include a little (paper) leaflet in with the cartridge to help you know.

This is it.

There you go, recycling instructions, in lots and lots of languages. The fact that the only text is actually the bit saying "recycling instructions" makes that a tad crazy to me.

But what are the instructions... Surely it is just which bin to put it in? Well, let's look... WOW!

Only 6 steps...

  • Use a screwdriver to remove the chip.
  • Use a screwdriver to break apart.
  • Break apart.
  • Remove remnants of label (this goes in general waste bin 🗑), and the bottom of the case which goes in ♸.
  • Separate the spindle in to 3 parts, one goes in general waste 🗑, and two in ♹.
  • Finally dispose of the rest, a washer in ♳PETE (is that the same as just ♳?), and a washer in ♴HDPE (is that the same as just ♴), The chip in electrical waste (WEEE) which is not something the council collect and I don't even have a unicode symbol for. Some in a 40 FE waste (again, not finding a symbol for that), and another washer thing, and the top of case in ♹ (unlike the bottom of the case which is in ♸).

The leaflet ignores (and I have emailed Brady to ask why):-

  • The leaflet itself, presumably paper waste?
  • The cardboard box it comes in, presumably card waste?
  • The plastic bag it comes in - maybe non-recyclable, or perhaps another plastic waste number?
  • The backing paper that you remove when printing a label?
  • The label itself if later removed and disposed of? This is presumably a per product matter as they do different materials for labels.

This is at least EIGHT different types of waste you are expected to separate somehow (maybe 9 if the wrapper is another plastic type), on a small label cartridge. And I have no clue how those different types of waste map to the council bins, seriously. And I am not paid for this!

To clarify:-

  1. ♳PETE for a washer
  2. ♴HDPE for a washer
  3. WEEE for the chip
  4. 40FE for some metal bits
  5. ♸ for case bottom
  6. ♹ for case top
  7. General (non recyclable) 🗑 for tail of label
  8. Paper waste for instruction leaflet, and assuming the same, card waste for the box
  9. The plastic bag, not mentioned, may be 🗑 or maybe not
  10. The backing paper (is it paper) for the label
  11. The printed label itself - per label type, I assume

The fact that even Unicode cannot keep up with the number of waste types is clue here.

Please tell me this makes sense

Updates:

  • I have emailed the council with a link to this asking which bag each of the 8/9 types of waste apply, I'll post their reply.
  • Surely people making "clone" label packs will want the chip, rather than going to WEEE?
  • I am told these symbols ♳ to ♹ don't mean "recycling" but are just types of plastic, so as "recycling instructions" these are bullshit, and actually most of it is simply not recyclable. Will be interesting to see what council say.
  • Would it not be better to make these things so they can open, and load a new reel of paper and close - reusing instead of recycling?

2024-03-23

Brady M211

I got a new toy. A Brady M211.

I used to have the hand held thing, the BPM21-PLUS (so not even the M210), with A-Z keyboard.

Label printers are handy, honest, but the labels are stupidly expensive for what they are.

So what is different about this?

The good things are, it is a robust unit, with rechargeable batteries (USB-C socket), operated by bluetooth from a phone app. Works well. Built in cutter. The app has a lot of options, including many barcodes, more fonts, images, lots more symbols, and so on. The fact you can save labels and formats is great. So yay, nice. love it.

Also seems designed for workmen, and can come with a belt clip and the like. Sold as "robust", toolkit type device, and looks the part.

The down side?

One of the main issues I found was this new "authentic™" thing. I wondered why a new logo. Turns out the old label stock had simple electrical contacts to tell the labeller which it is, but now they have something "smart", compatible with the old labeller still.

So I gave the old labeller to my son, and found that I ended up with 9 label cartridges that actually don't even work with the new labeller - so he is doing well out of this. A couple are clones, but the rest are genuine BRADY®, just older stock. At something like £30 each, that is annoying.

I don't expect it will stop clones, but is rather annoying.

There are also a list of issues I have emailed them about. I think they can fix all, and will be interesting to see if they do. No reply yet!

  1. It has date/time options, which is great, and has a load of formats. But lacks the one and only format I would ever use, the standard, ISO8601. How did they forget that?!
  2. It does barcodes, loads of formats, and can even scan an existing barcode and make one, but the default font uses crossed zeros, even for EAN which is meant to be OCR-B and very much not crossed zeros.
  3. They have a lot of symbols, including a load of COVID19 warnings, but don't have antistatic sensitive device symbol?!
  4. They do QR codes, but they are not well coded and so way more dense than they need to be. I suggested my QR library.
  5. I installed some extra fonts on my iPhone (that is a faff), notably OCR-B. They show in other apps, but for some reason the Brady app does not see them - arg! I found a font menu, which allows me to install more fonts - why not use the iPhone fonts system, but OK! I now have OCR-B as default, which is cool.

Overall?

It's a label printer, and prints labels, it works. I really like (as before) the self-laminating cable labels (one of my main uses). It does "just work", and is very nice. Just expensive to use, and those niggles. But, overall, very cool. And yes, I got fonts working. Just don't ask about recycling!

No, not this, SMBC...

Bugfix of Damocles

There are a few things that crop up in software development, and I am sure in other engineering.

I am sure some people have heard of is the Heisenbug. Which is a play on words related to Heisenberg uncertainty principle, which, in simplest terms, means that when you try to measure/observe something, you change it. In software a Heisenbug is a bug which goes away (or moves) when you add code to try and debug or measure it. They are not that common, but when they happen they are really a pain in the neck.

So today I want to coin a new phrase (and I bet I am not the first), the Bugfix of Damocles. Like the Sword of Damocles, with the risk of something happening any moment.

This particular bug fix is a hopeful fix to a bug, one you really think will fix the problem but cannot, for various reasons, be sure. This happens notably when you have an intermittent problem, perhaps one that takes days or weeks to manifest, and even worse when it is a problem that only happens on a live system. So you have no choice but to try the bug fix on real customers.

  • It will take days, weeks, or months to know if the bug fix works and fixes the bug.
  • However, you may find that it does not fix it at any moment (i.e. when the bug happens, the system crashes, or whatever).

It is a stressful time.

I won't go in to details on the latest Bugfix of Damocles that is stressing me, and my team, as they will be doing an awesome blog post on this, and the previous issue, both of which are really obscure hardware issues that we are working around (we hope).

But, suffice to say, I have made a new mode for my e-paper signs (thanks for suggestion Daniel).

P.S. The sign now uses SNMP to update automatically :-)

2024-03-16

Missing unix/linux/posix file open option

What I would like is a file open option for "create replacement file".

The idea is that this makes a new inode in the same mount point as the target filename, which has no actual directory entry, but on close it replaces the directory entry of the specified path with the new file.

Why?

There are many situations where you want to make a new file to replace an existing file, but want the change from old to new file to be atomic at the file system level.

Something reading the half written new file is bad.

So you make a new temporary file, and then finally use rename() to replace the original, but that is only atomic if you are on the same mount point. You cannot simply use a mktemp() in /tmp for that as the target file may not be on the same mount point as /tmp. So you make a file with a dot prefix and some suffix or something. Messy. And needs cleaning up if you crash.

Easy?

It really would not be hard, I am sure, for the underlying filing system to support this as a file open mode. The atomic replacement of the directory entry is already a thing in rename(), and the idea of a file not in a directory but using space while open is easy - make a file and unlink it before closing. So the underlying mechanisms for this exist.

The only caveat, as a really useful extra feature, would be if not a "clean" close() call, i.e. a close because code aborted or exited without calling close(), it would *not* replace the original, just lose the new file as not in a directory. This helps cover the crash case, and always cleans up inherently.

This would be so useful.

And, of course, make gcc use this for making binaries!!!

Just to be clear, I am not suggesting "buffering" the whole file. The system to have an open file not in a directory already exists. One can create a file and open it and unlink it and still write to it, on to "disk". That is the "buffering" here. Just atomically either lose the new file (if crash, as would happen if you did that) or replace the directory entry with it and lose the old file, on clean close() call.

You can nearly do it!

Thanks for all the feedback, it is close... open() explains a _GNU_SOURCE specific option O_TMPFILE. This allows you to create an unnamed file which will vanish when you close, even if you crash. It then explains you can use a slightly convoluted call to linkat() to name the file before you close it. This nearly does the job, but not quite.

  1. The open() call needs a directory so it knows file system. Annoyingly you cannot pass the filename you want and have it work out the directory. It has to be the directory, meaning you have to faff about getting the directory from the file name. Not a big faff, obviously.
  2. The linkat() call needs CAP_DAC_READ_SEARCH set. There is a convoluted way to using /proc/ otherwise. More faff. Also, given that there is a documented way around the limitation, why is it dependant on a capability in the first place?!
  3. The linkat() call expects the new filename not to exist.

This does allow a file to be atomically created as a complete file, with no temp files if you crash. But this last point is the show stopper as it means you have to unlink() first, leaving a small window where the file does not exist. That or you link to a temporary file name and use rename() which puts us almost back where we started, albeit with a smaller window for leaving a temp file behind.

The obvious fix would be a new flag to linkat() to allow replacing the new file. That or allow AT_EMPTY_PATH in renameat2().

2024-03-12

Separating waste

I was not sure of posting this as it makes us look bad, so sorry about this.

Over the last few, what, decades, domestic waste collection has changed. And mostly without us noticing!

It all started a long time ago, we used to have a "dustbin" and any number of black bags taken away by the council. They had a legal obligation to remove all domestic waste.

Then one day it was "green wheelie bin", and they provided one. There were sizes for different houses. At this time we had five kids, and, I think, a lodger. We made plenty of domestic waste. We got a big bin.

So it was wheelie bin and extra bags.

Then the council said they would not take extra bags - it was because the vehicles were all set up for wheelie bins now. It made it much more efficient. So I asked.. "If it is more efficient, how much can I expect to see a reduction on my council tax bill?", and I did not get a sensible answer. I asked how they know it is more efficient, with no helpful answer!

Anyway, they said they were not restricting the amount of waste we produce, but it was a limitation of the vehicles, so I suggested "fine, empty the wheelie bin, then put the extra bags in the empty bin, and empty that". It was a simple and practical solution, but for some reason they were not happy to do that, suggesting their "reason" for not doing it was not as they said.

The answer was simple.

We purchased another wheelie bin!

For some time, many years, this worked, even when we moved house. And many locals had an extra wheelie bin.

Then, one day, with a note saying the would now only collect one wheelie bin, they stole our extra wheelie bin! I meant to sue them for the cost.

I gave up!

This is very unlike me, but I decided to give up!

Just to be clear, I was not giving up on recycling or trying to avoid it. At the time the council only did the one type of collection - the general waste green wheelie bin. My issue is they stole one of our bins and refused to actually collect all the waste we produced.

So I simply engaged a commercial bin collection at the house.

I kept meaning to bill the council for this on the basis they had a legal obligation to collect all domestic waste, and were failing. I never got around to it.

When we moved, 3 years ago, we kept the commercial collection, simples. Why not?

Left out of the loop here

The problem is we have been left out of the loop here. For decades now we have simply put all rubbish in one bin, with black bags, and that was it, as we have for decades before.

Whilst others have gone through many changes of many coloured bins and bags and so on, we have not.

Turning over a new leaf...

As Wales have now made even commercial properties do waste separation, we have to get in to this, all of a sudden. This is a bit of a shock.

It does not look too hard, honest. Cans, bottles, card and paper, etc.

It seems laws have changed over the many years. We have not had to notice.

So yes, we are finally doing the domestic waste separation - thrown in the deep end. I am almost shocked you cannot just pay someone to do that for you - seems an obvious commercial opportunity.

It means a place in the house for the various bags, and bins, and containers. Finding what day they collect each. But I am sure we will manage.

Thanks to one of my daughter's for help with this.

Doing things right.

As someone says, I like to do things right, and we do have solar power generation we feed in to the grid and a green energy tariff and so on. I don't drive, and have not for decades. We had not actively tried to avoid waste separation, but to be honest I have not looked in to it either. It all kicked off with the council being arseholes and stealing our bin, and then it was a non issue as we got a commercial bin.

I am not entirely convinced the pushing responsibility on to individuals just going about their lives is the answer to climate issues, when so many big industries dwarf anything we can do, to be honest, but I do understand we do all need to take things seriously, and I already do quite a bit - just not this specific bit until now. Sorry. And I chose to post this to say sorry to some extent.

Update:

Wow, it is crazy, there seem to be no standards. I decided it would be a good idea to get some partitioned and/or stacked bins for the house. Make sense.

But the labelling and colours do not match what the council have. And the categories do not match. E.g. we have a green plastic tub for glass, but tins go in with plastic. Yet almost all bins you can by combined glass and tins in one bin, so would have misleading labelling, and nothing matches the colours.

2024-03-11

How not to QR (again)

I have mentioned a bit about QR codes before (here).

But today I saw an example of a QR done badly!

The QR code contains a reference, an alphanumeric code and number, and name of student. But the passcode is just the first part (8 character code).

So what is wrong here?

  1. The machine readable part, the QR code, has the redundant extra information of student name, why? QR has error check and correction code, so no need.
  2. People expect a QR code to be scannable, and for that to be anything useful it is best done as a URL. This is just text.
  3. The instructions ask you to go to a web site, and enter a pass code.

This could be so much better as a URL with a passcode on the end, perhaps as a query.

  1. The user could scan it, and even if it only went to the web site, that saves a lot of typing.
  2. The web site could use the query on the end to actually do the next step and save typing the passcode.
  3. If they need the QR for face to face stuff, collecting photos, whatever (which does not seem top be the case, so why even have the QR code at all on the paperwork), then scanning can easily skip the URL part and read the passcode part. Though the wording sounds like this may be printed first and scanned as part of taking photos - fine, scan with a URL in it, that does no harm.

And example of a case we have is serial numbers on FireBricks.

The QR code contains HTTPS://FB0.UK/900000050159 which serves two purposes. When scanned by a user it goes to the product page, but when scanned by my staff for a serial number on a delivery note or invoice, the HTTPS://FB0.UK/ is skipped by the system and the serial number correctly recorded.

Hot tubbing...

I have a hot tub, it came with the house over 3 years ago. Managing a hot tub is complicated, and expensive. The expensive part is the power...