Skip to main content

Smart Bulb to track deployment!

Ok - so you have bought the smart bulb and have got bored of changing its colors from the app.
You may have also used Google Home/Assistant or Alexa and said 'Ok Google! Make the Living Room Pink' - boom the color changes to Pink! Interesting to play with for another couple of days but what next?

You may schedule it with the day cycle or with weather to change color and intensity of brightness but I thought why not use it to track the CRM deployment status and outcome? I already have mail notifications enabled in the custom deployment script which sends alerts when the deployment starts, succeeds or fails.

So my target was to implement the highlighted:

What I had:
  • The smart bulb - bought at Amazon on discounted price
  • The native app of bulb - Apart from the ability of changing colors, etc. and scheduling it didn't provide much so I use io.e(get the app) service to integrate it with ifttt
  • ifttt account - you must register and explore this if you haven't. ifttt stands for 'if this then that'
  • Microsoft Flow - A new service my Microsoft which could help me define multiple conditions, checks which ifttt doesn't has.
Since everyone is talking about IOT and Microsoft Flow, so before starting on this work, I did a quick search and got an implementation almost suiting to my need:


Various possible Solutions:
A) Deployment Script -> call ifttt webhook -> control bulb 
This would need writing/updating code in the deployment script to make POST request to the ifttt webhook. This makes sense but is there a possibility to make the mail notification control bulb color without writing any code?

B) Deployment Script -> Mail notification -> ifttt mail applet -> control bulb
This is possible but needs the mail notifications to be very specific which would need code changes in deployment script which triggers the notification. Also I need to authorize ifttt to use my mail box - not very comfortable with it.

C) Deployment Script -> Mail notification -> Microsoft Flow -> ifttt WebHook -> control bulb
This looks like too many steps but I can avoid more coding.

So lets start.

First sort out the ifff setup.
I have configured my bulb with io.e. Using this app I can control the color of my bulb and more
I have added my io.e account in ifttt - its simple once you open the ifttt app and search for io.e and add your account. 
Now I can trigger my bulb in ifttt using various available triggers (like weather, etc.). Lets configure the webhook trigger:
Open the Url in browser to find how to use the webhook:

I created multiple applets for each color control. There should be a better way to do this with just one applet but that optimization is for later

The applets are really simple:

We can test the webhook using any online service - the color of bulb changes (not sure why the site give me an error message - but it works fine):


The color of bulb changes fine:

Create a new Microsoft Flow to trigger on deployment:


I added very basic conditions since I am new to MS Flow - there would be better way to put it rather than multiple conditions:

Everything is based on email subject here so please ensure that you the required details in subject. The trigger is also simple:

Now I run my deployment which is basically a script to trigger solution imports. The script sends a mail to me when the deployment starts, completes or fails with specific keywords in subject.

Using those keywords, the webhook is invoked with various event names:


And the deployment completed successfully:


This is just a fun project and there are lot of additional things to be taken care of for a robust solution.
Next Steps -> Control brightness of bulb/lighter or darker shades to show the deployment progress, but I definitely need to remove the mail message as trigger in that case. :) 

Comments

Srikanth said…
That's a cool one, Arvind
Harrah's Resort Southern California - MapYRO
View the 영천 출장마사지 Harrah's Resort 강릉 출장샵 Southern California real-time 상주 출장안마 driving 여주 출장샵 directions to Harrah's Resort Southern California, 사천 출장안마 777 Casino Drive, Funner.
Anonymous said…
Casino Kings | A - Jordan 16 Retro
Casino Kings air jordan 18 retro varsity red to good site is a how to buy air jordan 18 retro red room at Jordan's 16-bit Casino and Resort, offering great 승인 전화 없는 토토 꽁 머니 amenities and where to get air jordan 18 retro men blue great gaming, with best air jordan 18 retro yellow the latest in entertainment.

Popular posts from this blog

Your Trial Period has Expired!

" Your Trial Period has Expired!" This is a depressing message especially when you still haven't achieved what you wanted to do in the trial setup. Most of the software today provide a fixed trial period. You my try it during the duration and then purchase it to continue beyond the trial period. But what happens when you need to extend the trial? Well some do provide a small extension but you need to provide your credit card details which means there is a risk of billing if you forget to turn off the trial before the billing cycle starts. You may be surprised to know that In most of the cases, you can just request and the people managing it may simply accept your request - just for free without needing any payment details. I have had multiple experience with Microsoft product Dynamics365. They first provide a 30 days trial and then an extension if you provide your credit card info. But you may just try contacting the customer care and request them to extend without any cr...

Extending Extended Volume in Windows 7

Recently I was stuck with a peculiar scenario while trying to extend a logical volume. The disk management utility in windows 7 has a nice built-in feature for this. Well but when I right-click on the volume the "Extend Volume ..." option was greyed out. Hmm ...... this was because the volume I was trying to extend was the last volume in the Extended partition and the free space was lying to the right side but outside of the Extended Volume. I was searching for some info regarding this but I found nothing. Then I thought to give DISKPART a try. For those who don't know, DISKPART is the console based utility for disk management. And I must tell you that it is still more capable than its GUI based counterpart. Well in few minutes my disk was looking like this (please don't compare the size written I know it has not increased in the screenshot because I have created these images in mspaint as I am writing this blog after my problem was solved and I don't have probl...