Status update

GaleraIt may seem like I’ve been quite the past week – but having arrived safely in Spain we’ve had lots to do.  However I have done some updates to the “home control 2016” blog entry as I’ve implemented some fixes to the node-red-contrib-esplogin node.

For those of you unfamiliar with this – the idea is a node-red node that updates a bunch of ESP8266 modules with time and date info as well as dusk and dawn timings. It does this on power-up of Node-Red, on demand from individual units and every 12 hours – except it wasn’t doing it every 12 hours. It is now. Here’s the link for those interested. The node itself also now has much better status information and help.

cludgeMeanwhile I’ve been struggling with rubbish broadband back home in England as the router failed every now and then to reconnect. Aidan and I have implemented a solution using one of the ESP8266 modules which will check Google every minute and if it gets nothing for 10 minutes will reboot the router.

new layoutAidan is working on a new version of the home control board with a couple of minor improvements – the connection for a Dallas temperature chip is now a 4-pin job suitable for the Dallas chip or the DHT-22 and we’re also putting on-board an optional RGB serial LED as the status LED on the board uses all sorts of flashing convolutions to indicate state and we thought it might be nice to use colours instead. There  is still a question mark over simultaneously using PWM and sending serial data to LEDs and that is being tested right now.

There’s a significant update to the ESP8266 source(home control 2016 project etc.) as I fixed a minor silly in my watering system code. and added a load of improvements including a serial RGB indicator LED

Meanwhile I’m sitting here on the edge of my seat waiting for a new Nikon camera to arrive so I can make best use of the excellent weather out here in Andalusia.


49 thoughts on “Status update

  1. Yup, those puppies are quite small. Unfortunately, both Pete and I have huge stocks of the smaller ones – have you “seen” the 0603 ones. Might as well be grains of sand!

    1. Actually Phil – the parts are ok – here in Spain I have only my Antex soldering iron – NOT a fine one – but with fine solder it is indeed not that hard to use these parts… Trust me – compare to soldering an SMD Atmega328 they’re a doddle… but seriously – put the solder on the part, introduce the (very clean) iron – it is quite easy… and I don’t even use a magnifier – though 3x magnifying reader specs are a great help.

  2. I just noticed that we’re using GPIO4 and 5 for the Nextion serial. Pete, is the I2C in software? Might be worth using a different port pair or we lose the Nextion serial

    1. Suggest that’s not too good an idea – we can’t use this for everything at once and if used with a Nextion I’d suggest the most you might do is stick a relay and sensor on there… whichever pins you use you’re going to lose something..

  3. …nope, but I’m doing it now! I’ll send the files to Pete in the next half hour. The joys of multi brain processing…

    1. I only mention it because I’ve been there done that ….the joys of being older than 40 … 😉

  4. As Pete said, there was a bug in the Adafruit library part that I downloaded for the Ws2812B serial LED that neither I nor the error checker picked up! Basically, it didn’t connect the power to the LED, but it did connect the ground.

    I’ve corrected that and taken the opportunity to add a voltage divider pair to the ADC input which will make it more useful.

    Also, Pete suggested labelling the 2 pins for the I2C interface (SDA and SCL) just to make connecting up a bit more easy – and this ties in nicely with the work he’s done on I2C expansion modules

    I’ve emailed Pete both the zipped up GERBER files for production and the EAGLE files in case anyone wants to do any mods. They’ll be available on the bitbucket account.

    You can just upload the zip file to SEED, to Dirtypcbs or whoever and off you go.

      1. No as the ports are used for other things and most of those expander boards have the pullups anyway.

        1. OK, but I have an I2C LCD adapter that doesn’t have them, cost me some time to figure out that one. Also I thought that there should only be one set of pullups at the master device, if you add multiple boards to one I2C then you get parallel pullups but then again I’m not an expert n I2C.

          1. Yes, they vary and you are right you should have one set of pullups only. Given that many users will be unable to un-solder surface mount, for our boards we decided to leave them off because in the example I’ve used of the expander – they have them on those boards. It’s a lot easier to add a couple of resistors if needed than remove them.

    1. The only mods I would be tempted to do is change the SMDs to 1206 size, I ordered the parts from RS to build these boards and can’t believe how small they are!

  5. Absolutely, there’s no way it would replace the ESP device and your code but It just popped into my head whilst I was thinking about remote (dumb) display for my Chrono and thought I’d mention it.

  6. Thanks Pete, I’ll wait patiently …. [sound of fingernails clicking on desk] ……… 😉

    On slightly different topic, on my blog I focus a lot on my DIY Chronograph for airguns and I use the HC-06 BT module for transferring the data to the phone and I had a thought … you could connect the HC06 (simple slave) or HC05 (Master or slave) directly to a Nextion display, without an ESP-8266 to send/receive data form to your phone or the Pi 3 now it has bluetooth built in.

    Not as clever but if all you needed was a dumb terminal and it would probably use less power.


    1. Yes indeed you could. My logic behind the WIFI version is that I’ve put a lot of work into developing the software for the ESP – and I want to make it work with as many gadgets as possible with Node-Red as the central controller. Ultimately that means I (and others who go down that route) get maximum benefit from learning about one piece of software. I’m quite chuffed that I got I2c now working though I’m by no means an expert – the ack signals and when to use them sometimes get me going.. but I have the expander working now – next stop one of those I2c LCD displays, barometer etc etc.

  7. Pete,
    Unfortunately my PCBs from seeedstudio have got lost in the post, they have given me credit so I can order some more but I was wondering if the eagle files for the newest version were available for download yet?


    1. There was a mistake in the latest version – to do with the RGB LED – Aidan is fixing that now – we only got the boards a couple of days ago. Aidan – you in here…..??

  8. Hi Andrew

    Email your address to me and I will post you one when I am next back at base (travelling the next few days). I had to get 10 and I won’t use them all. In fact it sounds like the next version will be more suitable for my requirements.


  9. Hi. Yes, I’m in West Yorkshire. Do you have a PCB I can buy? Andy

  10. Hi Peter. I’m really interested in your project and would like to get one of your boards. I have a Nextion screen (was going to use for another project) and would like to get the home heating updated from the spinning wheel thermostat I currently have. How much are they and how can I order one? Thanks, Andy.

    1. Hi

      We don’t sell them – it simply isn’t worth it – would cost you the same to send the Gerbers off to China and get 10. Hence the reason we made all the files available. Perhaps someone in here might have spares or you could send straight off to or ITEEED etc.

  11. Dro – it’s not red – that’s the Eagle drawing – red for one layer, blue for the other – the board at “Nextion Wifi Touch Display” is the current board (blue). Not sure what the next iteration will be but no point in putting the gerbers up there until it is tested and I understand that’ll be a couple of weeks. The blue boards in the Nextion project are fine.

  12. Peter and Aidan,

    Is the board in “Home control 2016” the one that you guys are talking about? For mains power? or is that an older version of it? Let me know, it looks pretty good and looking forward to get my hands on one.

    1. The board in home control 2016 with the relay on is the one for home control – there’s a one for Nextion that can also be used for general purpose but has no relay.

        1. The one for the Nextion is the little one that is generally red – look up the screen – on the right… except of course that it’s only red because we had them made that way – you could have any colour you like – I suggest not black as they look awful.

          1. I am lost. I looked through your entire blog, well not quiet all of it but the ones for nextion ( very interesting posts by the way) and I couldn’t find the the red board. I see the green board and blue boards. Can you point me to the right board?

  13. Quote: “Aidan and I have implemented a solution using one of the ESP8266 modules which will check Google every minute and if it gets nothing for 10 minutes will reboot the router.”

    Exactly what I need but I’m an ESP noob, so where may I possibly find further information ?

    1. Check out the blog entry “Home Control 2016” as I added that monostable facility to the software.

  14. Peter,
    Great work on this board and integration of the ESP2866 and Nextion. I was wondering why the board has a 4 pin connector with grounds attached to it (JP5). Are you carrying that over to the next design? I was working on my own design when I found yours and I really like the small form factor. Great Work!

    1. Grounds – you can never have too many ground and power pins – that’s why I asked Aidan to add them into the next update.

      1. True, there is never enough. I am just trying to come up with a design for a daughter board to your board so I wanted to see what pins are going to be there in the next revision and see where I can plug in to hold it up.

        1. I’ve asked Aidan to have a look in here and chat as he’s done the board layout for the updated version which I’m hoping he’s bringing to Spain with him in a couple of weeks or so – at which point I’ll blog it with info…

        2. I’ll keep the pins in the same location in the next iterations and I’ll get Pete to make the Eagle PCB files available on bitbucket.

          What kind of daughter board are you thinking about? Pete and I have been discussing doing a matching board with a mains power supply and a relay. That would make the whole Nextion thing rather useful as a standalone heating controller.

          I’ve also done a 3D design to take the Nextion and our PCB and sit it over a standard single back box (like a light switch). This means that you could put it into a flush mounted back box or a low profile back box if you don’t want to dig out the wall.

          Either way, it’ll look lovely! I’ll send Pete some pics to put on the blog.

          Also, I’m hoping to back a kickstarter tomorrow for a true desktop injection moulding machine, so I’ve spent the last few days learning how to convert my designs into proper moulds that I can print out with high temperature ABS.

          If this works out, then by the summer I’ll be able to manufacture hundreds of these boxes without the £3k+ in tooling costs

          I’m keeping every digit crossed that this works out

          1. AIdan and Pete,

            Thanks for the update. I am actually working on a CAN board using MCP2515 and MCP256 (since the ESP8266 does not have native CAN) to be used for automotive but can be used to control any CAN based sensor. I will be very interested in the Mains power one that you are working to get my home automation started!

  15. Well. I am getting closer. More errors in console:-

    G:/ESP8266/Scargill/scargill-esp-mqtt-dev-bfc8fa9a9b03/scargill-esp-mqtt-dev-bfc8fa9a9b03/Makefile:197: recipe for target ‘firmware/rboot.bin’ failed

    mingw32-make.exe[1]: *** [G:/ESP8266/Scargill/scargill-esp-mqtt-dev-bfc8fa9a9b03/scargill-esp-mqtt-dev-bfc8fa9a9b03/build/rboot-hex2a.h] Error 2
    mingw32-make.exe: *** [firmware/rboot.bin] Error 2

    I don’t think I can find the answer to this one on my own!


    1. Hi Ian

      I’m beginning to wonder if you have cloned the bitbucket repo properly.

      It might be a good idea to go into your eclipse projects folder and just delete the esp-mqtt-dev folder and re-clone from bitbucket. I’ve just done this and it all works fine.

      Other than that, it may be an issue with your installation of Eclipse


  16. Trying to puzzle this out I saw another message:

    process_begin: CreateProcess(NULL, C:\Python27\python.exe firmware/webpages.espfs user/webpage.h, …) failed.
    make (e=2): The system cannot find the file specified.

    I am installing python now……

  17. Hi Pete

    I am so chuffed at how home control works that I decided to have another go with Eclipse and your project as I am beginning to see how some of it works looking at the source code and the changes you make in commits.

    This time I managed to import your project without any problem at all so I have no idea what I was doing wrong in the past.

    I immediately tried a build and got 2 errors flagged although I believe they both refer to a single error.

    recipe for target ‘user/webpage.h’ failed Makefile /hackitt_mqtt_dev line 224
    The line in question:-
    224 $(PYTHON) $(WEBTOOL) $(FW_BASE)/webpages.espfs user/webpage.h

    I have moved to expressif/utils as advised in one of the comments under the original blog entry.

    Any idea what might be the cause?


    1. Hi Ian

      That folder is a historical one! I realised that it was much easier for a deployment just to put in the root folder of the project so that it would be installed directly from bitbucket. The other method meant that users had to manually copy the script to the utilities folder – and we’re trying to make this easy not hard.

      I’ve left the original utilities version commented out in the makefile, just in case. Can you make sure that the WEBTOOL is just set to on line 17ish of the makefile.

      Hope that helps

  18. Thanks Pete,

    I will have to wait for the rom update as that is the only way I can use your software. I have set up “Unofficial Development Kit for Espressif ESP8266” but have never been able to import/setup your project.



  19. So today’s update to the home control code..

    1. Made passwords the usual hidden stars in the websetup page
    2. added {web_setup} command as requested here
    3. added {rgb_ind:X} command where if X is true can use an RGB serial LED for status on GPIO13 instead of a normal LED for full colour-coded status indication
    4. Dramatically improved the status flashing – turns out there was some old conflicting code in there now removed.

    All documented in the source on

    Not done anything with ROMs as not sure which one to put up there… variations for SONOFF (different relay output), new boards (using GPIO16 for general out instead of GPIO0 etc.)

  20. Hi Pete

    Great work. Next time you are tweaking esp-mqtt-dev any chance of adding a command from serial or mqtt to enable Web Page Control to get round a problem I have where I cannot get back into setup on 2 of my esp devices. OTA is working a treat on all the others. Thanks again, I was about to give up on the esp due to all sorts of issues but your code has been rock solid.



    1. You mean the {web_update} command I just added for you in the source code – along with optional RGB serial LED indicator instead of the old flashing light etc… see updates in source.

      I’ll have to ponder how to do available ROMs as there are a couple of #defines that can change depending on the board used….. and I don’t want to get into a whole thing about supporting different roms.

Comments are closed.