[Domotica | Win IoT | .NET Core 2.1] MVC Web SignalR Hub

Ok, so I have a working application on my RPi to communicate with the z-stick.

The next step would be to replace the simple loop on/off test with an actual interface with some switches to turn adapter on and off. At first I had the idea to go for a simple web api. From there I would create a web interface to send command to the web api which would pass the command to the z-stick. The issue I was facing with this solution is that when there are multiple interfaces open (my wife’s phone, my phone and perhaps some general device hanging on the wall), I can only update the interface of the current user when a switches has been pressed, unless I would use a polling mechanism to the web api endpoint and continuously check the state of the adapter. I absolutely do not prefer this solution because of the possible load I might generate in the endpoint (and let’s be honest, checking every second for a state which only changes once in a while is sort of a DDos attack on your own environment).

While I was searching the internet for how to deal with this scenario, I came across a Youtube post of Hassan Rage. In this video he shows a really simple example of using SignalR for communication between his RPi and his switch. As SignalR provides a real time connection between the host and multiple devices and as of the solution works very well in the video, I decided to use this option as well.

Continue reading [Domotica | Win IoT | .NET Core 2.1] MVC Web SignalR Hub

[Domotica | Win IoT | .NET Core 2.1] UWP Host Controller with Z-Wave USB Interface

To make it possible to run an application on Windows IoT it needs to be an ARM application and therefore I need to create a new UWP application. While doing this I choose to support the Windows 10 Creators Update (Build 15063).

With the new project there are 2 things I need to implement:

  • Connect to the Z-Wave USB Interface
  • Connect to the SignalR host

This topic is describing the first step together with small testcase to make sure that the implementation of the Z-Wave USB Interface is done before I continue. In short: I just want to make sure it works and I want to have the easiest solution possible 🙂

Continue reading [Domotica | Win IoT | .NET Core 2.1] UWP Host Controller with Z-Wave USB Interface

[Domotica | Win IoT | .NET Core 2.1] The Architecture…

Now that I have set up the environment it is time to take a closer look on how I am going to build and connect my applications. The architecture will contain 3 different components: a Web UI, a Host Controller and a Web Host to connect the Web UI and Host Controller together.

Continue reading [Domotica | Win IoT | .NET Core 2.1] The Architecture…

[Domotica | Win IoT | .NET Core 2.1] Setting things up…

In about year I am planning to move to a new house. As the house is completely new, I though it would be an awesome idea to create a solution to control my lights (and more) via an automated system which I can build myself. My goal is to control the Lights via the Philips Hue API, using the motion detection via a Z-Wave motion sensor and control other light switches, integrated in the wall by using the Z-Wave protocol. All these controls will come together in a simple web interface.

At this moment of writing, I have very basic solution in place to test, which took me for about 6 months to stabilize. Let me guide you trough the path I walked the last months…

Continue reading [Domotica | Win IoT | .NET Core 2.1] Setting things up…