Saturday, April 20, 2019

Saturday Report: I Don't Remember

Peter Gabriel: I don't remember

Some words from this classic

You'll have to take me just the way you find me What's gone is gone and I do not give a damn Empty stomach (empty head) I got empty heart and empty bed I don't remember I don't remember I don't remember, I don't recall I got no memory of anything at all I don't remember, I don't recall I got no memory of anything - anything at all

I believe this is the most appropriate introduction after considering that ...

You may be aware that the Mueller Report is available for bedtime reading. It has been tough going for Marcus

It's been officially pronounced that there is /no evidence of corruption/,  but with all the blanking going on, to me it rather looks like /corruption of evidence/

Go ahead and download it and form your own opinion

See Also
11 Findings We got Redacted Does not compare to the Last Presidential Disgrace

Friday, April 19, 2019

Upgrading The Teckin SP23 SmartSwitch Without Using A Hammer

This posting is invaluable for those wishing to upgrade their Teckin SP23 Smart Switch  (also known as a BlitzWolf SHP Switch)

Earlier this week I subjected you all to this

Upgrading to Tasmota (with a Hammer)

But in this article we'll see if we can find a Software only solution to perform the change of Operating System to Tasmota. 

Caution Please

Please follow the instructions carefully.  Else you may brick your device and then the only remedy (at best) would be to go back to the Hammer and soldering method.

Method Overview

- We will build a Raspberry Pi with the Standard Raspbian OS
- We'll add some code that pretends to be an Access point and DHCP server
- We'll run some code including a MQTT and Web Server
- We'll power on the Teckin Switch and it'll talk to the Pi
- We'll fool the Teckin Switch into an upgrade, and make it take the upgrade from us by spoofing the DNS resolution of its upgrade server
- The Teckin will be fooled into running a small Bootstrap server that we can talk to
- We'll send a message to the Bootstrap server telling it to get the Tasmota Software from us
- The Webserver running on the Pi will reply and send out Tasmota
- After the smartswitch reboots it is running Tasmota Basic
- Now Tasmota is installed we can proceed as normal, no hammering and soldering.


- Raspberry Pi 3B or 3B+ hardware
- Regular Linux / UNIX skills

01 Clean install a Raspberry Pi
Since this software installs a Webserver and MQTT server and many other packages,  an existing Pi, which I experimented with ended up bricking a Teckin Switch.

For Marcus: Get a Fresh SD Card,  Use SD Card Formatter to format a SD card with FAT32, copy over Noobs Lite, boot the Pi installer, install full Noobs from the Internet, then reboot and do basic configuration only.

02 Setup the Networking

I'll connect the Wired Ethernet to my configuration LAN and unconfgure from the Pi Desktop GUI any Wifi Network I previously used whilst building the Pi

vi /etc/dhcpcd.conf

# Example static IP configuration:
# my eth0 never gets renamed so I have to really but this this ridiculous crap
interface enxb827ebb8faff
static ip_address=
static routers=
static domain_name_servers=

denyinterfaces wlan0
This updates the standard DHCP server and I reboot. So now the Ethernet is on a static address.  And I check from the GUI that the WiFi adapter is UP but no networks are connected  (ifconfig wlan0 should not show any IP right now)

03 Install Clever Software
Actually there is a choice of 2 and I am using Tuya-Convert  The other one for reference is  TuyOTA

git clone
cd tuya-convert

Setting up mosquitto (1.4.10-3+deb9u4) ...
Processing triggers for systemd (232-25+deb9u11) ...
Setting up dnsmasq-base (2.76-5+rpt1+deb9u1) ...
Processing triggers for man-db ( ...
Setting up screen (4.5.0-6) ...
Processing triggers for dbus (1.10.26-0+deb9u1) ...
Setting up hostapd (2:2.6-21~bpo9~rpt1) ...
Created symlink /etc/systemd/system/hostapd.service → /dev/null.
Setting up haveged (1.9.1-5+deb9u1) ...
Created symlink /etc/systemd/system/ → /lib/systemd/system/haveged.service.
Setting up dnsmasq (2.76-5+rpt1+deb9u1) ...
Created symlink /etc/systemd/system/ → /lib/systemd/system/dnsmasq.service.
Processing triggers for systemd (232-25+deb9u11) ...
Collecting paho-mqtt
  Downloading (48kB)
    100% |████████████████████████████████| 51kB 938kB/s
Collecting pyaes
Collecting tornado
  Downloading (481kB)
    100% |████████████████████████████████| 491kB 350kB/s
Building wheels for collected packages: tornado
  Running bdist_wheel for tornado ... done
  Stored in directory: /root/.cache/pip/wheels/61/7e/7a/5e02e60dc329aef32ecf70e0425319ee7e2198c3a7cf98b4a2
Successfully built tornado
Installing collected packages: paho-mqtt, pyaes, tornado
Successfully installed paho-mqtt-1.4.0 pyaes-1.6.1 tornado-6.0.2
Ready to start upgrade

04 Run The Software
cd /root/tuya-convert

/home/mbennett/tuya-convert/scripts /home/mbennett/tuya-convert
TUYA-CONVERT was developed by Michael Steigerwald from the IT security company VTRUST ( in collaboration with the techjournalists Merlin Schumacher, Pina Merkert, Andrijan Moecker and Jan Mahn at c't Magazine. (

TUYA-CONVERT creates a fake update server environment for ESP8266/85 based tuya devices. It enables you to backup your devices firmware and upload an alternative one (e.g. ESPEasy, Tasmota, Espurna) without the need to open the device and solder a serial connection (OTA, Over-the-air).
Please make sure that you understand the consequences of flashing an alternative firmware, since you might lose functionality!

Flashing an alternative firmware can cause unexpected device behavior and/or render the device unusable. Be aware that you do use this software at YOUR OWN RISK! Please acknowledge that VTRUST and c't Magazine (or Heise Medien GmbH & Co. KG) CAN NOT be held accountable for ANY DAMAGE or LOSS OF FUNCTIONALITY by typing yes + Enter


  Starting AP in a screen
  Stopping any apache web server
  Starting web server in a screen
  Starting Mosquitto in a screen


1. Connect any other device (a smartphone or something) to the WIFI vtrust-flash
   The wpa-password is flashmeifyoucan

   This step is IMPORTANT otherwise the smartconfig will not work!

2. Put your IoT device in autoconfig/smartconfig/pairing mode (LED will blink fast). This is usually done by pressing and holding the primary button of the device 3. Press ENTER to continue

- First step connect a smartphone to SSID vtrust-flash as it says in point 1

WIFI: vtrust-flash
PASS: flashmeifyoucan
- Next open 4 new Terminal Windows.  From my workstation I used putty to the raspberry Pi and I opened 4 ssh terminals and then in each typed the following 3 screen commands and ifconfig

screen -ls
There are screens on:
        2679.smarthack-mqtt     (17/04/19 21:49:33)     (Detached)
        2594.smarthack-web      (17/04/19 21:49:32)     (Detached)
        2466.smarthack-wifi     (17/04/19 21:49:31)     (Detached)

# now open 4 ssh windows and run these commands

screen -r smarthack-mqtt
screen -r smarthack-web 
screen -r smarthack-wifi
ifconfig wlan0  

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::228f:c106:6799:8793  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ed:af:af  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44  bytes 8160 (7.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
- Before going to next step you need to check that the 3 screen sessions are running and the the wireless adapter is UP and RUNNING on the 10.42.42.x network 

05 Plug in Teckin Switch

Only now plug in the Teckin Switch to Mains Power

Press the left button so that you have a fast blinking  (not slow blinking) blue light.   This tells the Teckin to go into config mode and it will attach to the Raspberry Pi

06 Flash Tasmota from the Running Bootstrap

Right now the Teckin is rebooted at IP running bootstrap firmware the programs pushed into it.  We now tell it to come to the Raspberry Pi to pull the Sonoff software

# check the sonoff software is on the Pi
ls -l /root/tuya-convert/files
total 1180
-rw-r--r-- 1 root root 442528 Apr 17 21:40 sonoff-basic.bin
lrwxrwxrwx 1 root root     16 Apr 17 21:40 thirdparty.bin -> sonoff-basic.bin
-rw-r--r-- 1 root root 506587 Apr 17 21:40 upgrade.bin
-rw-r--r-- 1 root root 253268 Apr 17 21:40 user2.bin

#Load stage 2  (not necessary for me)
Device is already booting from userspace 2 (0x81000)

#Download Tasmota
Device should flash and restart

07 Tasmota is Installed!

When the Teckin reboots it now runs Tasmota.  On first boot it presents an open WiFi SSID of sonoff-nnnn which you connect to from your laptop.   It then typically has an IP of and a webserver so you surf into that address to begin customisation.   One of the first steps is to setup the SSID of the network that it would normally connect to.   You set this and then it reboots, and on this second reboot it joins the network you entered and gets an IP address from your DHCP server.

You can then go thru the normal steps to fully configure the switch which for us are

- Install full Tasmota   (not just the basic firmware) at latest level
- Setup userid and password security
- Setup Domoticz server credentials
- Setup Systlog credentials
- Setup MQTT credentials
- Physically label switch
- Setup Statically Reserved IP address in our Mikrotik Network Server  DHCP config
- Enter technical information into our IP spreadsheet

And that is the beautiful end.  Sonoff Tasmota software gets installed onto the UK version Teckin  SP23 SmartSwitch.   No Hammers or Soldering Irons were required.


Thursday, April 18, 2019

Upgrading the UK Teckin SP23 Smartswitch using a Hammer

This posting is for those wishing to replace the stock software in their Teckin SP23 Smart Switch  (also known as a BlitzWolf SHP Switch)

This is the physical hammer and soldering Iron Method :-)

Smart Power Switches

We have been using Smart Home Power switches since 2018.   Eventually we have standardised on 

The Teckin Smart socket available from Amazon UK  for about 11GBP each.  Example here.  This product is brilliant in so many ways principally because it includes power monitoring.  So using the supplied Android Application I'm able to track power usage over time.  I wrote this

Security Concerns
When you install the Android Application you need to tell it your Wifi SSID and Password.  All this information will be stored on the Chinese servers.  As a paranoid android we use a separate SSID and Password  (thanks Mikrotik routers!) just for these and other cloud based devices.

Still, being even more paranoid it would be nice for the whole control of this switch to be local.  And you can achieve this by replacing the Operating System inside the Power Switch with Tasmota

Once Tasmota is installed we use Domoticz to talk to Samsung Smarthings which talks to Alexa.  So the end result is we believe a more secure way of controlling these switches.

Very popular in the Home Automation community is a product called Home Assistant that we could use instead of Domoticz and Smarthings.  We are using Domoticz because of history  (we started using it before Home Assistant was stable)

And so ... back to ...

Upgrading to Tasmota (with a Hammer)

Part 1

Part 2

Part 3

So at the end of this palava we have replaced the native Operating System inside our powerswitch   (I know, quite flippin unbelievable right!)  with Tasmota.

Tasmota contains its own webserver (!!) that we can then browse into to further configure the system.   We will configure things like its own Hostname and IP, and the target Domoticz and MQTT servers, oh and the Syslog server.

I know what you are thinking.  Marcus in your house you have over 10 Power Switches,  each running an Operating System and Webservers.  I know, just crackers. Oh, and did I mention the multiple Lightswitches  too :-)

Wednesday, April 17, 2019

Selling Stuff via Facebook Marketplace

Marcus and Agata are struggling to find a decent replacement for which is the online selling channel we used to dispose of items we no longer required whilst in Switzerland.

In the UK there are the traditional sources like eBay (unused in Switzerland) and widely annoyingly applications like the oft advertised Shpock

But did you know that Facebook has an inbuilt Selling channel and it has some geographic smarts installed too.

Welcome to Facebook MarketPlace

- Basic selling is:  Upload one or more photos, a Price and select category.  Then some short blurb as to what you are selling.

That is it.  Could take me as little as 5 minutes

- Posting goes to a group viewable Nationwide and valid for 7 days

- Additionally you can join one or more local selling Groups.  Since we live in Alcester I joined the 2 groups both called "Item(s) for Sale Alcester"

- When you post to the general Marketplace you can additionally also post to any group that you belong to

- It also gets posted to your friends  ( so sorry for my International friends who are sort of getting bombarded with things I can't really economically post to them)

- You can renew the sale after 7 days if not sold, but only 4 times

- A buyer can select a Geographic distance limit for items for sale, so as to choose only items they can get to in person

- Once you have found something interesting for sale you can click on that user whilst in Marketplace and see all their other items they have for sale

Our Pledges
Everything we sell works, or else it would be described accurately  (as broken etc). So far we've only sold working items,   offering full refunds if found otherwise

We research our prices to be lower that what you would reasonably expect.  It is not the new price we bought it for 1 year ago!

We take lots of high resolution photos.  This is 2019 after all

I post the items for sale and then they start to message me ...

My Buyers  (into categories)

Definitely Going to Buy It
A buyer asks sensible questions, says they are interested.  In fact you are in the middle of a 2 way conversation with them.  And then silence.   You never hear another word.

Whilst it's possible they have just been involved in a severe road traffic accident and are now suddenly incapacitated, I fear its more likely they are just time wasters.  Tyre kickers.

What is your Lowest Price
So I carefully research prices, so the above question makes me assume they think  I am some sort of dick-brain who just generated a random price.  But, no shit ... I actually want the price I'm advertising it for.  Am I expected to increase my prices to stupid a level for you, only so I can then discount them to the level I had originally thought of?

Sellers that use over familiar dialog inferring that you are some sort of close friend, and / or talk in code like they are chatting you up in a night club.   All a bit disturbing.    Many of these blend in well with the next category

No Research Man
I'm selling an original Audi TT stereo.  It only fits a TT because of the dash fitting curves.  You can see this from the high res photos. But Audi fanboys in the Birmingham area seem convinced it'll fit any Audi, until I have to school them.   Do I have to educate all my buyers too?  Maybe there could be an idiot tax I could levy on /no research/ sales.

You Price is X, so how about X-10
Some people even after admitting the price is fair, just have to haggle.  One guy I agreed a price with, he agreed to pay the money.  1 week later nothing.  Then I put the price down.  He then made me an offer at my new offer price  (less something, again!).  I pointed out he already agreed the prior price and failed to pay, but because I reduced my price he wants a further reduction.    I just blocked him,  I can't take this level of bullshit.

I'm just about to Pay You
Definitely going to buy it.  I send them my Paypal.  Yes, it will take me the buyer but 10 minutes.  A few days later and nothing.  ... Feels really great being let down this way.  Maybe one day I can return this kind of favour to you

No Change
Another classic tactic, based on the buyer no preparation strategy is when a buyer turns up without the correct money.  Example it is 25 GBP, but they only have 3 x 10 GBP notes.  Somehow I'm expected to have change   (we are card people, hardly ever carrying change).  So they try to force a last minute discount and rely on you being a nice person who takes pity on them. Infuriating.

Idiot Man
I was selling an Apple Mini but the buyer ignored the fact that my older but more powerful (and upgradable) machine was selling for under 500 GBP,  whereas the current, less powerful, Mini model is at least 1300+ GBP.  Instead they asked me more and more dumbo entry level questions.  When my patience ended they just got abusive.   I was upset for the rest of the day.

The Real Deal
In the rare case I meet a buyer who has done their research.  They know the value of what I am selling.  Or, they show me my price is unrealistic and ask for a change. They are prepared to pay via Paypal and agree to postage at cost and pay promptly.   I'm therefore able to package and post normally on the same day, or if after hours, the next morning.   They get a tracking number and when the goods arrive they are polite enough to tell me and confirm it is what they wanted.

Yep, this is the kind of seller I like to do business with.

And So
In the month or so that Marcus has used selling surplus items on Facebook I have met a smorgasbord of humanity.  Only a small proportion realise that they are getting a good deal, at carefully researched prices, guaranteed to work, packed carefully and posted when promised, usually within a day.

To that small proportion I say thank you,  I really appreciate your business.

To everybody else, please do contact me on Facebook Marketplace with a new angle of buyer debauchery so I can add some further categories to my above list.

Tuesday, April 16, 2019

Changing my Eating Habits for the Better

It is funny how life sometimes sends you troubles or a 'kick' and you have to decide how to react.

But First
A thanks to Sandra and Agata for being so supportive and mindful.   I've been quite ill for over 10 days now, and it is now at a state that I can actually not breathe when I lie down horizontally.  I think that's fairly serious.

Current prognosis after some Emergency medical is a probable Viral infection in my upper Lungs.

When Is It Enough?

I can admit to some unhealthy eating habits that I am not proud of.

I often work late into the early hours, and after fixing a technical problem I am frequently of the opinion that comfort food like chocolate, and I can say excessive amounts of it, is somehow a justified reward intake.

The same is true or acknowledged for binging, well certainly over eating of puddings / desserts generally.

Penny: Not so Good

Justin: Good

Eating disorders can be deeply routed in childhood coping strategies. Sandra and I watched and discussed the above two cases which I would highly recommend you, the readers view also.

Whilst we can understand our cumulative coping strategies based on past troubles, this learned behaviour should not be allowed to permanently define and ultimately diminish or even destroy us.

We just have to move forward and do better.

A Slow but now determined Step Forward

A combination of being struck down with this latest illness, some compassion and mindful discussion from those close around me, makes me determined to act today

Cutting out the binging on unhealthy foods must stop.  And stop right now.

Do you have health issues they know they can significantly improve on?  I want to aim to try doing better for the next 10 days and closely monitor my hopeful recovery and increase in well being.  Come and join my change with your change too!

Monday, April 15, 2019

Scanning Your Beloved Pet

Marcus and Agata have had various feline visitors over the last 12 months here in England.  But some are so enthusiastic that we fear they are homeless.   If only there was a way to find out who their registered servant was.

If they are chipped, there is ...

But First A Note about Radio Frequency Identification  (RFID). 
Chips embedded into your pets uses 125Khz Low Frequency LF RFID,  whereas the Android Near Field Communication  (NFC) standard uses High Frequency HF RFID at 13.5Mhz.

So a Smartphone can not directly read any data from your Pet.  But if you attach a LF RFID reader and write a suitable app it might be possible

Further Notes
Passive tags collect energy from a nearby RFID reader's interrogating radio waves
Active tags have a local power source (such as a battery) and may operate hundreds of meters from the RFID reader.

NFC is similar to Radio Frequency IDentification (RFID) but far more functional when incorporated in products or devices such as mobile phones. RFID is a useful Contactless (proximity) technology

125Khz RFIDs are frequently called LF RFID (low frequency) while the NFC standard uses 13.5Mhz RFIDs frequently called HF RFID (high frequency). Smartphones today often support HF RFID like the NFC, but rarely or never support LF RFID

  • LF Frequency standards: 134.2kHz, 125kHz
  • Reading Standard: FDX-B ( ISO11784 / 85), EMID

Our Scanner

For a quite unbelievably reasonable 10 GBP you can buy an Android, USB-C connectible LF RFID Scanner from Amazon here

The Android application is free but is a gateway to a paid service here   where you can pay from 12 GBP per year to register your pet on their database.

Note that the scanner here is rudimentary.   You can buy a battery powered all in one scanner, but the result is the same.  You read the rather long number Pet ID


The PetID may be registered in a database, but which one?  In the UK you can use this link  to try and identify which database your pet is registered with

Not So Fast

In these days of security, who the hell are you, and Data Protection, nobody is allowed to give you (concerned member of the public ) any real information any more.   meanwhile I called PetLog as above only to find a recorded message saying that you can't actually talk to anybody except if you dial the highly chargeable 0870 number.   Come on!

And then I can imagine they would take my information and say: regretfully sir, we can't tell you diddy squat to to DP Laws.

Talking to a Vet
Eventually Marcus and Agata went to a local vet and asked about homeless cats.  After some discussion we gave them some likely addresses  (plural) and they confirmed that one of them, without saying which one was the registered kitty owner.

Last Sunday we finished knocking on doors and found that owner.  And confirmed with them  (to a certain amount of regret) that the very hungry kitty that keeps a calling is theirs.   So when kitty comes a calling from now on, she gets a cuddle, and then some strict instructions to go home and not worry her family.

Roll on the day when soon our own kitten or is it kittens will arrive.  Life is about to get more complicated.

UK Chip Search
Getting your Dog Chipped  UK

Sunday, April 14, 2019

Sunday Sermon: Sickness

NiMh Busted

Currently I am so sick that the best I can do is sit upright in bed, because lying down renders me unable to breathe.

Hopefully normal service will be resumed soon.

Meanwhile some of the Videos/ Links that have been keeping me company

Cathy Dennis: Touch Me

Dogma Fs

Hitchens part 21


GVA Motor Show Electrics

Don't call me Baby

The Man who

Corbyn and the Referendum

I know nothing about Wikileaks

Still Alive.

Saturday, April 13, 2019

Report: 4iiii Powermeter

The Powermeter Install


In the olden days, and I mean, well say a few decades ago, you were pushing the state of the art if you had Alloy i.e. Aluminium wheels.   Owners of steel wheels at the time were extremely skeptical.

Today there are so many technological advances that Bicycle technology have embraced, and today I talk of the 


The idea is to monitor your power, always in Watts  (i.e. Joules per Second!) as you cycle.   If you combine this with other information like heart-rate, speed etc you can build up a much more comprehensive picture of your fitness.

It can help you to understand what is your Functional Threshold Power  (FTP) and then once known allow you to ride to that number, or exceed it in a routine way as part of your training plan.

The Clique
Getting a Powermeter onto your bicycle has been only for the very few principally because it is so damn expensive!   Whilst the head units that Garmin or other can sell for under 200 GBP can display your power, the Powermeter itself can easily cost 500 GBP.  And that is for single side measurement.  Individual left and right unit pairs can almost double that price.

Our Choice 4iiii

Marcus and Agata have been scouring eBay and auction sources for Powermeters for over 6 months.  And as of today we can now say that we have a 4iiii powermeter fitted to each of our bicycles.

The key tool you will need is a plastic crank plug extraction tool.  This plastic plug does not hold the crank on, but you can't remove the crank without first removing this

And,  although I was trained for over 2 decades by individuals who swore to be able to recognise Nm torque rates by feel, these days I just set the gadget, in this case for 12 Nm and am confident that I do not over tighten crucial components

Midway Install

Okay it is all installed, how beautiful.  I wish it could have been Dura Ace!

These are the bits I saved.  The old 7900 series Dura Ace and the Garmin cadence sensor.  The new powermeter includes the cadence.

Output from the first ride.  Wahoo.   Today my excuse as the sniffling video can confirm, I am sick.  So the Power statistics are a bit weak and that is how I am feeling!

Here is the example Android Application output showing the Battery level of the powermeter and the Ant ID which you can use to correlate the import on your Garmin Headunit