Local Weather Station

As I alluded to in my previous blog entry, I had a basic problem - different weather stations giving me different actual temperatures for my local area. Now I get there are local variations within a town, micro weather is a real phenomenon. However sometimes the weather stations were out by more than 8°C. So I decided to take matters in my own hands - how hard can it be?

It started with this component:

Full Article

Conflicting measurements?

What do you do when your home thermostat tells you the outside temperature is 8˚C lower than what your Apple Watch tells you? Who do you believe?

Millennial Code - Real Production Code

This is how I'd expect a modern millennial to code (you know - the kind of person who considers facts to be particular opinions).

private bool CheckExist(out int id, out bool manageAll, out string orgCode)
        bool Yes = false; 
        id = -1;
        foreach (DataRow r in dv.Table.Rows)
            if (r.ItemArray[1].ToString() == TextBoxUsername.Text && 
                r.ItemArray[2].ToString() == TextBoxPassword.Text)
                Yes = true;
                id = (int) r.ItemArray[0];

    return Yes;

Because Everything Has To Be Equal

So, so stupid. We now have a pregnant man emoticon. I get the inclusivity thing, but if we want to have equal representation for every possible combination of anything that can happen or can be imagined, then we will run out of resources.

Pregnant Man - because, well we do get pregnant!
Pregnant Man - because, well we do get pregnant!

How to Upgrade HDD in UCK-G2-PLUS

If you have a Unifi CloudKey Gen2+ controller with existing video footage and want to preserve that as well as any configuration settings that might be stored there, but upgrade the capacity of the default HDD from 1TB to something more usable, this article is for you.

  1. Get a larger 2.5" HDD, I used the internal drive from this external USB drive. It is by far the cheapest option I could find to get a 5TB drive.
  2. Turn off the CloudKey
  3. Remove the 1TB drive (source) from the CloudKey and connect it to a PC.
  4. Connect the new 5TB (target) drive to a PC
  5. Issue the following command from MacOS / Linux:
    dd if=/dev/diskA of=/dev/diskB bs=1m
    (Make sure A is the SOURCE and B is the TARGET, on macOS use diskutil list to find the right drive)
  6. Once the copy is done (mine took 2 hours or so) run GParted - you can boot it from a Live ISO.
  7. Accept the recommendation to extend the partition to fill the disk
  8. Edit the large partition by moving the partition slider to the right to occupy all space and apply
  9. This resize might take 10 - 20 minutes
  10. Once done eject both disks.
  11. Gently pry open the red top from the black base using a small spatula.
  12. Remove the HDD
  13. Remove the metal shroud and small USB to SATA adapter.
  14. Pop out the 1TB from the carriage from the CloudKey and snap in the new one
  15. Boot up the CloudKey and give the OS about 10 - 20 minutes to recognize the extra space. Everything should be preserved.