2019-07-29

🚲 Paint only cycle lines

I shared a slightly amusing video of an "incident" on my way back from costa (here) and a friend of mine commented that there was a cycle lane next to the road on which I was cycling, and asked why I was not using it.

I think he genuinely does not realise why I would not use that cycle lane. So I wanted to try and explain a little.

Firstly, and importantly, there are quite a lot of original cycle lanes in Bracknell. The town planners included these, and they go places that are different to the roads (see the tree lines on the image on the right, for example). A lot of them are a proper road surface, wide enough for bikes to pass each way, with proper curbs and separate pedestrian paths along side. They link sensibly to roads, and notable go easily under the major road junctions. These I use, when they go where I want to go. Sadly, even though they have clearly distinct pedestrian paths along side you still get pedestrians meandering in the cycle path, which is a nuisance, and seems to be for no obvious reason or advantage to the pedestrian.

However, like a lot of places, there are a lot of cycle lanes in "paint only". I.e. they are former foot paths that now have paint and signs. Some are split with cycling one side and pedestrian the other side, but quite often it is just shared use on what used to be the foot path.



So, I want to try and explain to my friend, who drives a Tesla. It is a nice car, and if I get a car it will probably be a Tesla. They are quiet, and quite impressive.

Dedicated Tesla lanes

So imagine the council were going to make dedicated lanes for Teslas. Now, ideally these would be specially suited to such a car, smooth road surface, good white lines so the auto-pilot can see them clearly, fences to stop pedestrians accessing the lane, maybe even a special higher speed limit. If you have a special Tesla lane that gave you some advantage over the road you would use it.

Except...
  • The special lane is actually a bit narrow
  • It has a poor road surface
  • Access to the lane is not seamless - it has a bit of a step up, or some cobbles, or a bollard you have to go around, or even a chicane / kink so you have to manoeuvre to get on to and off the lane.
  • The lane has numerous obstacles (signs, bins, bus stops), with just enough space to get around them, but you have to watch out for them and manoeuvre around them.
  • Some of the signs are two pole sign where the sign you have to go between, but the sign is low enough you are not sure you can drive under, or some Telsas won't fit under.
  • The lane is actually two way, but not mostly wide enough to pass other vehicles, so you have to co-ordinate with the other driver to pass where you can, slowing down, moving over, etc.
  • There are pedestrians allowed on the lane, and they don't hear you coming (Teslas are quiet) so you have to beep the horn, and they get all indignant. Even when there is space to pass them, you have to slow down in case they step in front of you or wave their arms about for no reason.
  • The lane does not actually go very far, it stops at the next side road, and you have to get off the lane and cross a side road (giving way). You may even have fewer rights than a pedestrian (who has priority over cars driving in to the side road, not that many drivers realise that). Then you can get on to a new special Tesla lane the other side of the side road.
  • Actually, often there is no follow on lane, you have to re-join the main road, or perhaps there is another lane the other side of the main road.
You could suffer all of this, or you could just use the main road, as you are entitled to anyway, and which goes the same place as the special lane (without all the hassle and giving way at each side road, etc).

As a Tesla driver, would you use these special lanes?


2019-07-18

Environmental sensors

For my next little project I am thinking of making a good little environmental sensor box, mainly for CO₂ and temperature as they are the two things I have some control over.

ESP8266 based, why not. But I have been looking at the sensors you can get, and bought a few.

Are all CO₂ sensors crap?

Well, I tried a few, including this CJMCU module (CCS811 based) and this AppliedSensor module.

Sorry to say, but both are crap! And the detail is in the small print - they estimate CO₂ from other sensors, and are very easily confused. I have some isopropyl alcohol and you use that anywhere near them and they quickly say 18000ppm CO₂. Even without such factors they swing wildly all over the place.

It seems you need an NDIR based sensor, and I found this one which seems to actually work! This SCD30 sensor seems to be the business, with CO₂, temperature and humidity (floating point!) via I²C.


Next step - sort a suitable display and box.

I can then use the temperature to control the air-conditioning, and the CO₂ to control extractor fan speed.

2019-07-13

Door control

My door control and alarm system has made some progress.

The main change is making access control a bit more distinct from alarm system. The doors at the office were "falling off" the WiFi occasionally, even if only for a few seconds at a time, a few times a day.

I suspect that can be fixed, and it makes a huge difference what channels we use. The AP report something like 60 interfering APs.

So the change is to make the doors work autonomously which means the door controller has to be able to authenticate the fob/card used but also know enough to tell if it is allowed access.

I have actually created six levels of integration and autonomy for door control linking to alarm system.

This means things like times of day, depending on day of week, which doors they can access, and expiry dates and the like (i.e. some way to be sure a lost card is now invalid).

However, the DESFire cards are a challenge at best. I cannot have any operation that produces an error as that kills the authentication. So I have to only read files that exist, and only read the right length of the file, etc.

My original design was to have files for various aspects of security. Allowed doors; Barred doors; Start and end times; Start date/time; expiry date/time. The idea wast to get the file ID list and decide what to check depending on what files existing.

But even that is a challenge if any files can be variable length. The allowed/barred lists are like this, as are other files. So you have to check the file size for each file first.

Before you know it you are doing dozens of operations to the card, each taking tens of milliseconds.

So I ended up making a system that uses a single "access file", which I expect to exist. I ask the size and then read it. In that file I encode the various things I need like allowed and barred doors, and access times. But it is just those two operations on the card and hence a quick operation.

The end result is an autonomous door control system on an ESP8266 based door controller. It even has expiry update so that a card not used for X days expires. I obviously have blacklisting, but that also zaps the file if a blacklisted card is used.

The next step is some key roll-over logic as well as extra belt-and-braces old card expiry logic.

This is giving a fast enough process for door control. Yay!

2019-07-04

DoH and VPNs and trust

We live in a strange world - where trust is a complex issue.

Once upon a time we would all trust the "authorities", i.e. the police and our own governments, but increasingly we live in a world where a lot of people have good reason (not criminal reasons, even) not to trust people.

The Internet is an especially complicated area where international players of all sorts come in to play, with commercial and political and criminal reasons to cause you concern.

The Internet protocols have been built on a lot of trust, but now we see some new mechanisms to help, two of these being DoH and VPNs.

DoH

DNS over https is one element, with DNSSEC being another. Using DoH means you use an https request to some external server to make your DNS requests.

An https request looks much like any other, and could as easily be your accessing facebook as accessing a DoH server. It is not something that can be snooped on, or selectively blocked.

If you do not trust your ISP to provide "clean" DNS without filtering or snooping, DoH allows you to choose someone else to trust. This is the problem, you have to trust someone, but you have a choice of who you trust.

In addition to DoH, you can also use DNSSEC to validate the accuracy of the responses. Using DoH means someone in the middle cannot snoop, or easily do any selective blocking. But whoever offers the DoH service could.

VPN

A VPN provider works in much the same way - you effectively choose a different "ISP" to provide your Internet access via the ISP you use. Again, choosing who to trust.

I was surprised how popular our own (unencrypted) L2TP service has been at A&A. In time we'll be offering IPsec based virtual ISP services too, I am sure.

Browsers doing DoH

Mozilla are working on using DoH in browsers, which means someone (like an ISP) cannot snoop, or selectively block, DNS requests. It is sad that this is even necessary. Note that AAISP do not filter or block any DNS, and have no plans to.

Oddly this upset ISPA, who has considered making Mozilla their "Internet villain" this year for DoH work.

This seems odd. If an ISP has an order to block some DNS, then they cannot block DoH, but so what? they are complying still!

I was surprised ISPA took that stance, even as a joke award for Internet villain. I can only hope they do not select them as the villain.

So A&A have donated the same amount as an ISPA membership, £2,940, to Mozilla. We have not been ISPA members for some time, but this is the first time I felt ISPA were perhaps taking views I did not really agree with.

We all benefit from the work of Mozilla so much every day, this seemed well worthwhile.

Amazon Yesterday

Amazon do a lot right, but sometimes they do some of the simple things wrong.

Getting it right

They are quite good at showing when they can deliver, clearly, e.g. "Get it by tomorrow if you order within next 5 hours", etc.

They are quite good at then managing to deliver on the agreed date.

Caught out

However, I have been caught out by changing delivery address (e.g. to Wales) and the dates change. This is actually quite good of Amazon, as they have worked out they cannot do the same delivery date, but I have been caught out and not noticed the change.

Things can go wrong

Obviously things can go wrong and they miss the agreed date. Nobody is perfect. They are pretty bad at then sorting it quickly or telling you when it will arrive, but thankfully this is not that often.

Getting the simple things wrong

What does bug me though is some of the silly things they get wrong. They will have "get it by [tomorrow]" on the buy now page but when you order the confirmation may magically change to the day later. If you don't spot it, you can be waiting in all day for a delivery that won't come!

I have also seen, and documented, cases where the delivery date changes from one screen to the next - e.g. the list of orders may say "arriving today" but you click on it for details and it is "by 9pm tomorrow". How the hell do they get something that simple so wrong.

Amazon Yesterday

You will have seen the excellent spoof https://www.youtube.com/watch?v=HA_gwzx39LQ for Amazon Yesterday shipping.

Whilst time travel is not really possible, their app is actually offering this. I just recorded it on my phone - with Amazon actually offering to have the item arrive yesterday.

Now how the hell do they get that so wrong?

2019-07-02

What if I eat it all?

How is it that food labelling does not require a column for "what if I eat it all?".

How hard is that?

This is a typical example of food labelling, and it shows values for 100g and a 23g "serving" on a packet of crisps that is 95g.

I have an A-level in maths but it even takes me a moment to work out that I just ate 50.35g of carbohydrates.

Seriously, how hard is it to actually state what is in the actual packet you have? Surely that should be a basic requirement?

FFS 23g is not even a nice fraction of 95g. It is obviously intended for me, and 3.13 of my close friends to share...