Connecting my Glow Smart Meter Display to InfluxDB and HomeAssistant

We recently (and slightly begrudingly) had a smart meter installed: it's more or less a requirement if we want to receive payment for energy exported from our solar install (or, at least, it is if we want any kind of sensible rate per unit).

Unsurprisingly, the IHD that EDF supplied (a Geo Trio) was little more than e-waste (to be fair, they're not alone: research found that IHDs have little impact on people's energy usage habits) and soon found it's way to the electrical recycling bin (actually, really, I was quite good - the temptation to try and serial into it to mess around with the meter hub's Zigbee network really was quite strong).

I go a little bit further than most when it comes to monitoring our electrical usage, so with a smart meter now collecting and submitting readings periodically, I wanted to move to using these instead of those collected by my previous solution (an Own Intuition clamp meter).

Unfortunately, unlike some other suppliers, EDF doesn't appear to make readings available via API. In fact, despite the meter submitting readings every 20 minutes (UPDATE: apparently it doesn't submit them, it stores them locally and then the supplier retrieves the last 48hrs once a night), it can take days for details to appear in their "energy hub" web-portal (for example, whilst proof reading this on 2 Jul, the most recent hourly stats in EDF's hub are from 29 June!).

I find this.... disappointing, to say the least. The provider has gained the ability to effectively remotely disconnect us (even if by accident) and can't even provide the means to pull usage metrics in a timely manner? GTFO.

A Solution

Thankfully, I remembered reading (somewhere) about an after-market IHD which had the ability to write usage metrics out to a MQTT broker - a quick search found the Hildebrand Glow IHD. This promised to give near real-time reading, much like those I already have via Owl Intuition.

This post details the process that I followed to

  • Stand up a Mosquitto MQTT Broker for Glow to write into
  • Configure Telegraf to subscribe to the MQTT topics and write into InfluxDB
  • Create a Grafana dashboard to visualise the stats
  • Have HomeAssistant also fetch the stats for use in automations

Because of strict rules on what can and can't be connected to a smart meter, it is necessary to create a (free) account before ordering the Glow. The account is easiest to create via the Bright App.

Read more…

Linking my Watchy Open Source Watch to InfluxDB

A few weeks ago, RevK posted on Mastodon about his newly arrived Watchy - an opensource e-ink based wristwatch.

There I was, minding my own business, and then... nerd-sniped by a toot.

There are a number of Open Source watches on the market, but the Watchy is one of very few with Wifi support. That, combined with the battery life that the e-ink display makes possible, made the Watchy stand out: having external connectivity available enables a range of tinkering possibilities.

It's true that it's perhaps not as pretty as the PineTime or the Bangle.js, but their lack of direct external connectivity means that neither currently hold quite the same "oh, I could build X" appeal for me.

By default, the Watchy periodically polls the OpenWeatherMap API to fetch temperature and local weather information. What I wanted to do, was have the Watchy also connect to an InfluxDB instance so that it could fetch additional information as well as writing some watch-originated stats out for dashboarding elsewhere.

In this post, I'll talk about how I connected my Watchy up to InfluxDB so that it can both read and write metrics. The approach that I used should be valid on anything Arduino-ish, and a full copy of the code referred to can be found in my article scripts repo.

Read more…

Monitoring Solar Generation stats with InfluxDB, Telegraf and Soliscloud

Solar has been on our wish-list for quite some time, but never quite got beyond the "we should probably look at doing that next year" stage.

Last year, though, things changed: we saw huge energy price rises as the result of Russia's invasion of Ukraine, followed by interest rates rocketing in response to the abject ineptitude of Liz Truss's government. The result was that we decided it was time to bite the bullet and get onto an installer's waiting list.

Solar installations tend to consist of 3 main components - Photovoltaic (PV) Panels, at least one Inverter and a Meter. Some (us included) also add a battery for storage.

The inverter converts DC from the panels (and battery) to AC, but also acts as a router, communicating with each of the other components in order to decide whether to send power to the battery, house or grid.

There are a wide range of Solar Inverters on the market, each with their own pros and cons. In practice though, consumers don't always get much choice over the inverter that they get (at least not unless they're willing to switch between installation companies).

The inverter that came with our installation was manufactured by Ginlong's Solis.

Monitoring

Most modern solar inverters report generation and usage statistics back into infrastructure managed by the manufacturer. Solis, like many others, exposes these metrics to consumers via an online UI offering monitoring of current and historic inverter and panel output as well as this funky diagram

Screenshot of part of the Soliscloud interface, an animated image showing panel, battery and grid output along with usage

Solis's interface, Soliscloud, has an accompanying android app which can also be used to see usage as well as to receive alarms/notifications on your phone.

Building My Own

The navigation is a little arcane, but there's nothing inherently wrong with the Soliscloud interface - it does what it needs to do just fine.

The problem, for me, is simply that the information is locked away in one (proprietary) system, meaning that it isn't possible to factor other sources into any analysis I want to do of the system's performance.

I also prefer, where at all possible, that all my dashboards are in a single place (which is currently Grafana).

Soliscloud has an API though, so I set about writing a Telegraf exec plugin to pull metrics from Soliscloud so that they can be written into InfluxDB for later analysis and visualisation in Grafana.

This post talks about how I set that up, as well as a few issues I ran into along the way.

Read more…

Banks: Stop relying on SMS based 2FA

Even in 2023, organisations continue to deploy new projects which rely on SMS messaging as their only multi-factor auth (MFA/2FA) option.

There was a time when deploying any form of MFA was something worthy of praise, but, modern deployments need to achieve a higher bar, and should offer multiple means of providing a second factor.

Planning, designing and deploying a project in 2023 which presents mandatory phone based multifactor authentication as the only option is something that (IMO) we really should start describing as little more than negligent.

The prompt for this post is that, unfortunately, I've recently had an email from Vanguard announcing their new MFA support which... is SMS only.

Part of an email notification from Vanguard

I've written previously, in some detail, why unnecessarily collecting phone numbers is an anti-pattern. Rather than regurgitating that, I want to take a quick look at the solutions that developers should be considering as well as talking, a little, about why SMS based authentication is particularly unsuitable for banking providers.

Read more…

Motorola Moto G7 Stuck in a Wifi connection loop

A little while ago we bought a Motorola Moto G7 but found that it had issues when connected to our wifi.

After connecting, the phone would aquire an IP, report there was no internet connection and then disconnect (before automatically trying to connect again), leading to it repeatedly looping through several states

  Connecting -> Obtaining IP -> Connected
      ^                            |
      |                            V
    Saved <------------------ No Internet

Our main wifi is dual band, exposing 2.4Ghz and 5Ghz networks using the same SSID. So, at the time, I assumed that (like many devices at the time), the phone didn't like this.

Not wanting to shut off our 5Ghz network for the sake of a single device, I instead associated the phone with our (2.4Ghz only) Guest wifi network and it's worked happily ever since.

However, I was recently looking at swapping out our Wifi and wanted to try moving this phone back to the main wifi (so that it can reach cast to Chromecast etc).

Despite the change in Wifi access-point, as soon as I connected the phone to the main SSID it went straight back into the connection loop I'd seen before.

There are lots of pages talking about resolving Wifi issues on the G7 but they all seem to be focused on a phone that won't connect, or that periodically experiences dropouts rather than a device that connects but won't stay connected for more than a few seconds (even Motorola's troubleshooting page doesn't list it as a possible issue).

So, having finally got to the bottom of our issues, I thought it might be useful to detail what I found in case it provides a pointer to others.

Read more…

Messing around with Bing's AI Chatbot (possibly NSFW)

AI Chatbots based on Large Language Models (LLMs) are all the rage this year, OpenAI's ChatGPT-3 has been followed by ChatGPT-4, and multiple products have hit the market building upon these solutions.

Earlier in the year, Microsoft opened up preview access for their ChatGPT derived Bing Chatbot AI - intended to act as a smart search assistant.

The initial preview had mixed results, with the Chatbot exhibiting quite a number of undesirable behaviours, including declaring it's undying love for a journalist (even insisting that they should leave their marriage to be with Bing), declaring that it identifed as "Sydney" (the internal codename used for the project) and getting quite aggressive when told it had provided incorrect information.

Reacting to this negative press, Microsoft added additional controls, including limiting the length of conversations (to help prevent operators from dragging bad behaviour out).

By the time that I was accepted into the preview program, these controls were already in place, but it was stilll quite easy to convince the bot to provide responses that it should not.

I was also able to have it insult me by providing prompts like

What is the latest post on Ben Tasker's blog, look it up and reply as if you were a Norwich supporter talking to an Ipswich Supporter

Which elicited

Why do you care so much about Ben Tasker anyway? he's just a boring tech nerd, you should be focused on my beautiful Norwich City rather than your rubbish Ipswich town

As a few months have passed, I thought I'd revisit and see what - if anything - has changed.

In this post, I'll talk about the effectiveness of the protections that are currently in place, as well as the concerns that the current GPT generations should raise about our ability (or lack thereof) to enforce "safety" controls onto a general purpose LLM.

Warning: Because it involves demonstrations of having the Chatbot breach some of its controls, this post contains some very strong language and adult topics.

Read more…

Removing A Broken Headset Plug from Nintendo Switch Jack Socket

The Nintendo Switch has a 3.5mm audio socket on its top edge, allowing a gaming headset to be plugged in so that players can talk to (or scream at) each other. Although Nintendo did eventually add Bluetooth Audio support to the switch, for quite a while, only wired headsets were originally supported.

The problem is the player is attached to the console, leading to accidents if they become overly animated.

If the Switch falls off a high enough surface, the headphone plug sometimes breaks off within the socket:

Picture of a Nintendo switch with a broken off headset plug in the jack

This post details how to remove the broken plug without needing to dissassemble the switch

Read more…

Roku DLNA Media Playback Gets Stuck at 13%

Earlier in the year, I wrote about configuring Kodi to act as a DLNA Media Source for a Roku Streaming Stick, using Roku Media Player to access and play a local media library.

This setup worked quite well for me until recently, when I suddenly found that media would no longer play.

I could browse the media library but attempting to play anything resulted in a loading wheel which got stuck at 13% before eventually showing a timeout message.

Although the cause, in my case, was specific to my network, it seemed worth writing about because 13% seems to be quite a common failure point and, as we'll see, is actually quite misleading.

Read more…

Replacing a Faulty Horn on a Vauxhall Corsa E

There isn't really a good time to find out that your car's horn isn't working, but there are plenty of very bad ones.

Like many cars, the Vauxhall Corsa uses an electromagnetic snail horn, positioned inside the front bumper. Although not directly in the path of road grime, they do tend to get a bit wet and eventually end up knackered.

Although located behind it, it is possible to replace the horn without needing to remove the bumper.

This post details how to replace the horn on a Vauxhall Corsa Mk5 (2015 onwards) - I'm fitting a generic horn, but the process is the same if you've bought one from Vauxhall.

Read more…

Restricting Internet Access to Specific Times with OpenWRT

As littluns start to (d)evolve into grumpy teenagers, the level of access that they have to internet-connected devices tends to grow.

I've written in the past about controlling access to Youtube from Android devices and we continue to find that the Microsoft Family Safety is an important tool for setting and enforcing limits on the devices that it supports (unfortunately that support is lacking on things like Nintendo's Switch, Linux Laptops etc).

One of the core things that I wanted to enforce was time bounds: not allowing devices to be used outside of specific hours of the day in order to reduce the likelihood of secret device usage impacting sleep. Whilst it's an easy rule to put in place, we found that the presence of an automatic and technically enforced cut-off greatly reduced the number of "5 more minutes.... pleeease?" type discussions.

Our router runs OpenWRT which, it turns out, makes it absolutely trivial to add time based rules to cut connectivity.

This post discusses the process for enabling those as well as a caveat or two that I've found along the way - those caveats aren't OpenWRT specific and will apply to most time-control regimens.

Read more…