Whistle Binding Created

Hi all!

I’ve created a binding for the Whistle, http://www.whistle.com/. While I used the NTP binding as a starting point, its not particularly well written; https://github.com/johnjore/OpenHAB-Binding-Whistle/tree/master/org.openhab.binding.whistle. Feel free to help out.

I’m not fussed if this binding ever makes it into the official list of OH bindings as its appeals to a pretty small group of users, but I needed something a bit more family friendly than Nagios, which is my preferred monitoring system (battery status)

Using the rotini client, these are a few of the values available:

Create a binding or two using dummy Dog IDs and find the correct id by looking at the openhab.log file, it should show the ID’s your account has access to:

2016-06-06 19:16:10.560 [DEBUG] [.o.b.w.internal.WhistleBinding] - Looking for DogId: '999999'
2016-06-06 19:16:10.919 [INFO ] [.o.b.w.internal.WhistleBinding] - Found DogID: '122602' / 'Duke'
2016-06-06 19:16:10.919 [INFO ] [.o.b.w.internal.WhistleBinding] - Found DogID: 'nnnnnn' / 'Kala'

Items:

Number whistle_01	"Current goal [%d]"	 { whistle="999999:goals:current" }
Number whistle_02	"Longest goal [%d]"	 { whistle="999999:goals:longest" }
Number whistle_03	"Average activity level last 7 days [%d]"	{ whistle="999999:averageactive:7" }
Number whistle_04	"Average rest level last 7 days [%d]"	{ whistle="999999:averagerest:7" }
Number whistle_05	"Average activity level last 30 days [%d]"	{ whistle="999999:averageactive:30" }
Number whistle_06	"Average rest level last 30 days [%d]"		{ whistle="999999:averagerest:30" }
Number whistle_07	"activity:2 days ago [%d]"	{ whistle="999999:activity:2" }
Number whistle_08	"target:2 days ago [%d]"	{ whistle="999999:target:2" }
Number whistle_09	"activity:1 (yesterday) [%d]"	{ whistle="999999:activity:1" }
Number whistle_10	"activity:0 (today) [%d]"	{ whistle="999999:activity:0" }
Number whistle_11	"device:battery [%.1f %%]"	{ whistle="999999:device:battery" }

Config:

whistle:username=name@email.addr
whistle:password=YourPassword
whistle:refresh=1800000

Binding could probably have been created using rules and the HTTP binding, but it was good practice. The APIs used are in no way officially supported by Whistle and may stop working anytime. Google was my friend finding them.

JJ