The weather station, the Raspberry Pi and the ESP8266

In a previous post going back to 2012 I talked about how I used an Android netbook running Linux and wview to post data from my WS 2355 weather station to Weather Underground. Such a long time ago, things have changed a lot since then.

First up I replaced the Linux netbook with a Raspberry Pi running Raspbian and using pywws to upload the weather info for IWELLING61.  The netbook was ok but getting Linux on it had been a kludge so as soon as I found out about Raspberry Pis I got one in. Cost – around $60 NZD.

ws1Then a second weather station to go at the bach. This time I was pretty confident that I could get away with a cheaper variant so picked up a WH1082 from Trademe for about $185 and another Raspberry Pi from nicegear.

trademeA year or two rolled by and the original WS 2355 base station stopped communicating with the sensors – I tried cables and wireless without luck so I went hunting on Trademe for another weather station – this time it was a WH108x for $135 NZD from debra101 in Taranaki.


Another year and the $185 WH1082 at the bach stopped working so back to debra1010 for a $135 replacement.

That leaves me with a set of spare gauges from the WS 2355 and WH1082 lying around.

In between times I started playing with the cheap (< $10 NZD on ebay)  ESP8266 Internet of Things devices.  esp8266So much fun to be had here! The ESP8266 has a large fan base now so lots of resources around – it is  bit like a dumbed down Ardunio that you can use as a single purpose thing to do stuff. I had a choice between programming it in C using the Ardunio IDE or LUA using nodemcu firmware. I decided on nodemcu as although I hadn’t used Lua before it looked easy, especially if using the cloud firmware build service that has a lot of APIs to common sensors and devices built in.

So what do do with it? Well first up I  connected the ESP8266 to my Macbook Air and flashed it with a custom cloud build using I could then use a terminal program (I used zterm for the Mac) to talk to it at 115200 baud 8N parity. It seemed to work better with no flow control. Next up I created a small init.lua script to start the wifi and connect to my network. To transfer the script to the ESP 8266 I used The ESP restarted and was on the network. All good but I wanted a smarter way of transferring files and running adhoc commands. Some googling and I built Lua scripts for tftp and telnet servers for the ESP (thanks to whoever I stole bits of scripts from), loaded them up and then unplugged and I could access the ESP over wifi for most things I wanted to do.

You can download copies of the scripts here. There are also a few shell scripts in there to automate copying files, restarting the ESP etc;

espThe last thing I did was to hook up a very cheap and inaccurate it turns out DHT11 temperature sensor and post the results to thingspeak.

I’ve now ordered the better DHT22 (and another ESP, and a 4 line LCD display, and a relay … all up less than $20 NZD delivered) for my next project – that is get the ESP talking directly with my leftover rain, anemometer and wind direction gauges.


A couple of things to watch out for:

  1. You can only  run one TCP and one UDP service at a time on the ESP so if my telnet server is running then the ESP won’t be able to use https posts to update thingspeak.
  2. There are a lot of variants of the ESP around – you can buy them cheaply on ebay and probably a few cents cheaper still on Alibaba. Go for a 12E or better variant, apparently the newer ones have more flash and better wifi reception.
Posted in IT

Google has solved the photos problem

It is a long time since I’ve written anything here – its been busy! I wrote about this in our June 2016 newsletter and it decided it was worthy of expanding on.

The problem with photos (and videos) is we take a lot of them, they take a lot of space and often they are spread over multiple devices so we don’t always back them up properly (understatement). Also the photos are hard to find – I don’t know about you but I never seem to get around to organising them into logical albums all in one easy to find place. And the other problem is I occasionally like to show someone a photo or two and my phone just doesn’t have enough storage to keep a decent history of photos.

The backup issue is the big one – every year or so a friend (not usually the same one) calls up to say their PC has died and they have lost their photos. Everything else you can probably replace even if there may be a cost, but if the hard drive is gone and not recoverable and that’s your only copy of your photos then they are gone forever. Even if you do back them up say to a USB hard drive – how many of these do you have and where do you keep them? If you have a house fire do you still have a backup?

Google Photos solves all these problems in a free and easy to use way. It’s brilliant!

You go to the Google Photos link and follow your nose. Download the app onto the devices where your photos and videos are (PC/Mac/Phone), point it at your photos and let it go. If you have a lot of them it can take many hours but at the end of it all your photos and videos will be uploaded to google photos and they will be searchable and shareable.

There are just a couple of things to watch out for when uploading:

  • Take the option for high quality uploads (free unlimited storage) rather than original quality (limited storage). The high quality photos and videos are absolutely fine.
  • If you have a lot of photos/videos and you are not on an unlimited internet plan it may use up your data allowance during the upload – keep an eye on it. If you are on a phone do it over wifi.

At the end of the process all your photos/videos are backed up into the Google cloud – for free – and you can search them from your PC/Mac/Phone. I’d still keep a copy of the them on a USB drive in their original resolution just in case – in case your account gets hacked perhaps, or you delete some by accident.

For me the backup is the boring but necessary bit. The real power of Google photos is that it gives me access to all my photos anytime (that I have an internet connection) from any device, in particular my storage challenged phone – and the search is freakishly good.

It takes a few days for Google to analyse the photos but when done you can search on location, date or things like cat, car, beach etc;jm. You can also find people by clicking on a mug shot that Google generates. The search identified a person in a full face motorcycle helmet taken from 20 feet away. For the article on ANZ in the newsletter I knew I’d taken a picture of the ANZ sign being added to Hotel Intercontinental (when they should have been spending the money on their IT systems) but I couldn’t find it on my phone. A search of ANZ found nothing but using the term “hotel intercontinental” found it second in the list in Google photos.

No problem finding photos of the late and dearly loved Mr Cat either.


And from my phone..


So what have the Romans has Google ever done for us…?

  • Search
  • Gmail
  • Chromecast
  • Now Google Photos


Seminar Series – October 2015

We are running the following three FREE lunchtime seminars:


Seminar 1: The key numbers for your business
Tuesday 6 October 12:15 – 1:15 pm  – this seminar covers the following:

  • Accruals vs cashflow
  • How to get your money out of your business – drawings, dividends, salary
  • Shareholder current accounts –  drawings and funds introduced, what they mean and how they work
  • What can the financial statements tell you?
  • Effect of closing stock figures
  • Key ratios e.g. debtor days, gross profit
  • Effects of small movements
  • How to increase your income without working more – the power of leverage, claiming all costs etc




Seminar 2: Your Personal Finances
Tuesday 13 October 12:15 – 1:15 pm – this seminar covers the following:

  • Your approach / personality
  • Types of investment
  • How to get ahead
  • Budgeting – does it work?
  • Reducing your mortgage
  • Where to from here?




Seminar 3: Xero Update
Tuesday 20 October 12:15 – 1:15 pm – this seminar covers the following:

  • Using Xero to claim expenses paid for personally
  • On charging expenses to clients
  • Find and Recode
  • Inventory
  • Payroll
  • Repeating invoices, email templates and email reminders


Your presenters:

Baubre Murray FCA – Director of Dowse Murray Chartered Accountants – an accountant with more than 25 years experience working with business owners.

Martin Dowse BSC (Hons) – Technology specialist with more than 25 years experience working with technology systems

All seminars are being held at Level 1, 166 Featherston Street.  Note that this is in the meeting rooms on the first floor of our building, not in our own office.

Bring a friend but please RSVP as soon as possible as we have only a limited number of seats for each seminar.

RSVP by email to or phone us on 04 971-1600.

Looking forward to seeing you!

A really easy way to record and claim expenses in Xero

Xero is great – we are big fans of it here! But some bits are not quite as great as others, and the expense claims in Xero in particular have less greatness. They work but they are long winded, easy to get wrong and hard to fix if you do get it wrong. However the Xero app for iPhone/Android does have a neat feature where you can photograph a receipt and attach it to an expense claim all in one go so it is still tempting to use expense claims.

If you don’t need the create/submit/approve/authorise/pay workflow wrapped around expense claims then there is a better way. Really fast, really easy.

For any of our small business clients with a version of Xero that has invoicing (i.e. not the cashbook version you can only get through accountants) we recommend they use a accounts payable invoice (aka bill) to record expenses they pay for personally and then “pay” it from funds introduced as detailed in our FAQ here.

You can drive this all from your phone very easily, all you do is snap a photo of any receipt(s) you want to claim and email the photo to the unique “files” email address each Xero organisation has – set your Xero files address up as a contact on your phone first.


When the email arrives the attachment is automagically saved into an files inbox in Xero. Then when you have a bit of time and want to process your expenses you logon to Xero, go to the files inbox, tick all the photos of receipts sitting there and take the option to Add to new / Bill.



Complete the bill using the handy preview of each receipt on the left and making sure it is set to be tax inclusive.


Then the last step is to approve it and pay it from Funds Introduced.


I process my receipts every two months when I do the GST return, dating the bill and payment the last day of the GST period to make sure it is included in the return.

If you don’t have a version of Xero with invoicing then there is an option to create a spend money transaction instead of a bill – you would need to set up a dummy Petty Cash bank account in Xero and periodically clear it out by doing a receive money from Funds Introduced but it should still be pretty quick to do.


What is the best payroll system for small businesses in New Zealand?

We have had a number of clients call us lately asking if they should be looking at using Xero Payroll so I thought it about time that I summarised what I have been telling them in one relatively concise post. If you want more detail contact us.

With sick pay, holiday pay, termination pay, PAYE, student loans, and Kiwisaver deductions payroll can be a very complicated thing and if you get it wrong and miss a payment to IRD you are looking at a $250 late payment penalty plus the hassle of fixing up the mess. So using the right payroll system can save you a lot of time and gnashing of teeth.

Broadly the choices are:

  1. Do it all manually using the IRD calculators
  2. Use a DIY payroll system that does the calculations for you and tells you how much to pay your staff and IRD – Xero payroll falls into this category
  3. Use a full service payroll provider that does it all for you
  4. Thankyou payroll

Manual payroll 

You use the IRD calculators to figure out how much you pay your staff and what you need to pay IRD for PAYE etc; You pay your staff and on the 20th of the next month you pay IRD the PAYE, and file with them two forms, the IR345 employer deductions form and IR348 employer monthly schedule. If you have a login to IRD’s myIR you can file these electronically.

DIY payroll

There are a number of desktop and online systems here of which Xero is one. The systems provide a workflow that helps you manage paying staff and a calculator that works out how much you pay your staff and IRD, and what you to put in the IR345 and IR348 forms. Some of these payroll systems (e.g. Xero) also provide export files that you can upload to myIR for the IR 345 and IR348 forms, and batch files you can upload to the bank to pay your staff and IRD.

Xero Payroll is a good online full feature DIY payroll and getting better all the time. Another good option is Flexitime, with Flexitime you do get the option of allowing them to manage your PAYE filing and payments if you want.

Full service payroll

Now things start to get easy. When you sign up with a full service payroll provider you give them direct debit authority to your bank account. You fill in or check the time sheets for the employees and authorise the pay and the payroll provider does the rest. They direct debit the full amount of the pay from you on the due date and pay the staff. On the 20th of the next month they pay IRD (having already taken the PAYE $ from your account when the pay went out) and file the IR345 and IR348 forms for you at IRD.

We use and recommend online providers Smartpayroll and iPayroll.

Thankyou payroll

Thankyou Payroll gets a category of its own as it is just a little bit different.  It is very like a full service payroll except rather than direct debiting the full pay amount from your bank account you make the payment to Thankyou payroll each pay period. They still do the form filling and paying IRD. Updated: There is also a direct debit option, see Hugh’s comment below.

So which payroll is right for you and what will it cost?

The short answer is an online full service payroll or Thankyou Payroll are the best, and the best value, and these are the ones you should look at.

Manual payroll costs nothing but your time (and any penalty payments if you get it wrong). If you pay one or two people on salary and you do it via AP (same amounts each month) and you have a good 20ths of the month process and you always file things on time with IRD and you love doing paperwork then this is the payroll system for you.

Xero payroll is interesting but it still needs you to do the uploading and paying.  You can add payroll to starter, standard or premium plans for $10 for the first user per month, and $1 per month per extra user (all plus GST). At the time of writing this Xero don’t have a dedicated payroll helpdesk, if you need help it is via email to their normal helpdesk.

Who should use Xero payroll? If you have Xero already, and really want to hang onto your PAYE $ until the last possible minute, and you are disciplined about filing and paying IRD on time then Xero payroll is a good option.

If you are considering Xero payroll also look at Flexitime. There is a comparable basic $10 per month plus $1 per employee per month (up to 10 employees) plan with email support, or $20/$2 with telephone and email support and more features.

Full service payrolls are definitely the easiest and least risk. They do it for all you, no risk of missing payments to IRD. For Smartpayroll and iPayroll it will cost you around $25 – $35 a month for up to 10 employees. They also have very good email and telephone support help desks – invaluable if you have to work out termination pays or anything out of the ordinary. They also integrate with Xero.

Who should use a full service payroll? Anyone who has to pay staff should. They easily pay for themselves in the time they save you, even at minimum wages.

But there is more – Thankyou payroll is very close to being a full service payroll and it is free. The catch is that you have to transfer/DD the full pay to them three days before it gets paid, so they hang onto your money for a bit longer. If you are a charity, or donate regularly to one, or pay a small fee, then you can get next day payroll processing. Thankyou payroll also have a helpdesk.

Who should use Thankyou payroll? If you pay staff it is worth a look – the price is right and we have had good feedback from clients of our using it.


1 2 3 4 10