I recently bought a Withings Body Smart scale, it’s a great device, all the features I was wanting (and then some) and it looks slick too.
I was looking forward to seeing the metrics/measurements from it appear in Apple Health, but found out that this doesn’t “just happen” like I’d hoped and expected, as they don’t integrate well – I think that’s due to Apple restrictions rahter than a lack of effort from Withings, but not 100% sure on that.
It appears you need to open the Withings App and then it will sync your data to the Apple Health app. That’s a PITA and not at all what I was looking for.
The following is a yicky workaround and not a solution – if anyone has or finds a better way, please do let me know!
Until then, my approach is to create an Apple Shortcut that opens the Withings app, waits a second, then opens and switches to Apple Health. After a few seconds the new readings appear in Apple Health – far from ideal, but I prefer this one irritation to opening two apps.
The Shortcut looks like this:
When done, I created a bookmark on the Home Screen that looks like this (the “WiHealth” icon):
This one caused me some grief for the last few weeks, thought I’d share in case it helps anyone else…
Firefox is my prefered browser on Mac, it’s setup with all my passwords, bookmarks, extensions etc and I use Chrome for work, so when it stopped loading and started crashing for no good reason it was VERY annoying. Couldn’t find any cure for it, little mention of issues and nothing more helpful than the usual: update it, restart, disable extensions, clear your profile, reinstall etc etc.
The issue being that Firefox would hang on startup – nothing would load, not even the basic home page, and I had to force-restart the browser on a regular basis until it would eventually decide to work like nomal again…. ARGH!
The solution to my issue was to disable support for HTTP3. That’s very easily done and has completely fixed things on my Mac (in this case it’s an iMac Retina 5k, 27-inch with macOS Monterey).
Here’s how – it takes 5 seconds + a restart.
enter “about:config” in the address bar and then hit the “Accept the Risk and Continue” button…
filter the settings for “http3” via the search bar, click on the bottom right icon seen in this pic to change the value from true to false:
so that it loks like this:
then just restart the browser and if you had the same issue as me, it should now be sorted! Happy surfing.
Update: There is a some more detailed info here: https://bugzilla.mozilla.org/show_bug.cgi?id=1749908 incluing reports that disabling all of the data collection features may solve this (without the HTTP3 disabling update). Looks like this has been around for a while but only started affecting me a couple of weeks ago, and was hard to debug as there’s no obvious/searchable error message.
I put the downloaded APK files in the same dir as the adb tools to keep things very simple.
Connect to your Amazon Fire TV
Find the IP address of your Amazon Fire device from Network Settings (From Settings, go to Device (or My Fire TV) > About > Network), for example mine was 192.168.0.176.
Enable ADB debugging in your Amazon Fire device via Settings.
connect from client laptop/pc to Fire TV, for example:
./adb connect 192.168.0.176:5555
you can also list local devices:
donaldsimpson@Donalds-iMac adb-tools % ./adb devices List of devices attached 192.168.0.176:5555 unauthorized 192.168.0.59:5555 unauthorized
Install APK to connected device
Once connected, installing a new app should be as simple as
./adb install yourapp.apk
Note that if you have multiple devices you may get this message:
➜ adb-tools ./adb install smartyoutubetv_latest.apk Performing Push Install adb: error: failed to get feature set: more than one device/emulator
check the list of attached devices:
➜ adb-tools ./adb devices List of devices attached G070VM1904950F5U device 192.168.0.18:5555 device
then specify the device you are aiming for with “-s <address:port>” like this:
./adb install smartyoutubetv_latest.apk Performing Push Install adb: error: failed to get feature set: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device.
… the last line promoted me to look at the Fire TV screen and notice it was asking me to approve the connection request from my laptop. Doh. Once approved the app installed no problem:
I’ve had an outdated Kodi install for ages and wanted to update that while I was here. The process is simple, just add an -r for “replace existing application”:
After getting the above sorted out, I wanted to find a way to start Kodi on my FireTV without having to switch my projector on & off to do so.
I use Kodi as an AirPlay target for music during the day, and it switches itself off overnight. I could probably change that.
Using ADB tools, I connect to the device remotely, as before, with:
./adb connect 192.168.0.176:5555
though normally that comes back with “already connected to…“
then start up Kodi using the “Android activity manager”, “am“:
./adb shell am start -n org.xbmc.kodi/.Splash
this takes a little while to start, but after about 30 seconds I can connect to the Kodi web interface on port 8080 of my FireTV, and the AirPlay target becomes available.
It looks like there are many other interesting things you can do with “am”.
Uninstalling packages with adb
List installed packages
./adb shell pm list packages
and filter for whatever you’re looking for (e.g. “guard“)
./adb shell pm list packages | grep -i guard
then unsinstall that package name:
./adb uninstall com.adguard.vpn
Update on smartyoutube to fix ads
Quick update specifically on Smart Youtube TV on Android. This was brought on by my initial install of Smart Youtube TV starting to show adverts (a lot).
I had installed Smart Youtube TV, version 6.17.739 (at time of writing this is still the latest stable release available) on my Android Fire – details above. This worked very well for months, but has started to not filter out youtube advertisements.
Having not found an update and while looking for another solution, I found “SmartTubeNext Beta”, which looks to be pretty stable and widely used, for a beta version:
From that site, it looks like around 4 months since SmartYouTube was updated, but SmartTubeNext is actively being developed, so could be worth a try – here’s how:
I wasn’t sure if this would replace the existing SmartYouTube (which is why I added the -r switch that wasn’t necessary), but it’s ok: it’s installed as a different app so the stable version is kept and available should there be any issues with the beta version.
This version of SmartYoutube looks a lot better than the previoous/stable one.
List of improvements from their site:
4K support
runs without Google Services
designed for TV screens
stock controller support
external keyboard support
Personally I really like the better controller support, and the overall look is much more suitable for a large screen. It’s also a lot more customisable. And, most importantly, it removes all the adverts.
We had this awesome chicken for about 6 or 7 years, she was an amazing character, always stood out from the flock and did her own thing. She insisted on getting involved whenever I was doing anything outside, and used to run about 100m to greet me at the gate whenever I came home.
This post looks at creating and maintaining HTTPS/SSL/TLS Certificates for multiple WordPress sites running on the same host.
Some background…
This website is one of several different domains/sites/blogs hosted on my single Google Cloud server, with one public IP address shared for all websites. I’m using WordPress Multisite to do this, based on a very well put together Appliance provided by Bitnami.
WordPress Multisite allows me to cheaply, easily and efficiently serve multiple sites from the one host and IP address, sharing the same host resources (CPU, Mem, Disk) which is great but makes seting up HTTPS/SSL Certificates a little different to the norm – the same cert has to validate multiple sites in multiple domains.
I’d banged my head against this for a while and looked at many different tools and tech (some of which are mentioned below) to try and sort this out previously, but finally settled on the following process which works very well for my situation.
“WordPress is the world’s most popular blogging and content management platform. With WordPress Multisite, conserve resources by managing multiple blogs and websites from the same server and interface.”
CERT PROVIDER
Let’s Encrypt is a free, automated, and open Certificate Authority created by the Linux Foundation in collaboration with the Internet Security Research Group. There are many other certificate providers available, but I’m using this one.
Once lego is set up, you can request multiple certs like this – just make sure to change the --domains="whatever" entries and add as many as you need. Remember all of your sub domains (www. etc) too.
sudo lego --tls --email="my@email.com"--domains="donaldsimpson.co.uk" --domains="www.donaldsimpson.co.uk" --domains="www.someothersite.com" --domains="someothersite.com" --path="/etc/lego" run
Noe you’ve got the certs, move them in to place and chmod them etc:
By this point I was happy that the nice new HTTPS certs were finally working reliably for all of my sites, but was aware that Google and external links would still try to get in through HTTP URLs.
After trying a few WordPress plugins that sounded like they should correct this neatly for me, I settled on JSM’s Force SSL/HTTPS plugin. As the name suggested, it quickly and easily redirects all incoming HTTP requests to HTTPS. It was simple to install and setup and works very well with WordPress Multisite too – thanks very much JSM!
CRONJOB
Now that the process works, the certificates need updated every 90 days which would be a bit of a pain to remember and do, so adding a simple script to a cron job saves some hassle.
Helm and Tiller – what they are, when & why you’d maybe use them
Helm and Tiller – prep, install and Helm Charts
Deploying Jenkins via Helm Charts
and WordPress w/MariaDB too
Wrap up
The below are mostly my technical notes from this session, with some added blurb/explanation.
Helm and Tiller – what they are, when & why you’d maybe use them
From the Helm site:
“Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application. Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste.”
Helm is basically a package manager for Kubernetes applications. You can choose from a large list of Stable (or not so!) ready made packages and use the Helm Charts to quickly and easily deploy them to your own Kubernetes Cluster.
This makes light work of some very complex deployment tasks, and it’s also possible to extend these ready-made charts to suit your needs, and to write your own Charts from scratch, or pass your own values to override default ones, or… many other interesting options!
For this session we are looking at installing Helm, reviewing some example Helm Charts and deploying a few “vanilla” ones to the cluster we created in the first half of the session. We also touch upon the life-cycle of Helm Charts – it’s similar to dockers – and point out some of the ways this could be extended and customised to suit your needs – more on this at a later date hopefully.
Helm and Tiller – prep, install and Helm Charts
First, installing Helm – it’s as easy as this, run on your laptop/host that’s running the Minikube k8s we setup earlier:
Tiller is the client part of Helm and is deployed inside your k8s cluster. It’s set to be removed with the release of Helm 3, but the basic functionality wont really change. More details here https://helm.sh/blog/helm-3-preview-pt1/
Next we do the Tiller prep & install – add RBAC for tiller, deploy via helm and take a look at the running pods:
now get the URL for the Jenkins service from Minikube:
minikube service --url=true jenki-jenkins
Hit that URL in your browser, and grab the password in UI from Pods > Jenki and log in to Jenkins with the user “admin”:
That’s a Jenkins instance deployed via Helm and Tiller and a Helm Chart to our Kubernetes Cluster running inside Minikube via a VirtualBox VM… all done in a few minutes. And it’s all customisable, repeatable, highly scaleable and awesome.
and WordPress w/MariaDB too
This was the “bonus demo” if my laptop wasn’t on fire – and thanks to some rapid cleaning up it managed fine – showing how quickly we could deploy a functional WordPress with MariaDB backend to our k8s cluster using the Helm Chart.
To prepare for this I did a helm ls to see all the things I had running. then helm delete --purge jenki, gave it a while to recover then had to do
kubectl delete pods <jenkinpod>
before starting the WordPress Chart deployment with
That’s it – we covered a lot in this session, and plan to use this as a platform to explore Helm in more detail later, writing our own Helm Charts and providing our own customisations to them.
Update: this follow-on post runs through setting up Jenkins with Helm then creating Jenkins Pipelines that dynamically provision dockerised Jenkins Agents:
Here are some pics and updates on my recent attempts at milling my own wood. This had been on my wood-related TODO list for a long time. The aim was to free up some room in my woodpile by creating planks that I can then try and make things out of – and to have some fun doing so.
All of the wood is local beech, I’m using up old trunks first but plan to do some green milling later, including milling another fallen tree with a nice straight trunk “in situ” then bringing the planks home to dry.
Tools & Setup
Chainsaw: you need a powerful chainsaw for milling, especially if you want to run a long enough bar to mill wider trunks, which I hope to do later. I really really wanted a large Husqvarna or Stihl but the cost for something of the right spec for this job was waaaay over my budget.
Searching for >60cc chainsaws I found this one by Parker:
£80-odd quid for a 62cc Chinese chainsaw with 2 year guarantee and some extras bits ‘n pieces!?! Sounds far too good to be true, but further reading led me to reviews of similar cheap gear being used, mostly with good results, and folk referring to it as Chinese Milling, or “Chilling” 🙂
Bar & Chain: the 20″ bar that came with the Parker was ok but too small and the chains were cross-cut. I ordered a 28″ bar and Archer ripping chain from these guys – very happy with the parts and the service:
Pics of the end result – cheapo Chinese saw, 28″ bar, ripping chain and EcoMill together:
First attempt
The first cut is not only the deepest, but the most important and most difficult too – I tried the old approach of screwing a straight plank to the top of the log, then running the saw/mill over this to give me a flat initial cut.
It went ok, but I think the log rolled a little towards the end – it was only small so easy done. This means that all subsequent cuts follow the same slight curve – the planks are still ok, but a lesson learned. These planks are narrow enough to run through my planer/thicknesser later anyway.
The waste/kerf from the ripping chain is noticeably smaller (narrower) and much finer than with a cross-cut chain. The saw runs surprisingly well and starts really easily. It makes a fair bit of noise but for the money it’s superb. I didn’t try to rush or force the cut, pretty much let the chain pull itself through, and I am very happy with the results.
Pics of the first small-scale test – the chicken was grudgingly impressed.
Second attempt
This time I tried using a bigger plank sitting on a crate at either end for the first cut, with the log sitting unattached underneath but secured with a load of wedges to stop it rolling/moving. This took longer to set up but worked much better.
Flattening Sled/Jig
Here are pics of a similar-ish setup I use to flatten large slabs. It’s a “jig” made from a couple of clamped planks (from my daughters old bed), with a “sled” made from a couple of 30mm angle iron sections joined together with Gorilla Tape & wooden blocks to keep it the right width and stop it coming off the rails. All of this keeps the router level while I run it from side to side, moving the sled up and down the jig to flatten the wood.
The router bit is a “1/2-Inch Shank 2-Inch Cutting Diameter Double Flute Carbide Tipped Cleaning Bottom Router Bit Cutter“… so there you go. It’s now done quite a lot of work and still cuts quickly and easily.
This setup is very versatile – I used it to create these too:
Pics of three tables I’ve made recently – all are from the same beech tree that fell over in the wind about 4 years ago.
Small
– this one is being used as a plant stand. It was narrow enough to fit through the 12″ thicknesser then was finished with a hand planer. The legs are beech branches.
Medium
– this one has some nice spalting lines around the edges. Flattening this was the first test of my home-made “router sled jig slab flattening contraption” (not sure what to call it, but it worked!) which I’ll post details of another time.
– this one weighs a ton and has some interesting features and curves.
It was initially cut from a massive log with a chainsaw “freestyle” as my milling setup wasn’t ready at the time. There are still 2 or three slightly wider and more uniform slabs still to come from the remains of this log, hopefully.
The “router-sled-jig-contraption” was used to flatten both sides, then it was sanded (and sanded and sanded again) to a very smooth finish and varnished with a tough matt glaze.
These three-prong hairpin legs were made by Designer Legs too.
This is the first of two posts on Kubernetes and HelmCharts, focusing on setting up a local development environment for Kubernetes using Minikube, then exploring Helm for package management and quickly and easily deploying several applications to the cluster – NGINX, Jenkins, WordPress with a MariaDB backend, MySQL and Redis.
The content is taken from the practical/demo session I wrote and published in Github here:
One of the key objectives and challenges here was getting a useful local Kubernetes environment up and running as quickly and easily as possible for as wide an audience as we could- there’s so much to the Kubernetes ecosystem that it’s very easy to get side-tracked, and we could have (happily) spent a long time discussing the myriad of alternative possible solutions.
We plan to go “deeper” on all of this in future sessions and have an in-depth Helm session in the works, but for this session we were focused on creating a practical starting point.
</ramble>
Don
What is covered here:
Minikube – what it is (& isn’t) & why you’d use it (or not)
Kubernetes and Minikube components and concepts
setup for Mac and Linux
creating a first Kubernetes cluster in Minikube
minikube addons – what they are and how they can help you
minikube docker env – using DOCKER_HOST with minikube VM
Kubernetes dashboard with Heapster and Metrics Server – made easy by Minikube
kubectl – some examples and alternatives
example app – “hello (Kubernetes) world” minikube style with NGINX, scaling your world
Helm and Tiller – what they are, when & why you’d maybe use them
Helm and Tiller – prep, install and Helm Charts
Deploying Jenkins via Helm Charts
and WordPress w/MariaDB too
wrap up
Minikube – what it is (& isn’t) & why you’d use it (or not)
What it is, why you’d use it etc.
Local development of k8s – runs a single node Kubernetes cluster in a Virtual Machine on your laptop/PC.
All about making things easy for local development, it is not a production solution, or even close to it.
There are many other ways to run k8s, they all have their pros and cons and use cases. The slides from the Meetup covered this in more detail and include links for further info – they are available here:
Cleanup/prep – if required, remove any previous cluster & settings
`minikube delete; rm -rf ~/.minikube`
Creating a first Kubernetes cluster in Minikube
Here we create a first Kubernetes cluster with Minikube, then take a look around in & outside of the VM.
With the above initial setup done, it’s as simple as running this in a shell:
minikube start
Note you could optionally give this Cluster a name, if you are likely to have more than one for different branches of development for example. This is also where you could specify the VM provider if you want to use something other than VirtualBox – there are more details here:
This should produce output like the following, and it may well take a few minutes as the VM is downloaded and started, then a stack of Docker images are started up inside that….
At this point you should be able to see the minikube VM running in the VirtualBox GUI:
Now it’s running, we can connect from our local shell directly to the one inside the running VM by simply issuing:
minikube ssh
This will put you inside the VM where the Kubernetes Cluster is being run, and we can see and interact with the running components, for example:
docker images
should show all of the downloaded images:
and you could do this to see the running containers:
docker ps
Quitting out of the VM puts us back on the local host, where we can use kubectl to query the status of the Minikube cluster – the initial setup has told kubectl about the Minikube-managed Kubernetes Cluster, meaning there’s no other setup required here:
kubectl cluster-info
kubectl get nodes
kubectl describe nodes
minikube addons – what they are and how they can help you
Show some of the ways minkube makes things easier for local dev
First, take a moment to look around these two local folders:
ls -al ~/.minikube; ls -al ~/.kube
These are where Minikube keeps its settings and the VM Image, and where kubectl settings are persisted – and updated by Minikube.
With Minikube you’ve often got the option to either use kubectl directly, or to use some Minikube built-in features to make your life easier.
Addons are one of these features, allowing you to very easily add – or remove – functionality from the cluster like this:
minikube addons list
minikube addons enable heapster
minikube addons enable metrics-server
With those three lines we’ve taken a look at the available addons and their current status, and selected to enable both heapster and the metrics server. This was done to give us cpu and mem stats in the Kubernetes Dashboard, which we will set up in a moment. The output should look something like this:
minikube config view
shows the current state of the config – i.e. what changes have been made, so we can keep a track of them easily.
kubectl --namespace kube-system get pods
now we can enable the dashboard:
minikube addons enable dashboard
and check again to see the current state
minikube addons list
we’ll connect to the Dashboard and take a look around in a moment, but first…
minikube docker env – using the DOCKER_HOST in you minikube VM – how & why
Minikube docker-env – setup local docker client to use minikube docker host
We’re going to look at connecting our local docker client to the docker host inside the Minikube VM. This is made easy by:
minikube docker-env
if you run that command on its own it wiull show you what settings it will export and you can set them by doing:
eval ${minikube docker-env}
From then on, in that shell, your local docker commands will use the docker host inside Minikube.
This is very useful for debugging and local development – when you change and deploy anything to your Kubernetes Cluster, you can easily tail the logs or check for errors or issues. You can also do all of this via the dashboard or kubectl too if you prefer, but it’s another handy and powerful feature from Minikube.
The following image shows the result of running this command:
so we can now use our local docker client to run docker commands like…
docker ps
docker ps | grep -i metrics
docker logs -f <some container id>
etc.
Kubernetes dashboard with Heapster and Metrics Server – made easy by Minikube
Minikube k8s dashboard – here we will start up the k8s dashboard and take look around.
We’ve delayed starting the dashboard up until after we enabled the metrics-server & heapster components we deployed earlier. By doing it in this order, the dashboard will automatically detect and use these components, giving us cpu & mem stats and a nicer looking dash, with no additional config required.
Starting the dashboard simply involved running
minikube dashboard
and waiting for a minute…
That should fire up your browser automatically, then you can take a look around at things like Default namespace > Nodes
and in the namespace kube-system > Deployments
and kube-system > Pods
You can see the logs and statuses of everything running in your k8s cluster – from the core components we covered at the start, to the dashboard, metrics and heapster we enabled recently, and the application we’re going to deploy and scale up soon.
kubectl – some examples and alternatives
# kubectl command line – look at kubectl and keep an eye on things kubectl get deployment -n kube-system
kubectl get pods -o wide -n kube-system
kubectl get services
kubectl
example app – “hello (Kubernetes) world” minikube style with NGINX, scaling your world
Now we’ll deploy the most basic application we can – a “Hello World” style NGINX docker image.
It’s as simple as this, where nginx is the name of the docker image you want to deploy, hello-nginx is the label you want to give it, and port 80 is where you want it to listen:
kubectl run hello-nginx --image=nginx --port=80
that shouldn’t take long, and you can watch the progress like this: