Home Control April Update
The home control system is coming along nicely and after a “weekend of code” has some nice new facilities, not the least being a new test desktop PC program and some new radio error checking. Add to that the recent work on week/weekend temperature program and it’s just about ready to roll to both the cottage, our house and Spain. One of the guys helping me has gone off with the first model to play with.
Firstly the Android/IOS App has been tidied up and some new screens put in the place – the first is shown on the left here and shows temperature monitoring, +-adjustments and hold-off (in days) which puts it on standby – useful for the cottage if it’s not in use. Dusk and dawn times are automatically calculated on a daily basis and any of the on-off controls can now include on from dusk until midnight, on from dusk until dawn etc.
The second page shows some demo NRF24L01 remote units and similar on-off controls with these.
The new internal additions allow for momentary radio failure and will temporarily log out and failed unit and it’s siblings to prevent slowing everything down. This was a major pain before as constant polling of units could slow things down. That is all now history.
The third page here can control serial LEDS – the new type with individual serial control. I’ve not yet implemented a simple means to change the lengths of these LED strips but that will come shortly. There’s no reason I can’t store this in EEPROM.
Note the various colour controls and sliders. The very bottom is just an experiment area.
Below right you’ll see the heating controls which allow setting main and fall-back temperatures as well as weekday and weekend timing controls. You should be able to enlarge these images by clicking on them incidentally.
Below all of that is a glimpse of the new PC testing software – just finished working on that and not yet turned it into stand-alone compiled code but that will come this week hopefully. It works perfectly and includes the ability to save profiles for testing different board scenarios.
What has made a bit of a difference is the discovery of the ease of extracting mains control PCBs from some of the low cost plug-in-the-wall Chinese USB supplies – the newer ones have very small boards capable of giving out over 0.5amps at 5v very efficiently.
So now it’s possible to make plug-in-the-wall radio units and masters no longer needing separate power supplies. Added a nominal level of security
Some way to go before I’ll be satisfied with this but it’s starting to look ok. I now have TWITTER alerts kind of running on the larger boards but the low-cost version still won’t have them – I’ve written off to the guy who designed the Ethernet library to see if that can be fixed.
All of this has come a long way from my early experiments with the NRF24L01 radio boards – which seems to have been a popular video https://www.youtube.com/watch?v=VgmVYdSCNLs but documenting this lot could take quite some time.
The only problem with the NRF24L01 boards is range – they are atrocious. Firstly they are very susceptible to noise and many people recommend putting an electrolytic capacitor on the board at the connector. I suspect this has to do with current spikes when transmitting. This does seem to make a difference. Secondly - they are in the same radio spectrum area as WIFI etc. Thirdly there is no way to gauge incoming signal strength and therefore when used with any mesh network software, it can’t tell which is the best connection to use – and finally – just because of the frequency band they operate in combined with low output, they won’t go through thick walls easily – I’ve seen their range reduced to a few feet in certain circumstances. On the plus side, they ARE cheap and though they need 3v3 to operate, the data lines happily work with 5v logic – most other cheap boards out there need level convertors which at the very least means a bunch of messy resistors.
On the right you see a little stand-alone Ethernet-driven board which is dirt cheap to put together.. that too has possibilities though of course it still needs an Ethernet lead to run. I’ve sent off for some inexpensive plug-in-the-wall mains USB supplies so I can rip them up and get the supply PCB out of them to power these units.
Somewhat frustrating that they are way too expensive when sourced in the UK but hey, at least they’re available.
That’s it for now, got a lot of work to get through before I can devote more time to this and awaiting feedback from various people to fix some minor library issues… but no doubt about it, the next house will be the one to watch for home automation…
Update July 2014: I’m in Spain and working with controllers here – the range of the NRF24L01 boards (or lack of it) is getting to be a severe problem. Investigating alternatives such as the Atmel processor with built in radio and some 800Mhz and 433Mhz transceivers.
This all sprang up from my original article on a cottage thermostat in which I envisaged a very simple controller. Then came the UberBareBoard article about an Atmega328-based Arduino clone, initial attempts to master the NRF24L01 radio. The next article was the first item entitled home control and after this – then part 2 and then the winter update – all the time learning more and more. And after this… July and the full mesh.
Of Phones and Stats
In the last blog entry I mentioned we were off to buy a Chinese mobile for Maureen. As is often the case that turned into a fiasco. We arrived at the guy’s house armed with cash and he presented the phone in a nice case and quickly demonstrated it – pointing out that the app store was in Chinese but would be no problem to go through. Of course, on reflection that was easy for him as he was Chinese.
I asked about the regular Play Store and he said it could be downloaded from the Chinese version – and so as we were in a rush with Maureen heading off to the states, I said ok and off we went.
Of course the reality was, half the apps were in Chinese and though some version of the Google Play Store indeed appeared – it immediately crashed on trying to run on the phone.
Thankfully that brand of Chinese phone come ready rooted and so if you know where to look you can find complete operating system replacements. Several hours later Maureen had a brand new dual-sim phone in English. Not only that but it Looks like a Samsung S5 and their cases fit! Not at all stripped down the phone has a high res display, a quad core processor, 32gig of memory with the ability to add a MicroSD card (which we did) and for under £100 (not tied to any contract) I have to say, worth the money easily. Maureen is currently in the USA and I’ve already had Skype video calls from her using the phone.
Lots of meetings the last couple of weeks but I’ve had a little time to work on the thermostat – now fitted into Hollyberry Cottage (along with a sparkly new HD Freesat box). It managed to die overnight but I now know why (spikes) and I’ve a solution which I’ll implement on all my boards this weekend and for those interested will do a write up shortly thereafter. I’m going to have my first shot at using the “watchdog” on the chip.
But now… two more meetings then I’m off home.
A Week of Conference
As the FSB’s conference week draws to a close it is worth noting the hard work that went into what for most is a 3 day affair – the Annual Conference and AGM. I went over there on Tuesday afternoon to take pictures of Manchester – sadly it rained solidly which limited that aspect but at least that night my guys Nigel and David and I went off into town for a somewhat expensive Italian at a haunt apparently beloved of footballers – which was nice – those of you who follow my antics on Facebook may have noticed lots of Manchester pics already. On Wednesday we started the ball rolling – most of the guys were in conference-related meetings while I just made a fleeting visit to said meeting as I had my own IT meeting and discussion as to how we would do our bit for the event.
The conference was a big affair in Manchester Central Conference Centre and some of us stayed at the rather nice Midland Hotel opposite the venue which is smack in the middle of Manchester itself.
The exhibition opened on Thursday and that evening we held our AGM with no big surprises and the conference got off to a proper start on Friday with Ed Miliband and George Osborne but to name a few of the personalities.
At one point I caught Ed as he was passing the IT room where my guys were beavering away and asked him if he’d mind coming to say hello. Despite a tight schedule, he not only came with me to the room but went around and shook everyone’s hand much to the delight of the guys who spend most of their time seeing these personalities only via a screen.
Friday night was a 70’s disco, not something I normally like but I have to say it was once of the best I’ve been to with half decent food, no shortage of drink and absolutely excellent period music. It helped that I managed to get a hug and photo with Naga Munchetty – which was nice. As you can see by the photo of Maureen and I on the left, we dressed accordingly. Some were WAY more ambitious.
Saturday during the day was much like the day before, we spent our time editing video, processing pictures and generally ensuring the IT worked ok – I spent some of my time answering questions at the Twitter bar and talking with FSB colleagues and people I’ve come to know from ESBA – the European Small Business Alliance some of whom I keep in touch with via Facebook – it’s interesting to see how many of our older generation are now starting to ask serious questions about social media, but it’s also disturbing how many still come up with a smile and take delight in telling you they don’t “do” social media.
Their loss I guess. I distinctly remember thinking the same about a guy at driving re-habilitation which I’ve now done twice for the serious crime of doing 2mph over the limit and I recall him saying “I don’t know what they think they can teach people our age”!! There is ALWAYS something new you can learn.
And so onto Saturday night dinner - a black tie event – I had no special expectations and indeed the food and singer were a little average – but I was delighted to meet up with and get the chance to introduce Gemma Vasquez (who is the chair of Gibraltar FSB) to Maureen – as well as chatting to Patrick Gibbels and David Caro from ESBA (the latter gave me a nice supply of chocs for the IT guys upstairs – though sadly not all of them made it up the stairs) – we ended up having a nightcap with friends in the hotel – what a great way to end a great day.
Tomorrow Maureen and I went off to pick up her new Chinese smartphone in time for her trip to the states next week. Despite initially showing mainly Chinese, after a little hacking and upgrading it’s now running a recent Android system and looks for all the world like the latest Samsung Galaxy phone but with TWO SIM sockets! How’s that for sub-£100
Conference information including pics, videos and reporting at http://www.fsb.org.uk/conference2014 and for those who prefer to pick things up from Twitter, the hashtag #fsbconf just about has it all.
Dying to get back to work on my thermostat for a day to sort out whatever’s making it crash so I can fit it up in the cottage in Bellingham and start getting control of the heating, before starting yet another round of FSB and ESCO meetings.
Scargill’s 60th Birthday
60th birthday and I officially go from middle-aged to ancient – a joyous occasion, well, it might have been had EASTERN AIRWAYS not screwed it up for me.
The plan was to fly to Cardiff last night in time for a nice Indian dinner before embarking on a 3-day meeting session. I specifically booked flights to make sure I had plenty of time including the 1-hour trip and half-hour on-going journey in Wales. Sorted.
10 minutes before our flight was due to leave, the assistant announced that the plane would be delayed due to “engine testing”. No problem as the flight left a fair bit of time before dinner. 10 minutes later… “the flight has been cancelled”.
We were ushered back by the now hapless-looking assistant up to get our bags and go back to the checking desks where he had the NERVE to offer 2 Easy Jet seats – to the WRONG airport – and with an £80 surplus (yes, we pay them!!!) which of course they would refund – eventually. Given that the last cancelled flight refund is taking us 6 weeks to get back, I was not having that and said so quite loudly but it made no difference as two people, clearly desperate to take anything going, had already claimed the seats.
Here’s the best bit. Eastern Airlines had a flight this morning at 6:40am – but actually had the nerve to suggest that they could not put up passengers for the night if this was their originating location. I lost it I’m afraid – Maureen dropped me off here without any keys – why would I need keys – I’m being picked up in a couple of days! After I calmed down, the attendant, powerless to make any decisions other than when to go to the loo, went on the phone to ask permission to put me in a Hilton Doubletree hotel which just happens to be walking distance from the airport – and that is where I ended up – with a voucher which had just insufficient in it to buy a decent meal.
5am this morning I arose, cleaned up and headed off to the airport. After the usual anti-terrorist stuff, I ended up with minutes to spare for take-off – just in time for a message to say the flight was DELAYED. 2.5 hours later and with another £5 voucher – just enough to buy a sandwich but not coffee, we eventually set off and by 11am I was in Cardiff, a mere 16 hours later than planned.
Why did I chose to fly? To avoid nearly 6 hours of driving – on reflection – at least I would have arrived on time.
Home Control Winter Update
I’m spending some spare time right now working on the home control. My first system is working at home in the UK with a nice little 2-line LCD giving out useful information (as well as accessing that information on the mobile phone of course) but a little while ago we spotted some inexpensive colour LCDs from China – somewhat under £3 each – well you can’t let an offer like that go.
These displays need 5 resistors to work and some software – the library to drive them took some finding and it was originally quite slow but my friend Aidan changed it to work with SPI and I did some more and eventually we got these cheap displays to work perfectly. They look really neat but for some reason my camera just won’t capture the sharp and vibrant colours so you’ll just have to take my word for it. Nice displays.
And so – as of a little while ago – my first working MK2 is ready to go. As well as peak and standby heating control I’ve added a frost setting – up to 255 days hold-off during which time the heating will only come on if the temperature gets below 5c… handy for the cave in Spain perhaps.
The LCD display shows the current humidity, the date, the inside and outside temperatures, the set and fall-back temperatures along with the number of hold-off days. Below that is the current time (updated every second) and then the dusk and dawn times which are automatically calculated every day. The internal and external temperature displays along with humidity also have trend indicators not shown here.
All working and the phone displays you see are as they appear on my Samsung S4 smartphone… though I’m not currently actually controlling the heat in Spain but once back in the UK I’ll adapt this to work with the controller in Wark.
The main controller, having moved to the larger 1284 chip – now has all the I/O of the radio slaves and so can function as a stand-alone unit if necessary, simply plugged into the router to give remote control. I played around for a while with adding the display onto the main board but that was slowing things down and ultimately I’ve gone with sending a package out of the serial port so that a separate board, if needed, can handle the display. For my first shot I’ve done a colour LCD board with infra-red remote input – the idea being to add temperature up and down via infra-red for the rental cottage.
I did have 4 fader (PWM) outputs on each of the boards but in the latest update I’ve added a library to both to handle the new serial LEDs – the ones that can be individually programmed and I’ve added commands to change colour and brilliance on these.
The two diagrams below show the main controller utilising a 1284 chip (for extra memory and I/O) which in addition uses a standard Ethernet card and an NRF24L01 radio board…(getting 3v3 from the Ethernet card to feed the NRF)
Below that is a slave board which merely uses a 328 chip and again the NRF24L01 board (with 3v3 regulator onboard) for communications. The master is just cluged on breadboard for now.
This all sprang up from my original article on a cottage thermostat in which I envisaged a very simple controller. Then came the UberBareBoard article about an Atmega328-based Arduino clone, initial attempts to master the NRF24L01 radio. The next article was the first item entitled home control and after this – then part 2 and after this… the April update!
A Busy Week
What a busy week. It all started last Sunday when I was supposed to board a Newcastle plan to Brussels. I’m vice-chairman of an EU group handling the ICT area of a project called ESCO. Suffice it to say we meet regularly over there regularly.
4am on Sunday morning an email turned up from BA to say my flight had been cancelled. This was a Newcastle-Heathrow-Brussels two-parter.
With that first flight scrapped, we had to cancel the lot and come up with a quick miracle – which appeared in the form of a new trip to Edinburgh – a direct flight to
Brussels (I often end up in Edinburgh because Newcastle Airport, in terms of flights and cost is basically rubbish especially near holiday times). No problem (other than the 6 weeks it will take to get a refund out of BA and Expedia).
Off I went to Brussels. I won’t go into the details of meetings here because to the outside world they are no that interesting but let me say this was not a holiday lest the pictures suggest otherwise. Not much point in taking pictures of a meeting room, either… on the other hand if you have a camera…
I have to say, the weather in Brussels was crap… better than here in Wark but cold. There’s a photo somewhere of me sitting outside having a Leffe beer at a pub in downtown Brussels – nice heater on the wall but I still ended up with gloves on at one point. I really do like the Grote Markt in Brussels however, it’s a nice little area with great bars, friendly people, lots to see and importantly, Leffe on draft.
Parts of the city however, especially in
poor weather make me think of deepest Russia. Our meeting involved travelling through such parts but the good side of that is I’m now a little more comfortable taking the tube and bus over there.
THe meeting itself took place in I guess what would be the outskirts, certainly looked that way from the view out of our window. I was there for 2 nights, the first was a Billy-no-mates night, the second with colleagues from Italy and Spain – quite nice – we went to a Greek restaurant – well, cafe.
About the only other exciting part of that trip was the return – we blew the quick arrangements we’d made on Sunday – thanks to February having the same days as March and too short notice to do the job with care!! We’d ended up booking my return flight for the right time and day, but a month from now. I found out only hours before the flight was due.
No sooner was I back in the UK and tackling the usual email mountain than I was off to Manchester overnight to de-stress – then an early flight to Heathrow and then on to Gibraltar. Another meeting, this time the bit I was interested in was a potential trading portal for the FSB – there was a presentation and the designers were there etc.
This time I struck gold with the weather. A little shabby when I got there, but by Saturday, Gibraltar weather was nothing short of magnificent. See the rock there in the photo (weather not so hot on the way in) – well, the meeting room is at the very top. Lovely. At the end of this blog are a boatload of photos which say more than 1000 words as it were.
The afternoon I arrived as it happens there was a meeting to discuss the issues that traders had/have with the Spanish government – if you’ve not read about this – and bearing in mind these guys are Brits – it’s a worthwhile read – the Spanish people are very, very nice – but their government…. not so – indeed, when reading about what they get up to, the term childish comes to mind – even the neighbouring town of La Linea is suffering through this agro – and that’s Spanish! Anyway after an informative conversation we ended up at the “Rock Hotel” for dinner, or rather, the Spanish FSB (GFSB) took us there – what a place – if you’re ever there, take a drive up – the views are amazing – not quite as amazing as the views at the TOP of the rock but amazing non-the-less and a nice hotel from what I saw.
On Friday the meeting I’d gone for took place and by Saturday, people were heading off in different directions to go home and I learned all about how to get there by train and bus – avoiding the up to 8 hour delays by simply walking over the border. Some day I may put that to use.
Anyway I took pictures at every opportunity. Enjoy and don’t forget you can usually click on these images for larger versions or (on a PC) hover for info.
Prime Minister Live–Small Businesses
Right now.. Prime Minister David Cameron – speech – LIVE NOW at FSB Policy Conference at j.mp/FSBLIVE #FSBSkills
Logmein Replacement
And why would you want to replace Logmein? Because right about now… the free version is about to stop working.
After many, many years the Logmein people have finally decided for whatever reason that they can’t support the community that has promoted them for so long and are going completely commercial. I use Logmein on all my machines – BUT I use it so infrequently that it simply is not worth paying. I must access a machine once a month if that.
So what are the alternatives – I went out looking and half of the so-called alternatives want someone at the other end to enter a code !!! Not much use if the machine is in your office on it’s own. Well, to cut a long story short – TEAMVIEWER seems to do the trick – for private use it’s free and you can put a code in your machine to let you access it remotely without interaction at the other end – you also have file transfer which was ALWAYS commercial in Logmein. Works for me!
Peter Scargill
A Weekend “Up North”
Spent part of the weekend up North with friends – here are a couple of photos I took while we were there – early in the morning – amazing how spending time in the countryside can cheer you up. I’m all set for my trip to Brussels this morning – though to be fair – it’s probably warmer here than it is over there.
So, today I’m travelling from Newcastle to London then off to Brussels – back in a couple of days, got a meeting with some ESCO colleagues from around Europe to attend to. Hoping to grab a pizza from my favourite place in the square. Currently battling with a Chinese supplier to get some code that works for a little phone-type colour display. They are trying hard but I think they’re reading my emails via Google translate and we’re not getting very far!
Windows Technical Support
Well, that was good fun.
This morning, Maureen received a call from "Windows Technical Support in London" – the third this week… and of course she knew it’s a scam and passed the call to me to have some fun.
An Indian lady responds to say that this is about virii on our computer. I played along. I asked her if this was Microsoft support, she was quite shirty, no this was Windows support. I asked her what information she needed from me. Nothing, she said – we have all the information we need. She asked me to go to the computer and press the start button.
Essentially the goal is to take you to the prefetch directory or similar where you’ll see a load of files that don’t mean much – and she’ll try to convince you that this is malware and for a small sum…..
I stretched it out as long as I possibly could while Maureen and I had a good laugh, then asked her if she slept at night and ended the call by making some rude suggestions before closing the call while she was in mid-sentence.
This was extremely funny but there is a serious side – some older folk might be taken in by this scam which is as old as the Nigerian one…
If you get this – play along and then when she (or he) asks you to press the start button – act dumb and then tell them your computer doesn’t have a start button but has lots of pretty coloured boxes… just for a laugh. Then say the plug has come out and can they wait a second for you to reboot. Put the phone to one side and go get lunch.
One clever fellow on the web made a recording of the whole thing in his case (I really do need an instant record button for these calls). Here it is.. enjoy.