Skip to main content

Posts

Voice control Sony Bravia Television through Alexa

This is my second useful thing done through Alexa after simple implementation of switching on/off light. This is not just applicable to Sony Bravia TVs but any device which can be controlled through HTTP/JSON request or via any other protocol.

Hardware prerequisites for making whole thing work are as follows:
1. Sony Bravia Android TV or other devices which can accept input through HTTP or different protocol.
2. Raspberry Pi to keep running program/service.
3. Alexa device.

Software prerequisites:
1. Alexa Skill: https://developer.amazon.com/edw/home.html#/skills
2. Lambda: https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions
3. AWS IoT: https://console.aws.amazon.com/iot/home?region=us-east-1

How the whole process would work? Alexa would accept voice commands and converts it to intend to make a request to Lambda function. Lambda function would use converted user-friendly commands to MQTT request on AWS IoT service which would be listened through MQTT client running…
Recent posts

Centralized model validation both for MVC/WebApi and SPA client-side validation using FluentValidation

Validation is one of the crucial parts of any application. It has to validate on both client side and server side requests.
What are target features or implementation from this article?Model validation for any given model.Centralized/One code for validation on both server-side and client-side.Automatic validation of model without writing any extra codes on/under actions for validation. NO EXTRA/ANY codes on client-side to validate any form.Compatible with SPA.Can be compatible with any client-side validation framework/library. Like Angular Reactive form validation or any jquery validation libraries. Tools used in the implementation?FluentValidation: I feel DataAnnotation validation are excellent and simple to use, but in case of complex validation or writing any custom validations are always tricker and need to write a lot of codes to achieve whereas FluentValidations are simple even in case of complex validation. Generally, we need to validate incoming input against database values,…

Custom SPA engine, similar to MVC pattern by using TypeScript

Single Page Application, a fundamental requirement for SPA is to develop the application with XMLHttpRequest (XHR) or AJAX. That is only main requirement, other things come as add-on stuff.
Advancements of SPA? In today's world, we do not want to be restricted with basic features or functionalities. We want everything like any new Phone comes in market with some new shiny feature. There are a lot of functionalities available with SPA libraries and could be extended with more extension to have richer and easier implementation. To be specific we shall refer it as frameworks, not libraries.

Earlier days one-way, two-way data binding with templates were very minimum things to expect from frameworks. Now they talk about component structure, Virtual Dom, IOC, state management, performance etc.
Why building own framework/library? What I believe and experienced is each SPA JS Frameworks has its own set of rules and structure that has to be followed. If we want to have our own dynamic thi…