Monthly Archives: March 2019

The Thermostat Continues

Hard to believe the amount of time I’ve spent on this thing. I’m still too deeply buried in R&D right now to fully develop another full article on my thermostat but here is some info to add to the previous blog entry on the subject. My Node-Red/ESP-GO thermostat is now in operation with three stat heads, 2 in active service as one has an issue whereby it locks up occasionally, maybe once a day, maybe once every couple of days – unpredictable – a hardware reset brings it back – but I need to get to the bottom of it – the other two units don’t do that.

The 2.5w laser engraver turned out to be less of a blessing than it first seemed, thanks to it’s inability to handle clear Perspex (does a lovely job on coloured material) I’ve had to go back to traditional DIY techniques for this project.

While I’m here, I’ve just reduced the e-newsletter frequency as we’re getting ready for the summer exodus to the sun and that will impact my writing ability somewhat until early April when I hope to have lots of new toys to talk about.

I’ve now published updates to ESP-GO-3 using Espressif Non-OS SDK 3.1 – which in itself is still only on GIT at the time of writing but seems to work a treat. My thanks to helpers on the Espressif forum – I didn’t really need this for current projects but the 5K of saved iRam gives me bags of room for expansion, so now was as good a time as any to upgrade to the latest SDK. Perhaps in the summer I’ll take a look at a better web interface and more SSID options.

Some new visuals – here is my Grafana logging – accessible externally thanks to PIVPN as is the stat itself.

Grafana Logging for Pete's Stat

Above is my Grafana info screen – monitoring and logging the two stats (main and aux – I have a third on test, all have now survived power cycling both for the stats and  Node-Red without failure or needing intervention) but I’ve seen dropout after 2-3 days needing power cycling on one of them so the jury is still out). I’m also monitoring (temperature in the hot water tank cupboard from the mains controller supplying on-off instructions to the air—source heating system.

Lots more below the line…

Continue reading The Thermostat Continues

Facebooktwittergoogle_pluspinterestlinkedin

Handy Node-Red Date

While working on my thermostat I found myself repeating the same code all over the place – as I use function nodes for inline debugging and info – far more useful at times than the debug output.

I’ve now attached this simple code here to a function in my init page. I can use the global var “handyDate” all over the place as many times as required. This function is triggered by an inject node every second. I could have converted the timestamp info from the trigger but this is just as easy.

    var date = new Date();

    var hour = date.getHours();
    hour = (hour < 10 ? "0" : "") + hour;

    var min  = date.getMinutes();
    min = (min < 10 ? "0" : "") + min;

    var sec  = date.getSeconds();
    sec = (sec < 10 ? "0" : "") + sec;

    var year = date.getFullYear();

    var month = date.getMonth() + 1;
    month = (month < 10 ? "0" : "") + month;

    var day  = date.getDate();
    day = (day < 10 ? "0" : "") + day;

global.set("handyDate"," at " + hour + ":" + min + ":" + sec + " on " + day + "/" + month + "/" + year);

Facebooktwittergoogle_pluspinterestlinkedin