Fitbit Flex, dead and won’t charge?

imageMy wife and I both pre-ordered a Fitbit Flex. While it’s not a life-changing device, it’s been generally fun to wear. I’m always interested in the sleep tracking when I travel … “Awake 16x, slept 5 hours.

Last night though, my wife’s Flex had stopped working. The lights wouldn’t show up when the device was tapped and when she used the charger, it wouldn’t begin to charge. I found a few recommendations to use rubber bands to hold the Flex into the charger, cleaning the contacts, and a few more. Cleaning the contacts didn’t help. The charger worked with my Flex, so that meant the rubber band trick wouldn’t help.

I found though on the Fitbit support website this morning though a suggestion that worked! Apparently, you can restart/reset the tracker without loosing data. The steps are easy:

  1. Plug your charging cable into a USB port and insert your Flex as you normally would.
  2. Insert a paperclip into the small pinhole on the back of the charger (I’d never noticed it before, it’s small!)
  3. Press gently on the pinhole for 3-4 seconds. You’ll feel a gentle ‘click’ when you’ve depressed it far enough (although my “one-thousand, two-thousand, three-thousand” count actually got to 6). The lights flashed a few times, and it started charging a few seconds later.

I’m posting this here as my searching the night before hadn’t turned up that specific support web site page. It may be because the web page is poorly titled and applies to four of their trackers.

Hope this helps someone else.

PRTG Network Monitor, Part 2

Since my last post on the PRTG monitor, I’ve added some more probes (thanks to their offer of a free upgrade to 30 sensors).

However, before I got started, the monitor showed that the system health had an alert:

image

I clicked on the red alert box, and the detail page is displayed:

image

The server that hosts the PRTG Network monitor is intentionally underpowered as to consume as little electricity as possible (it’s a HP ProLiant Micro Tower Server as seen here on Amazon. It’s 64 bit, had has 4 non-hot swappable drive bays. It runs 64 Bit Windows 8 very nicely.) Because it’s underpowered, it often can be utilized heavily by the various routine processes that are always running on it. I logged in to the server (remote desktop), and the new Task Manager app made it clear what was happening:

image

I’d started a “maintenance” cycle earlier which apparently included a disk defrag.

Back to the sensors – I‘ve got quite a few network connected devices in the house (see details here). So, there are a number of things that can be monitored, etc. One thing in particular is (ironically?), a network monitor , from Synaccess Networks (the NP-02, which can detect the status of our internet connection and automatically toggle the power to the DSL modem if no internet connection is detected).

So, initially, the list of Devices automatically found included the NP-02. I wanted to add a probe, so, next to the name of the device, you can click Add Sensor.

image

Note that originally, it was just listed by IP Address, but the name is editable:

image

I clicked Add Sensor:

image

There are many things that can be monitored. Each click of a filter at the top reduces the options at the bottom.

image

I selected Ping:

image

You can then edit more sensor appropriate settings (and override defaults):

image

Then to the summary screen for the device:

image

Not much to show right away of course.

Awesomely, it automatically discovered a network connected printer, and selected several probes (I deleted all but one):

image

It’s a very cool system that works well for my home needs. While I can’t speak to the viability of this in a commercial setting, it’s certainly capable and well worth looking at for home or business.

PRTG Network Monitor for Windows

mysql monitoringMy current router/firewall/VPN device has an unfortunately mediocre live monitor for bandwidth statistics, but supports SMNP. So after a reasonably painful search for decent free options (oh boy are there some awful ones!), I installed the freeware version of the Paessler PRTG monitor so that I could easily see the network statistics for our internet connection and a few other neat things that it can track out of the box. I installed it on a shared, always-on Windows 8 Pro PC that does a ton of other things for our house like security camera monitoring, file shares, etc. It installed easily and was up and running quickly. While the paid version is far outside of my budget for this type of thing (budget=$0), the freeware version had just the right features for me.

It’s got tons of things it can monitor, but with the freeware limit of 10 devices, I’ve got it monitoring traffic, disk and a few other things:

image

I’ve got the default page set to just show the internet bandwidth (in/out):

image

The software automatically scanned my network and found way more things to monitor originally than I had expected.

It’s a reasonably sophisticated Ajax web application that works well on modern browsers. My only complaint about the experience is that it requires me to login frequently, yet has a button that makes it basically not be important (a button that if the login is the default, just automatically logs me in). I’d really like it to instead jump straight to the dashboard to show the statistics (maybe in a read-only mode).

image

(And right now, if you blog about the software, they’ll upgrade your license to 30 keys, so I’m doing that right now).

RewriteCond for web based RSS readers

Now that Google Reader is gone, there are more than a handful of replacements popping up. In order to allow images to show in the web-based RSS readers, I needed to edit the .htaccess file for my web site to allow the images to show, as the default for my web site is to prevent hotlinking from most websites (other than wiredprairie.us).

I’ve tried to gather those that seemed popular, so I’m putting the list I’ve got here so that it might help others (and maybe some of you will have other suggestions):

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wiredprairie.us [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://www.google.com/reader/m/view/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://cloud.feedly.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feedly.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?pinterest.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bloglines.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feedly.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?netvibes.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feedspot.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?digg.com/reader/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://reader.aol.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)newsblur.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)theoldreader.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)hivereader.com/.*$ [NC] RewriteRule \.(jpe?g?|gif|png|bmp|tiff?|pic|mp3|doc|xls|ico)$ - [F,NC,L]

Using Windows CSCRIPT to compile a Handlebar.js template

I was looking for an alternative to using Node.JS for a JavaScript build process today on a Windows machine. I wanted something that relied as much on natively installed elements of a modern Windows PC as possible so that the build process would be portable.

So, I broke out my rusty Windows Script Host skills.

First, I created a file called, compile.wsf with the following contents:

image

When using cscript.exe, you can execute a more complex combination of scripts and include other script files by using a Windows Script File. The content of the file is an XML definition of jobs. A job represents a unit of work. If you only have one job in a file, the name won’t matter as the script engine will select it by default. If you do have more than one job you’d like to store in a single WSF file, you can use the /Job:{id} parameter of cscript.exe to run a single job.

Using the WSF file, you can include other script files using a script element (much like the script tag in HTML). In the example above, I’ve referenced a local copy of handlebars.js and a custom script called compile.js.

You can also inline script as shown above. After doing a basic check on the number of arguments provided to the script, compile is called, which is from the compile.js script reference.

Compile.js is simple:

image

Using an instance of the FileSystemObject, first the input file is verified to exist. Next, both the input and output files are opened. The Handlebars object is available globally by including it in the WSF definition and is used to precompile the contents of the input file’s template definition. Once compiled, it’s written to the output file and both files are closed.

I threw the three files in a folder called lib, and created a simple batch file called handlebars.bat which called the cscript executable with the Windows Script File shown above as the first parameter and then the values of the other parameters passed along:

image

While this solution only works on Windows, it doesn’t hurt to keep the Windows Script Host in mind when throwing together general repeatable tasks that you:

  • consider too complex for a batch file
  • consider too simple for a full .NET application
  • require usage of existing JavaScript libraries, like Handlebars.js for some work