Wednesday, February 6, 2019

Managing My Internet of Things with a $5 Digital Ocean VPS and MeshCentral



I have a lot of tiny Windows and Linux device spread about my lab/offices.  I acknowledge my problem with buying a Raspberry Pi every time I go to Micro Center and owning just about every mainstream SBC between tinkering and my day job.

Moving past my personal issues, managing these devices has been a pain in the past, especially when I work from home or am travelling. My solution is to use Mesh Central, an open source remote management solution written in NodeJS.


Things I love about Mesh Central:

  • It's open source
  • You can stand up an installation in five minutes if you type fast
  • Runs on Linux and Windows
  • Easy to maintain
  • You don't need Intel vPro/AMT to use it, it includes a software agent
  • Software agents for Windows, Linux and OSX 
  • The documentation is fantastic
  • Features are being added constantly

Here's a quick rundown of what you need to do to get an instance up and working quickly.  There are also videos (and the Install Guide linked below) if you want to watch it happen.


  1. Spin up a $5/month 1GB/25GB Ubuntu 18.04 droplet on Digital Ocean
  2. Follow the Install Guide (Ubuntu 18.04).  I would recommend reading the entire section first because there are some installation variations towards the end that you might want to use (Increased Security Installation) and not have to do the install twice.
  3. Setup Let's Encrypt support for a free SSL certificate (see the User Guide)
  4. Create an account and login
  5. Create a Mesh
  6. Download the agent and install it on your things
Some variations for slightly modified use-cases:
  • If you only want to manage things inside your network, it can be installed on a Raspberry Pi!
  • Since the agent requires a single click to install or can be run once- I use it to provide family tech support
  • Since most of my IoT development devices are supported, using the included file manager is an easy way of getting new builds over to the device

Some Additional Feature Wishes
  • More embedding/API support (Get a list of devices to integrate it into other stuff I develop/dashboards, let me upload files from my build system)
  • Android Support
  • More information about extending the agent


Group your devices and see their status

Managing a Rasperry Pi A+

Access a shell on a Raspbian device

Built-In file manager

Windows Desktop

Simple Admin Screen - Running smooth on 1GB RAM


Connect to the hardware KVM on a Intel vPro/AMT system


Access the device embedded Intel AMT control website


See hardware information

Download an agent

Friday, August 24, 2018

Windows 10 IoT Core - Initiating Recovery Via Recovery Partition

Windows 10 IoT Core images can be built to include a recovery partition.  This can be useful for restoring the device to a working state without having the user reimage the device (which can be especially difficult with a Dragonboard 410c or similar Qualcomm Snapdragon 410 based device).

Our clue for initiating it yourself is buried in the iot-adk-addonkit (or bcdedit if you are really bored):

bcdedit /set {bootmgr} bootsequence {a5935ff2-32ba-4617-bf36-5ac314b3f9bf}
shutdown /r /t 0
You can initiate this by using the Windows.System.ProcessLauncher API.

I've also initiated the process by interrupting power to the device three times in a row during startup.  In a perfect world, you would use a companion app or hardware button to initiate a restore as well.

Thursday, August 23, 2018

Windows Storage Spaces - Setting Up a Mirrored SSD Tier with RAID5 HDD Tier

Storage Spaces is a great improvement over the baseline software RAID functionality built into Windows.  The ability to have a SSD cache tier as well as full management via PowerShell only sweeten the deal.

I use it on my lab VM host which mostly does compiling of OS images and shuttling files back and forth to work.  My existing setup was a mirrored 1TB SSD cache tier with 6 x 3TB HDD tier.  I wanted to try keeping the SSD tier mirrored, but move the HDD tier to RAID5.

Long story short, the performance is pretty terrible for what I do, but I wanted to write a blog post for anyone looking to do this for their own purposes.  I suspect a larger SSD cache might make a difference, but I'm also certain the performance characteristics are good enough for a fancy Plex server or other less write intensive application.

Here's the PowerShell to set it up (change the size values for your array.  You might have to guess a bit):

Get-StorageTier | Remove-StorageTier #Delete existing tiers if you have tried this 23939 times.
New-StorageTier -StoragePoolFriendlyName StoragePool -FriendlyName SSD_Tier -MediaType SSD -ResiliencySettingName Mirror
New-StorageTier -StoragePoolFriendlyName StoragePool -FriendlyName HDD_Tier -MediaType HDD -ResiliencySettingName Parity
$ssd_tier = Get-StorageTier -FriendlyName SSD_Tier
$hdd_tier = Get-StorageTier -FriendlyName HDD_Tier
New-VirtualDisk -StoragePoolFriendlyName StoragePool -FriendlyName "VirtualDisk" -StorageTiers @($ssd_tier,$hdd_tier) -StorageTierSizes 400GB, 13000GB -WriteCacheSize 50GB

Monday, August 20, 2018

Chome Device Management


I always lose this link to what each setting in the Google Admin Console does:

https://support.google.com/chrome/a/answer/1375678?hl=en
https://support.google.com/chrome/a/answer/2657289?hl=en

I also clearly don't know how to use bookmarks.

Tuesday, June 12, 2018

Diving In - Windows 10 IoT Core for Digital Signage - Part 2, Do


Diving In - Windows 10 IoT Core for Digital Signage - Part 2, Do


In Part 1, we looked at why you might use Windows 10 IoT Core and started exploring the platform.

There are plenty of awesome things you could build with an Windows 10 IoT Core device.  If this is a hobby, a solution to to internal/personal problem or a point solution at work, you probably don't need to create a commercial device.



However, if you want to bring your solution to market-

  1. Publish your app on the Windows Store. Export a package
  2. Find a device.  Commercial devices tend to be more expensive than a Raspberry Pi, but there are some advantages
    1. Warehousing, logistics, assembly and imaging
    2. Warranty and support
    3. Certifications and other material required for some environments/countries
    4. Roadmaps and supply chain predictability
    5. Some OEMs will even build images as part of a hardware partnership
  3. Build an image.  Ask yourself some questions:
    1. What's your risk appetite for updates?
    2. What does the out of box experience look like?
    3. Do you need remote management?
    4. Will the user be able to reimage or recover the OS on the device?
    5. How will settings management be performed?
  4. Making products is hard. There's always a million little details, so don't forget to draw the rest of the owl
Even if I didn't work for an OEM, I would recommend finding an OEM partner that could help shepherd this process and provide pre-existing pieces for as much as possible.  The overall point is for you to work on all the pieces that make your solution a unique entry into the market without the hardware/OS/configuration/logistics/cat herding getting in the way.





Diving In - Windows 10 IoT Core for Digital Signage - Part 1, Explore


Diving In - Windows 10 IoT Core for Digital Signage - Part 1, Explore


Exploring a new technology stack can be really hard when you are just getting started.  However, it isn't unusual to just need a push in the right direction to start.  Based on customer questions and some common themes I see in the community, I thought I'd write up a short guide for exploring Windows 10 IoT Core, a lightweight purpose built OS for applications that blend the line between traditional embedded and general purpose computing systems.



Why Windows 10 IoT Core?

I've written a lot about Windows 10 IoT Core, Now Micro IoT Player and even made a few videos if you want to get the 30 min version.

  • A streamlined, purpose built version of Windows for running UWP apps and easy to cloud enable
  • Secure by default and regularly patched
  • Available on supportable, commercial grade hardware

Prerequisites:

  1. A UWP app you want to run.  Start with a sample if you don't have a universal app.  Or Now Micro Player if you just want to run some HTML5 content.
  2. A device-  The Raspberry Pi doesn't have hardware accelerated video, but is a great exploratory device.  If you are building a commercial product, be sure to understand your case, certification, display resolution and cost requirements.
  3. Windows 10 IoT Core Dashboard - This makes finding your device's IP and some other tasks easier. The Windows 10 IoT Core Dashboard also will download and image SD cards for your Raspberry Pi.

Things to Explore

  1. Remote PowerShell - PowerShell is my favorite way to automate a job away and there are a ton of commands you can run on the system.
  2. Windows Device Portal - In place of a local GUI, use Windows Device Portal to manage the device.  The CPU and GPU performance graphs are the best way to figure out if you have enough hardware for the job.
  3. Windows 10 IoT Dashboard - If you have a bunch of devices, this is the easiest way to discover them.
  4. Azure IoT Central - A SaaS management solution for IoT that is a quick setup.





Thursday, May 31, 2018

Capturing a FFU from a Windows 10 IoT Core Device

I would not actually recommend configuring a Windows 10 IoT Core system and then capturing it (you should use the provided build system), but if you were trying to capture a demo or replicate a problem, there is a way to capture to a FFU as of Windows 10 1709 or later.

The basic version is to boot to WinPE and use DISM to capture to an attached USB stick or mapped network drive.

The addition of the "capture-ffu" switch is where the magic happens:

DISM.exe /capture-ffu /imagefile=R:\MyDemoImage.ffu /capturedrive=\\.\PhysicalDrive0