Wednesday 6 December 2017

Power switching - wall socket v. smart plug

It is that time of year when we bring trees indoors, which then sprout lights and hide wall sockets out of reach. Not only does it get tricky to get to the socket to turn things on and off, but it also intrigues me to know how much extra power the festive decorations are using.

So I had a quick look around for the options for smart power switching. Ideally I'd like to replace the wall sockets themselves with smart versions. There are a couple of options here, Den (which is due to launch in early 2018) and Energenie. The downside to these are the lack of power monitoring, and unavailability in the case of Den.

There are far more options available for smart plugs, even with power monitoring built in. There's the TP-Link Wi-Fi Smart Plug with Energy Monitoring, the Belkin WeMo Insight Switch, the Energenie Smart Plug+, the Elgato Eve Energy, the Efergy Ego Smart WiFi Socket, to name a few. Some connect directly to your WiFi, some connect to a home automation hub, and almost all work with Amazon's Alexa and Google's Assistant. The exception is the Elgato Eve Energy, which is Bluetooth connected and only works with Apple/Siri/iOS devices. There's not that much differentiation between each product, except on price where the TP-Link is the cheapest at £29.99 and the Belkin the most expensive at £49.99. I bought the TP-Link HS110,


which has a prodigious and unnecessary amount of packaging. It certainly doesn't need a plastic insert inside a cardboard inner box, inside a cardboard outer box.


Setting it up is pretty easy, just plug it in and let it initialise itself (flashing orange light). As with all smart home systems there's a cloud backend to keep tabs on your devices and enable remote control. You need to download the Kasa for Mobile app from your respective app store, which gives you the option to create a new account with the TP-Link Cloud.



Right now the web interface to TP-Link Cloud is only focused on their video cameras, so you can log in using the account credentials you supplied to Kasa, but the web interface just reports that "no camera exists in this account". Maybe in the future the web interface will encompass all of TP-Link's smart devices.


Back in the Kasa app you'll need to add a new device. To do this the app disconnects your phone from your WiFi, and scans for the HS110 which has set up it's own WiFi hot spot. Once detected you can set up the WiFi the HS110 ought to connect to, and configure a friendly name and icon for it. When all is done the HS110 displays a solid green light, which is mimicked in the Kasa app.


I am quite impressed with the lack of latency between switching on the app and the HS110 responding, it is as immediate as you really need. And if you can actually reach the HS110, you can turn it on and off via a button on the front of it.

Enabling voice control with Amazon's Alex was pretty straight forward. First use the Alexa app to enable the TP-Link Kasa skill, then go into the Smart Home section and Add Device. Alexa and Kasa integrate at their respective backend clouds, so the Alexa app will take you to the TP-Link Cloud to authorise that integration. Then you can simply say "Alexa, turn on Christmas Tree".


For Google's Assistant the process is the same, but the order of the steps is slightly different. Instead of enabling a skill then adding a device, in the Google Home app you go to Home Control and add a device, then scroll down the list of integrations under Add New to find TP-Link Kasa. The Google Home app will again take you to the TP-Link Cloud to authorise the integration, before finally getting you to allocate the HS110 to a Room.


With both Alexa and Assistant the delay between the spoken command and the tree lights switching on and off is pretty small. Not quite as immediate as using the Kasa app, but certainly quicker than getting up off the sofa, crossing the room, fighting through the tree, and switching the lights off at the plug.

Saturday 25 November 2017

Honeywell Evohome - Multiple Bindings

For a while now each evening there's been a Comms Fault message on the Evohome Controller. But the heating has been working fine, so I've pressed on the checkmark and ignored it, thinking that some random external interference had interrupted communication between the Controller and the heating BDR91 wireless relay in the airing cupboard.


But looking at the system log this fault was happening at exactly the same time every evening, which made the chances this was random very slim.


Some searching on the internet brought up some advice from Richard Burrows at the Evohome Shop, which suggested that the Controller and BDR91 could have multiple duplicate bindings. Thinking back I did have to rebind the BDR91s after a power cut, and I've probably got the system into a situation where the Controller and BDR91s are bound to each other twice. So the solution is to clear the bindings, and rebind the Controller and BDR91s afresh. However the key is clear the bindings at both ends, i.e. not just at the BDR91s.

So first use the long press on the Settings button on the Controller to get into the system settings. Then set the System Devices and set the Boiler Demand and Sundial Valves to None.


The inconsistent naming in the Evohome Controller really annoys me. "Boiler Demand" on the System Configuration page becomes "Boiler Heat"...


... and "Sundial Valves" becomes "Hot Water Configuration".


Both Boiler Demand and Sundial Valves set to None.


With the two BDR91 bindings cleared at the Evohome Controller, now pop off the front fascia and remove the batteries.


To clear the bindings at the BDR91s in the airing cupboard, hold the button on them down for about 15 seconds. After about 5 seconds the lower red light will "long flash", and then after 15 seconds the red light will "short flash". Once in "short flash" the binding has been cleared.

Back at the Controller I replaced the batteries and fascia, confirmed the date and time settings, and then long pressed the Settings button to get to the system settings and the System Devices page.

I rebound the hot water BDR91 first by setting it to Stored Hot Water. The first thing to rebind is the CS92 storage cylinder water temperature sensor. Hold the button down on the CS92 for about 5 seconds, when the button/light will start alternating between green and red. Then press the button again, and the controller should detect the CS92.

Next the Controller asks whether you've got a "2 or 3 port valve" or a "hot water valve". Our system is a Sundial Y-Plan, so the correct setting is a "hot water valve", but it is a little confusing as it has a mid-position valve, which is a valve with 2 ports. Anyway, a 5 second press on the hot water BDR91 to get it into binding mode, and then a press on the Bind button on the Controller and the two are paired again.

Likewise the Boiler Demand is set back to Boiler Relay, and a 5 second press on the heating BDR91 and a press on the Bind button on the Controller, and everything is re-binded (rebound?). Hopefully this has done the trick, and regular Comms Fault messages are a thing of the past.

Wednesday 8 November 2017

IGMP and WiFi

Since the arrival of BT TV we noticed an interesting/annoying behaviour with our WiFi. All of the non-FreeView channels are streamed to the YouView box over the internet. As mentioned in the last post, to get this to happen I needed to enable an IGMP proxy on our DrayTek Vigor 2860ac router. This lets the YouView box join the multicast group for the channel we want to watch. Initially this appeared to be all that we needed to do. However we found that when watching an HD channel delivered this way all WiFi traffic ground to a halt. Wired computers and gadgets didn't have a problem, but anything connected via WiFi would essentially see their data connection time out. The WiFi itself was still up and broadcasting, and our phones and tablets could see the signal, but with no data traffic. Switching to a streamed SD channel got the WiFi working again, so initially I thought this was a bandwidth issue, with the YouView box commandeering all the available broadband bandwidth. However according to the router's traffic graph an HD channel is only about 6.5Mbps, leaving more than enough bandwidth for other devices. And all the wired computers were able to use the internet just fine, so bandwidth wasn't the issue.

A knowledge base article from DrayTek states that only the IGMP proxy on their routers "need typically be enabled on a home network". However the router offers two optimisation settings for IGMP; Snooping (the ability to only forward multicast packets to LAN sockets that have devices that have subscribed to that multicast group) and Fast Leave (the ability to stop forwarding multicast packets when it detects there are no more multicast group subscribers). These two options "could be useful on larger networks or networks with a large quantity of IGMP packets that could limit normal LAN throughput".


I guess we have one of those networks then, although DrayTek don't specifically mention WiFi in their article. Our YouView box was already connected to a different LAN socket on the router to the other wired devices, and by enabling both IGMP Snooping and Fast Leave the ability to simultaneously watch streamed HD channels and surf the internet on our phones and tablets was restored. My best guess is that previously when the YouView box subscribed to a multicast group, the multicast packets for that channel were sent to all connected wired and wireless devices, which swamped the WiFi. Now they're not even going to the other wired connections let alone the wireless connections.

Friday 3 November 2017

BT fibre shambles

Fibre has arrived in our neck of the woods! Wohoo!

Now, let the fun and games begin. So, off to the BT website I go and look at the packages available. First a bit of a speed check:


So given that I'm currently paying £45.99 per month for my copper broadband and BT Sport (for the MotoGP) via an app, when I see that I could go to fibre, get BT Sport in 4K UHD, and 100-odd other TV channels with a PVR for £54.99 per month I'm definitely up for it. Even though it appears I could get the 76Mbps service, it is £10 a month more expensive than the 52Mbps deal, and a quick reality check shows that 52Mbps is more than sufficient.


And this is where the disappointment begins. So first of all, this deal is only available to new BT customers. If you're an existing customer, then you have to pay more. I'm not sure why you'd penalise your existing customers and incentivise them to check out the competition, but there you go.

As an existing customer I can get fibre for £44.99 per month, and BT TV with all the channels for £19.99 per month, for a total of £64.98. And these two deals are only available if you phone BT, rather than use their website, which are about £1 per month more expensive. I found this out when I phoned them up to find out why I couldn't get the banner deal on the website. Eventually I managed to get the bad taste out of my mouth, and Sky is even more expensive, so phoned back and placed the order.

Six days later ParcelForce arrive with the VDSL2 router (which I'm not going to be using) and the PVR (which I am). But the PVR is the YouView+ box, rather than the YouView Ultra HD box.


Given how much money this is all costing, I definitely want the full monty PVR, so I get back on the phone with BT. The first person on the line puts me through to someone who can check the status of my order, and confirms my fear that the order has placed incorrectly. But their job is only to report on the status of orders, not do anything about issues, and I'm informed that there are two options. Let the order proceed and then upgrade to the UHD box, or cancel the order and start again. As they can't confirm whether I'd be charged for upgrading to UHD from HD, I decide that cancelling and starting again is the way forward, so I'm transferred to the cancellation department. There's a brief glimmer of hope when they realise that this should be easy to sort out, but after a chat with the manager I'm told that cancelling is the only option. And... I have to wait for 24 hours to make sure the entrails of this order have fully passed through BT's system before I try and place an order again.

So I arrange for ParcelForce to come back and take the YouView+ box away, take the Smart Hub to the Post Office, and two days later start the whole process again. This time I see that the website is offering an upgrade for £34.99 per month, which given the BT TV Max bundle is £20 per month, means we're back to £54.99 all in. Confused? Me too.


This time I decide to take things one step at a time. Get the fibre broadband first, then add the TV package. So I placed the broadband order online and got my confirmation email, with further details to come.

Then... nothing.

A week later I phone back to find out what has happened to my order, and they can't find it in the system. I'm transferred to the Customer Options team, who start the order process again, for the 4th time. This time the chap on the phone offers me fibre for £34.99 and the Max bundle for £15, the cheapest combination yet. After a couple of explicit queries to confirm this includes the Ultra HD box, I went ahead with the order. Just as the chap was completing the order his system wanted to boost the price of the fibre up to £49.99, so I was back on hold while he talked to his manager. The manager agreed to apply an In Flight Save, to bring the monthly cost of the fibre back down to £34.99, but I'm warned that the confirmation email will reflect the higher price.


Over the next few days some confirmation emails come in from BT. They confirm the activation date for both the fibre and the TV, and inform me that the kit will arrive the day before the activation date. Which, of course, it doesn't. This isn't a major issue, as the DrayTek router is set up to automatically switch to the cellular modem when the copper broadband is disconnected, and then switch back to the fibre as soon as that is connected. BT were helpfully imprecise with letting us know how long the switchover would take, and when during the day it would happen: "anytime up until midnight". But if you were a regular domestic broadband customer, you'd be left without any internet while you waited for ParcelForce to deliver the new Smart Hub.

To give BT some credit, the service did actually switch over on the day they predicted, and the switchover took about 15 minutes from ADSL disconnection to VDSL connection. The cellular modem kicked in as predicted, albeit it did drop the VoIP phone mid-call, but all in all the switchover was about as smooth as I could have hoped for.


Everyone I had spoken to at BT had gone to great pains to let me know that the fibre speed would fluctuate over the first 10 days of use, so if I didn't get the contracted speed immediately I shouldn't worry. But also, if it wasn't up to speed after 10 days to get in contact so they could troubleshoot it. Given that I had asked for the 52Mbps service I was surprised to see that the modem initially connected at 80Mbps, with a 20Mbps upload rate!


However the DrayTek diagnostics page was even more optimistic, with an "Attainable Rate" of over 100Mbps for downloads and over 30Mbps for uploads! Given that previously the router was connecting to ADSL kit in the exchange over a mile from house, whereas now the router is connected to VDSL kit in the cabinet less than a quarter of a mile away, it is no surprise to see much lower SNR on the line, so those speeds are entirely believable. I'm sure that at some point in the next 10 days BT will artificially cap the connection speed, once they're happy that the line is trouble free.

Later in the day ParcelForce did turn up with the YouView Ultra HD PVR, but not the Smart Hub. The PVR was fairly straightforward to set up. I did my usual thing of binding the PVR's MAC address to a predefined IP address, and also enabled the router's IGMP proxy. Outside of the FreeView channels coming in via the terrestrial aerial, the other channels are streamed in via IPTV. This means the PVR needs to be able to join IP Multicast groups, which by default the DrayTek router does not pass through from WAN to LAN. But with one click the proxy can be enabled, and the full channel lineup become available.



Now I'm left to wonder if/when the Smart Hub will arrive.

(Edit on 27-Nov-2017: Having given it a couple of weeks and no Smart Hub I called BT. Somehow the hub had been missed off the fibre broadband order, so a new order was created and a couple of days later the Smart Hub arrived.)

(Edit on 1-Dec-2017: The first bill from BT since placing the order has arrived, and sure enough the In Flight Save I was promised when placing the order has gone missing in action. Instead there's a £3 "special offer discount", bringing the monthly broadband fee down from £49.99 to £46.99. Additionally the router is still connecting at the 80Mbps/20Mbps speeds of Infinity 2 rather than the 52Mbps/10Mbps speeds of Infinity 1. I fire up the chat window with BT and get talking with Aparna, who just confirms what my bill has already told me, and so she connects me to the Retention Team. Another chat with a manager ensues and I'm promised that the original £34.99 deal will be honoured and my bill updated.)

(Edit on 7-Dec-2017: Money has now left my account and the £46.99 for Infinity has been taken. Started a chat window with Robin and asked him to transfer me to the Retention Team. Yet another conflab with a manager, and I'm told that there isn't the option on their system to charge me £34.99 per month for 18 months anymore, so by way of an apology I'm going to be put on a £30.99 tariff for 12 months. If I'm automatically bumped up to the £49.99 tariff after 12 months then I'm going to about £50 worse off over 18 months. But I guess I'll have the option to depart BT after 12 months and go elsewhere if there isn't a better deal available.)

Wednesday 11 October 2017

Autonomous cars & speed limits

The progression of electric vehicles is being mirrored by the progression of autonomous vehicles, with most mainstream manufacturers now offering varying levels of driver assistance and autonomy. SAE Level 2 autonomy enables "hands off" driving, where the vehicle maintains speed, braking and steering, whilst the driver remains "in control" and ready to take over should the vehicle not choose the correct course of action. Essentially any vehicle with adaptive cruise control and lane departure warning technology is knocking on the door of Level 2 autonomy.

This year the UK government gave the go-ahead for the first trials of platooning vehicles, which is expected to happen later in 2018. The significance of this trial is not in the technology; this has been proven in the lab and on closed tracks and there is no way that the public highway would or should be used to find out if technology works. The significance is to characterise the known unknowns, especially how other drivers and vehicles on the road interact with the platooning vehicles, and the emergent behaviours this will create.

There appear to be two main objections to platooning vehicles on UK motorways; firstly that they'll obstruct slip roads, and secondly that they'll obscure signage. On a personal level I disagree with both of these points. Slips roads are signposted a mile in advance, giving vehicles plenty of time to filter into the left hand lane, and bigger vehicles can already obscure signage from smaller vehicles, so this is not an issue caused by platooning vehicles.

However the huge significance of this trial for me is that permission has been given for platooning vehicles to break rule 260 of the Highway Code, i.e. "...keep a safe distance from the vehicle in front". In this trial the platooning vehicles will not be a safe distance from each other, if they were being driven manually. And this is an important point, as platooning vehicles are operating at Level 3 autonomy, where the driver is not able to take control should the vehicle not choose the correct course of action. At Level 2 autonomy the vehicle is always being operated safely, as the driver is ready to take over if the autonomous systems are not operating the vehicle safely.

So this trial is setting a precedent whereby a Level 3 autonomous vehicle need not meet all the rules of the Highway Code. Rules 124 and 125 immediately spring to mind, as they deal with speed limits. The key to this debate is the unbalanced nature of these rules, especially as captured in rule 125: "The speed limit is the absolute maximum and does not mean it is safe to drive at that speed irrespective of conditions." I don't think many people would argue that in the depths of a snowy winter driving exactly at the 30mph limit down a street crowded with festive shoppers may not be not safe. But I also don't think many people would argue that exceeding the speed limit by a few mph on a dry, deserted motorway is any less safe than at the speed limit.

So the debate that is looming is this: if a Level 3 autonomous vehicle can determine when it is safe to platoon, surely a Level 3 autonomous vehicle can also determine when it is safe to exceed the current speed limits, and by how much. And this will be a debate based on opinions and feelings rather than cold hard facts. There is hard data to prove that autonomous systems can safely drive a car well in excess of the speed limit, but many drivers are still wary of much simpler driver aids. For example I know many experienced drivers who shun manual cruise control. These are the people that need to be won over.

Hopefully they will be won over, because higher levels of vehicle autonomy are key to free-ing up the UK's motorway network. Instead of smart motorways with variable speed limits and roadworks to add lanes to already congested roads, we could have more cars, travelling faster, closer together, and all safer than we are at the moment. What's not to like about that?

Sunday 1 October 2017

WiFi Coverage - Stage 2

Today I've been playing with setting up WDS (WiFi Distribution System) on the two DrayTek VigorAP 910C access points that beam the internet to the workshop. In principle this should enable them to function both as a point-to-point link between house and workshop, and function as access points for wireless devices nearby. For wireless devices in the workshop, this would mean that they could connect to the 910C in the workshop, and have that wireless traffic relayed to 910C in the house, and then onto the router and the wider internet.

Previously I'd used two different SSIDs for the networks on the 2.4GHz and 5GHz bands, as I found it useful to know which band a device was connecting on. But the DrayTek website makes such a big thing about keeping the configuration of the 910Cs exactly the same, even down to the wireless channel they're using, that I decided to set up all of the SSIDs and pre-shared keys on each 910C the same. This would also enable them and the Vigor 2860ac router to use band steering, and bump any capable wireless devices onto the 5GHz band automatically. This in turn would keep the 2.4GHz band as clear as possible, which should all help with the bandwidth of the point-to-point link with the workshop, which is only in the 2.4GHz band.

Setting up the 910Cs for WDS was fairly straight forward in the end. After setting the Operational Mode to AP Bridge - WDS, the settings and rules used for Point-to-Point mode transferred over. But whereas previously wireless devices at the workshop couldn't see an access point, they can now. Unfortunately it doesn't appear that in WDS mode the 910C can internally route traffic from wireless devices connected on the 5GHz band to the 2.4GHz WDS link, just like the point-to-point mode. So there's still a hole in my WiFi coverage at the workshop, in the 5GHz band. Looks like that trench is inevitable.

Friday 22 September 2017

WiFi Coverage - Stage 1

The WiFi coverage through the house has never been particularly great, probably due to all the internal walls being brick, rather than wood and plasterboard. The broadband router and WiFi access point is in the hallway, near the telephone socket, probably just like a lot of homes. Unfortunately this puts it in between two brick walls that neatly divide the house in half, one of which also incorporates the chimney. The signal strength in the hall is superb, but by the time you get a room away it has dropped off noticeably, and it has completely gone by the patio. When we moved in a few years ago this wasn't a huge issue, but the number of wirelessly connected devices has slowly increased, as have my expectations. Additionally I'm spending more time in my man cave in the workshop, 30 metres or so up the hill from the house. Initially I used some powerline adaptors to serve up internet access from the router in the hallway to the workshop. But the combination of additional RCBs, 30 metres of cable and a second consumer unit meant that the powerline adaptors struggled to both maintain a connection and provide sufficient bandwidth. So a temporary fix was to run a very long network cable through the garden alongside the satellite tv cable, until I get around to digging that trench I was talking about several years ago.

The over-winter fix is the addition of a point to point wireless link, using a couple of WiFi access points, one in the house and one in the workshop. As well as providing internet to the workshop, they should also function as standard access points, eliminating the coverage blackspots in the house and garden. As we have a DrayTek Vigor 2860 router, I ordered a pair of DrayTek VigorAP 910C ceiling/wall mount access points, which would allow me to manage all three items from a single dashboard, and not have to log into each one individually to make any changes. I've been pretty happy with the 2860 router which, whilst being pretty expensive and not having the most intuitive user interface, has been very reliable, gets regular firmware updates from DrayTek, has got the most out of our broadband, and has a wealth of functionality. For example, when (if?!) fibre broadband arrives in our corner of Ironbridge the support for it is already built in.


When the VigorAP 910C access points arrived, the first thing I did was read the MAC addresses off of the labels, and add them to the routers IP binding table, so I'd know which IP address they were using if I ever needed to configure them individually. Then once the access points were plugged in, I opened up the router's management web page and opened up the Central Management section. The two 910Cs were automatically recognised and listed in the status table. The next thing to do is give the access points friendly names, so that you don't have to remember which access point is using which IP address.


The status table also stated that both access points were sent to me with v1.2.0 firmware, the last critical firmware update, but the DrayTek support website was showing a v1.2.1 regular update with a couple of new features and improvements, so I updated both access points as a matter of course. Using the 2860 router's central management feature, you can update multiple access points in one go.


You can also set up a WLAN Profile, which is essentially a template configuration for an access point, which you can then push to all the access points in one go. By doing this I ensured that finger trouble didn't mean that I ended up with different configurations at either end of my wireless link, and things like SSIDs and pre-shared keys were the same everywhere.


Anything you can configure on the access point itself, you can set up in the profile. It would be nice if you could duplicate the wireless settings from the router itself to the access points, but as far as I can see you have to copy the settings over to a template manually.

The long term plan, once that dastardly trench is dug, is to use the two 910Cs purely as access points, and have a wired link between house and workshop. So seeing as the temporary cable was in place, I first set up the access points in AP mode. This also was good to demonstrate the directional antennae in the access points, unlike the router which has omni-directional antennae. The 910C are designed to be wall or ceiling mounted, and so focus the majority of their wireless energy to the front of them. With the workshop being up the hill from the house, I mounted the access point there on the ceiling, with a line-of-sight to the house. At the house I went into the loft and mounted the access point on the side of the chimney, not only facing the workshop but also the patio and garden. There's going to be some energy wasted up into the sky, but the coverage in the house has been transformed, and you now have to go into the lee of the chimney to see any drop off in signal strength.

The next step is that point-to-point link, so that the network cable can be removed from the equation. The VigorAP 910C has several operating modes, one of which is AP Bridge - Point to Point mode.


This mode is only available using the 2.4GHz band, not the 5GHz band, and in this mode the access point doesn't broadcast an SSID so that other wireless clients can connect to it, it simply connects to another 910C access point. There are four key configuration changes to make for this mode. 1) Both ends of the link must be set to AP Bridge Point to Point mode. 2) Both ends of the link must have static IP addresses, and their own DHCP servers turned off. 3) Both ends of the link must be configured to use the exact same wireless mode, channel and channel width. 4) Each end of the link must be configured with the MAC address and security settings of the other end of the link.



Essentially in this mode, any network packet arriving at a 910C is duplicated at the other 910C, and in effect they become transparent to the network. This means that when devices, such as the IP cameras and my desktop PC, boot up at the workshop they can still request IP addresses and other network configuration information from the DHCP server in the router, because every packet transmitted in the workshop is replicated in the house. Just like having a cable, which we now don't.

For the 910C in the house, I've also left the 5GHz band in regular access point mode. So wireless devices in and around the house will connect to either the router or the access point depending on which signal is stronger. At the workshop the 910C cannot internally connect the point-to-point link with the 5GHz access point, so whilst I can turn on the 5GHz access point mode at the workshop, anything that connects can only see the other devices at the workshop, nor the house or router.

When I get the time, I'm going to investigate AP Bridge - WDS (WiFi Distribution System) mode, which apparently enables the 910Cs to be access points in both the 2.4GHz and 5GHz bands, and simultaneously keep the 2.4GHz point-to-point link in place. That would allow me to connect wireless devices, as well as wired devices, to the 910C at the workshop.

Thursday 24 August 2017

Electric Vehicles

There's been a lot of press recently, created by the UK government's policy to prohibit the sale of new petrol and diesel cars from 2040, about the inability of the country's power infrastructure to support a nation's worth of electric cars. Putting aside for one moment that it will likely be sometime between 2050 and 2060 before the last of the new petrol or diesel cars sold in 2040 are no longer in regular use, we still have at least 23 years to come up with a reliable power infrastructure to support widespread EV adoption. Personally I don't think this is a major issue, especially when there's a deadline to galvanise efforts. Also, given that we already have the solutions, in my opinion it is just a case of implementing them at scale.

The first thing to consider is the generation of sufficient electricity for all these additional EVs. Some analysts have calculated that there is a need for handful of new nuclear power stations to cope with the extra demand for electricity. This is based on an assumption of a high peak load when everyone tries to charge their cars simultaneously. Whereas, if every car had a sibling storage battery from which the car was charged, the challenge becomes charging the storage batteries rather than the cars. This is significantly easier, as the storage batteries are always connected, and a simple load balancing algorithm would spread the load on the grid. Ensure that the storage battery has twice the capacity of the EV battery, and you can charge the storage battery at any time of the day or night. This technology already exists, under the banner of Demand Side Management, so if every household across the country had a storage battery tomorrow, the grid would continue to work just fine.

For sure millions of EVs will require more electrical power than is currently generated. And localised micro power generation is a potential solution for this additional power. Even in the northern latitudes of the UK during winter there is solar energy to be obtained from roof top PV panels. When the likes of Ikea can sell you PV panels and a storage battery for a few thousand pounds, you can be sure this is a mature, proven technology. There is still a major need for a country-wide power grid though, as solar and other renewable energies are not evenly distributed. But considering the vast storage battery capacity now available from the paragraph above, the contribution of renewable energy can now be significantly higher than fossil or nuclear. In theory, with sufficient storage capacity, there is no reason why all the country's energy cannot come from renewable sources.

But where are all these batteries going to come from? Are there sufficient rare-earth metals to produce them. This is another bit of scare mongering that has made the mainstream media, perpetuated by journalists that can't even fact check on Wikipedia. For starters rare-earth metals are not rare, as in scarce, but are rare, as in not found conveniently in seams of ore. This does make them more expensive to extract, but also makes them easier to find, because they are pretty much everywhere. Secondly, rare-earth metals aren't widely used in batteries, so there's no need to extract large quantities of these plentiful metals to build batteries. Rare-earth metals are used in electric motors though. But the good thing about that is that electric motors are about the simplest mechanical system you can build, and are extremely reliable. Essentially the electric motor in today's EV is maintenance free for life.

So far my thoughts have been based on the state of current technology. Imagine the world 23 years ago, and now think forward 23 years, noting that the rate of technological development is accelerating. Electric motors and EVs will be more efficient, requiring less energy. Batteries will have higher energy density and charge faster. Micro generation of solar energy will be widespread, as will macro generation from wind, wave and tidal sources. If anything, having stored energy distributed widely around the country will given us a more resilient and robust power infrastructure, not the frail brown-out prone grid the mainstream media portrays.

Tuesday 22 August 2017

Broadband - Will fibre ever arrive?

Back in January I noticed that our local broadband was being upgraded to fibre. When I checked on the Openreach website the status was listed as in Build, where the fibres are laid under the street from exchange to cabinet. This is noted as taking around 5 months to complete. Checking again this evening, the status is still in Build. Given that the fibres still need to be connected to the cabinet, and the exchange activated, I suspect it is going to be a long, long time before we reach the promised land of superfast broadband.



(Edit on 5-Sep-2017: I've been checking other cabinets in Ironbridge, and discovered that cabinets 1, 3, 5, 7 and 8, which cover Coalbrookdale and the centre of Ironbridge up to Hodge Bower, are already hooked up and people can place orders for fibre broadband. Also the Broseley exchange, just the other side of the river, is fibre enabled and cabinet 3 serving Coalford is active. Looks like Ironbridge's cabinet 2 is last on their list.)

(Edit on 5-Oct-2017: Whilst walking near the Ironbridge I chatted to two Openreach technicians working on cabinet 7, and asked if the recent roadworks near cabinet 2 were to do with the fibre upgrade, which they confirmed they were. So a search on the Openreach postcode checker reveals that cabinet 2 is now in the Activate stage. Only a month (or so) to go until they start taking orders!)


Friday 20 January 2017

What's talking to what?

The recent broadband issues we've been having exposed me to some of the network diagnostic capabilities of our router. One of which is a table of sessions the router is managing between devices in our home and the big wide internet. I made the mistake of delving into this a little deeper, with the result that I'm now paranoid about what servers on the internet my smart home systems are talking to on a regular basis.


Unfortunately the router's sessions table lists only which internal IP addresses are talking with which external IP addresses. Converting the internal addresses is relatively straight forward, as I've set up the router to bind all of the expected devices on the network to specific IP addresses. For the external IP addresses a reverse DNS is required to find out who owns them and where they are. I used www.ipinfo.io manually for several reverse DNS enquiries, until I noticed that it offers an API to process IP addresses, at which point I decided to write a Python script to automate the whole analysis.

The code is fairly straight forward. First read in the IP binding list from file and build a dictionary with the device names and internal IP addresses. Then read in the sessions, again from file, and parse each line to extract the internal IP address and external IP address into a list. Converting this list to a set effectively eliminates any duplicates. Then send a call off to ipinfo.io with each external IP address from the set to get a JSON response, from which the organisation and location of each IP address can be extracted. And finally create a CSV file to dump out the resultant list of internal device names and external organisations. The results look something like this:


All of this looks pretty much okay. Our HP printer talks to HP servers (and only HP's servers, it is nice to see) as we've got cloud printing turned on. It is slightly interesting to see that Philips are using Rackspace to host their Hue system back-end, but not totally surprising. I'd not come across Google's use of the 1e100.net domain name, but a quick search reveals that Google consolidated their back-end systems under a single domain back in 2009. 1e100 is the scientific notation for 1 googol. And the various devices talking to BT is also expected, as BT provide our broadband (sometimes).

The stuff I'm not so happy about is my IP cameras. They're chatting away with a whole range of people which don't immediately seem relevant. One of the IP cameras is even talking to NIST in Boulder, Colorado. Another appears to have ambitions of becoming an autonomous car when it grows up, as it is connecting to www.quickdrivingtestcancellations.net to arrange a driving test. The only two things outside my network I want my IP camera talking to are an NTP time server, and an email server. So I think I might enable these on my NAS to send all that traffic through one pipe, and block all other traffic using the router's firewall.

Saturday 7 January 2017

Broadband issues

Every so often our broadband connection, provided by BT, has a bit of a wobble. Yesterday was one of those days, and after it was down for a couple of hours I gave BT a call to see if there were any problems at their end. One long call later on a Friday lunchtime, and the customer service rep had booked a technician to go out to the exchange and take a look... on Monday afternoon. As he explained, the technicians don't work on the weekend, but if the system sorted itself out he would be happy for me to phone back and cancel the booking. (As it happened, the broadband came back at 5.30pm, and has been up ever since.)

Working from home is a regular thing for us, and a day without broadband is a major headache. So I looked at options for increasing the resiliency of our internet connection, and decided to add a cellular modem as a backup to our ADSL modem. On the opposite side of the gorge from our house is the cell base station for the town, which was upgraded to 4G last year. So there should be plenty of bandwidth available from the cellular connection, if the landline connection goes down.

As we've been having broadband issues for a while, we've long since ditched the BT-supplied Home Hub 4 and have been using a DrayTek Vigor 2860ac ADSL2+ router. This has enabled us to get the maximum speed from our connection, and has plenty of manual configuration for other services such as VPN, IP binding, QoS, etc.


The Vigor 2860 also has load balancing and auto-failover for multiple WANs. By adding a USB cellular modem, it is possible to configure the Vigor 2860 to switch over to that when it detects the ADSL has gone down. So I bought a ZTE MF823 and EE PAYG data SIM, and hooked them up to the Vigor 2860.


Within the Vigor 2860 administrative interface (firmware 3.8.4.2_BT from 7-Dec-2016) the USB modem needs to be enabled.


The Active Mode is set to 'Failover' and Load Balance in unchecked, as I only want the cellular connection used when there's a WAN failure, specifically when WAN1 (BT Broadband) goes down.


The next thing is to set up the USB cellular modem itself.


The Vigor 2860 supports the MF823 when in DHCP mode, as opposed to PPP mode.


The only configuration information the MF823 needs is the APN for the EE network, which is 'everywhere'. With the MF823 configured, the Vigor 2860 reports that it has a potential 42Mbps symmetric internet connection.


Which rather puts our ADSL2+ speeds of 20Mbps/1Mbps to shame.


So the final step is to test that the Vigor 2860 switches over from the ADSL connection to the cellular connection, and back again, when the BT landline goes down. Disconnecting the RJ11 modem cable from the BT master socket triggers the failover behaviour in the Vigor 2860, and after a short delay as the MF823 connects to the network the internet is restored.


There is a break in the internet connection, so this isn't a seamless failover setup. The Vigor 2860 could be setup with the MF823 always on, but with load balancing rules sending all the traffic down the ADSL connection. When the ADSL goes down there wouldn't be the delay while the MF823 connects to the network. However it would still confuse the hell out of any VoIP and streaming connections as the packet routing transitioned from ADSL to cellular, and keeping the MF823 permanently connected would slowly eat through its data allowance. So on balance, I'm happy with the small disruption in connection with the current setup.

(I also note that Openreach is now accepting orders for fibre connections from the Ironbridge WNIB exchange! We're connected to 'cabinet 2', which is currently is in the Build phase, and the guidance is that connections to homes should be available within 5 months.)