Looks like everybody is doing Twitter bots these days so I decided to try my hand on one as well. And it had to be something lighthearted – to let people’s mind off things for a while. Way back in early 2000s there was a funny parody comic of Star Trek called Sev Trek. Original site is gone now, but archive of images was saved at http://sevspace.com/stupidarchive/sevtrek.asp.htm. Images are numbered sequentially – ideal for automatic processing. My bot would tweet random images every couple hours.
Code hosted at Scriptr generates URL pointing to an image at sevspace.com
Code then call Maker service of IFTTT – custom service capable of accepting HTTP requests
Maker service triggers Twitter service and passes URL of image it got from Scriptr code
Microsoft’s SSRS is pretty advanced reporting system with multitude of advanced features. SSRS also has charting capabilities, but it’s somewhat lacking compared to more advanced desktop or web charting suites
What if there was a way to marry the two technologies together – to render cool FusionCharts in advanced SSRS repots? Continue reading →
Two faces actually – because you get both analog and digital face – and it’s up to you which one to use. You also get eight predefined color themes as well as ability to set each color individually. This face also provides weather and fitness tracking at your fingertips. And it just looks cool.
– Digital or Analog face type selection
– Multiple color themes as well as custom color settings (or you can leave it on auto and the color will depend on battery level)
– Weather (powered by Forecast.io), Step Counter, Distance Walked, Sleep Hours
– Bluetooth Connect/Disconnect alert of configurable intensity with visual clue
– Battery level represented by percentage number as well as visually by outer perimeter of dots (also by watchface color – if in auto color mode).
– Visual step goals
After installing watchface you have a 3-day trial period to explore all the features and different aspects. At the end of trial if you like Future Time and want to keep it – it’s just $1.50 USD via Kiezel Pay payment system, you will be prompted to enter code and follow few easy payment steps. Once purchased – the watchface is yours permanently, no matter what Pebble or what phone you use, as long as you keep the same Pebble account.
CobbleStyle is back! This time with THREE modes to display the time: analog, digital or BIG TIME! With complete customization on what information you want displayed. With pre-designed color sets and complete color customization. Make CobbleStyle 2 how you want it!
– Three Ways to display the time: Analog, digital, or BIG TIME!
– Multi-language support
– Anti-aliasing text and graphics.
– Date / Weather / Bluetooth connection.
– GPS Location.
– Week number.
– Local time.
– Alternative timezones.
– Seconds counter.
– Pre-designed color sets.
– Custom colors.
– Custom text.
– Backlight when charging option.
– Bluetooth alert options.
– THREE weather providers – choose most reliable for your location
– Master Key weather provider control via https://www.pmkey.xyz – store all your weather API keys in one convenient location
– Step Count
– Live step goal bar.
– Custom step goal.
– Distance Walked
– Time Active
– Calories burned at rest
– Calories burned while active
Only $0.99 USD
After installing CobbleStyle 2 you will have a three days trial period to explore all the features and different aspects. At the end of the trial if you like CobbleStyle 2 and want to keep it, it’s just $0.99 via KiezelPay payment system. You will be prompted to enter code and follow easy payment steps. Once purchased, the watchface is yours permanently, no matter what Pebble or phone you use, as long as you keep the same Pebble account.
Many apps and watchfaces for Pebble smartwatch provide weather information and many of them require you to have your own key, unique for each weather provider. Here’s how to obtain API keys for 3 major most popular weather providers:
For Forecast.io register at https://developer.forecast.io/ – and at the very bottom of the page there will be long string of letters an numbers – that’s the key.
It is *highly* recommended once you get your keys – save them at https://www.pmkey.xyz service. Then all you have to remember to get them is simple 5-digit pin and more and more watchfaces (CobbleStyle 2 being one of them) use this service for easy key retrieval.
Limitless LED offers full color RGBW light bulbs that you can control over Wi-Fi/4G from your computer, phone or smartwatch. They’re an inexpensive alternative to Philips Hue and they look really cool.
But I, being lazy ass that I am, was wondering if you can control the lights from Amazon Echo by voice commands alone. Out of the box Echo and Limitless LED don’t recognize each other. Amazon can see and control Hue, but not Limitless LED. Fortunately geniuses of BWS Systems came up with a really cool piece of software – home automation bridge “HA-Bridge”. It’s free and written in Java so it can run pretty much in any environment under any OS. What it does – it emulates Philips Hue API so other devices on your network – like Echo – can see and interact with it. Continue reading →
While working on my Pebble watchface “Future Time” I have encountered persistent annoying problem – watchface would run for a while and then crash – and not only crash, but actually restart the watch. What made this even more frustrating – after 3 restarts in a row Pebble would revert to recovery mode and complete firmware reinstall was required (did I accidentally write a Pebble virus?).
When I dug into device logs I found out that every restart was given reason: “Dangerous Stack Overflow”. Which is kinda strange – I don’t have any recursions nor deeply nested function calls nor large local variables. I tried lots of things – including extreme ones like declaring all local function variables as global or static – nothing helped.
Finally Christian form Pebble developers forum shed a light. He pointed out that I use a lot of GRect constructs which is basic rectangle building block for pretty much anything from defining layers to graphics functions. I used GRect inline directly inside function calls, which I thought wasn’t a big deal, after all “everybody does that” – including Pebble in its examples. Well, as Christian pointed out those GRects are kind of local variables, and either memory is not reclaimed fast enough when they go out of scope or they spring memory leak.
Keeping this in mind I created a global GRect variable and when needed to use a GRect in local function, first I’d assign it’s value to the variable and then use variable in the function.
So something like this:
I’ve recently updated code for Cobblestyle Pebble Watchface to take advantage of very cool geocoding service called Nominatim by Open Street Maps.
Nominatim is used in two places: Direct lookup is used in watchface’s config page to lookup coordinates of a place by its name for custom location setting; reverse lookup is used to lookup location name by its coordinates to display name on actual watchface.
It was working fine – on Pebble watches connected to Android phones. It was failing miserably on iOS, so iPhone Pebble users were getting neither location nor weather updates. And it was pretty puzzling for a while until I obtained logs from running watchface thanks to invaluable help from Robin.
Turned out iPhone Pebble app was plain simple blocked by Nominatim service, every attempt to retrieve location resulted in message being sent back “You have violated acceptable policy”. Which was kinda surprising since I just started using the service. When I contacted Nominatim support, they told me that apparently some Pebble app running from iPhone abused the service pretty badly, running hundreds of requests per second. And since the only way they can detect requesting app is by it’s User Agent string – all apps spotting iPhone Pebble UA were blocked.
Support suggested to set UA string specific to the app so it could be easily identifiable. Standard approach to set headers on xmlHttpRequest object is .setRequestHeader(..). Unfortunately by many browsers and clients it is considered unsafe to spoof UA via request headers. Fortunately iOS allows that, so all I have to do is catch and ignore errors in other clients. Basically this line of code solved the issue: