Quantcast
Channel: dingleberry.me » dingleberry.me – technical blog shit
Viewing all articles
Browse latest Browse all 14

How a nerd monitors his wife’s weight

$
0
0

So I got myself a new bodyscale recently. Ofcourse it had to be something of a gadget so I went for this Withings BodyScale. Withings allready has a nice webpage with graphs and stuff and also a couple of really nice iphone/ipad apps for it. The fact that it is integrated with other services like Runkeeper and such, made me think about if they had an API i could query. And it had. Also a quick search for “python withings api” gave some results with examples on how to use it.

I came across this thing : https://github.com/mote/python-withings …and then it was pretty much just about writing a bit of nagios-logic around it to make it into a plugin.

The first result is here: https://github.com/mortis1337/check_wife

The script takes a userid, an apikey and a name as arguments.

$ ./check_wife.py  -u 1111111 -k xxxxxxxxxxxxx -n Your(or your wife’s;)name
WARNING: <yourname>’s overweight. Size: <yoursize> – Weight: <yourweight> BMI: <yourbmi>

The script will give a WARNING whenever the BMI-value is about 25 or below 18,5.

Add this to your nagios-config and your operators can come point and laugh at you whenever a WARNING occurs :)

( yes, the “wife”-part is a joke…. go monitor your own weight;) )


Viewing all articles
Browse latest Browse all 14

Trending Articles