Today was a good day (well, apart from the UK Northeast weather which was rubbish as it has been all year so far. Thanks to some great help from guys on discordapp.com I discovered a cure for a phantom subnet issue that has had me worried for days now. I also found a fix to make my new Amazon Dot version 3 units work in Node-Red without being the dreaded ROOT user… so let’s get started… this blog entry is really just a record for me and a catch up for any of the guys who were helping out…
For days now a mysterious subnet has been gobbling up my Itead Sonoff control units. It was most likely caused by incorrect router settings – we’ll never know as I replaced the two routers with new switches and WIFI access points..
Meanwhile yesterday I replaced my generation 1 Amazon Echos with generation 3 Amazon Echos – which (thank you bloody arrogant Amazon) insist on using port 80, used by my web server.
I am using port 8980 to avoid being the hated Linux ROOT user and so now, on my Raspberry Pi 3, I moved the web server to port 86 and using “iptables” have redirected port 8980 traffic to port 80 to keep Amazon happy while continuing to use port 8980 to keep Linux happy as PI user.
sudo apt-get install iptables-persistent
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8980
sudo netfilter-persistent save
sudo netfilter-persistent reload
Meanwhile I learned that to use Tasmota with Flash-limited Sonoffs – you can flash in 2 stages thanks to a minimal intermediate version which still handles MQTT:
Below I’m loading sonoff.bin rather than sonoff-basic.bin – the latter requires this 2-step OTA but has more stuff built into it (sensors).
and to change SSIDs on Tasmota-equipped boards….
payload: ssid1 whatever; ssid2 mypass
And to monitor all status info for Tasmotas in Node-Red:
and subscribe to topic:
See also Andreas Spiess YouTube video here (https://www.youtube.com/watch?v=JdV4x925au0) for setting up Raspbian with Grafana and InfluxDB using my “the script” which you’ll find referred to around the blog.