Skip to content

mguinness/IntelliCenterGateway

Repository files navigation

IntelliCenter Gateway

Gateway to Pentair IntelliCenter Control System.

Introduction

A website developed using ASP.NET Core that connects directly to an IntelliCenter to issue commands and subscribe to updates.

The website uses a hosted service to connect to the IntelliCenter on the Telnet protocol and send realtime data into a stream connected to SignalR.

This can then be used by any client using Javascript in the browser to issue commands and process responses received back from the IntelliCenter.

Ideally the website should be running continously and a good option for this is to use a Raspberry Pi that is a low power device and has WiFi connectivity.

Setup

Change the appsettings.json file to include the IP address of the IntelliCenter on your local network.

"Configuration": {
    "TelnetHost": "192.168.1.10"
}

Website authentication has been included to allow secure remote access. A section called Users contains usernames and passwords which will be validated during sign in. It is essential that you change the default password (the second string) to prevent unauthorized access.

"Users": {
    "user": "pa55word"
}

For third party applications bearer tokens are available and configured with Token section. It is recommended that you change the default signing key (must be 16 or more characters) that is used for encryption.

"Token": {
    "Issuer": "localhost",
    "Audience": "localhost",
    "ValidFor": 3600,
    "SigningKey": "Supercalifragilisticexpialidocious"
}

Docker

Please refer to the wiki for full instructions on running this application under Docker, including behind a reverse proxy with SSL and DDNS support.

Mobile App

A mobile application has been developed with Xamarin at IntelliCenter Control repo and communicates with the IntelliCenter via Gateway. It is available on Google Play for Android phones.

Operation

Once the website is running the home page should be shown after signing in. Javascript on the page should connect to SignalR on the server and send a command to request the hardware definition of your IntelliCenter.

The resulting message is processed and a filtered set of objects are displayed on the page. For circuits they can then be turned on/off and for probes you can subscribe to temperature updates.

Screenshot

A posting at Trouble Free Pool details other example commands. You can also discover commands by going to the https://intellicenter.com/ website and inspecting the messages that are shown in the debugging console, example below.

Screenshot

Automation Endpoint

An endpoint accepting HTTP POST requests provides the ability to both get and set object values allowing for external automation. An example below shows the endpoint being used to get the water temperature from the IntelliCenter.

curl --user user:pa55word --data "object=SSW11&param=PROBE" http://192.168.1.11:5000/shortcuts

The endpoint is password protected using basic authentication scheme described in curl documentation. The form fields accepted are Object, Param & Value and a JSON result contains the specified object parameter value.

A post IntelliCenter Gateway and Control Apps at Trouble Free Pool contains more detailed instructions and also a couple of Siri Shortcuts samples for which the endpoint was developed.

Wireless Remote

Using a wireless remote with a superhet receiver connected to a Raspberry Pi it's possible to control circuits on the IntelliCenter via the endpoint described earlier. See wiki for further details.

Remote

Playground

A test webpage using jQuery and jsTree to display all the objects returned from the IntelliCenter. This demonstrates issuing commands like getting object state, subscribing to parameters and turning circuits on and off. Using this as a reference point it makes it possible to create a customized dashboard with any Javascript framework.

Screenshot

Credits

A simple task-based event-driven Telnet client https://github.com/Spksh/TentacleSoftware.Telnet/

A SignalR ASP.NET Core server broadcast example https://github.com/JakeDixon/server-broadcast-signalr-dotnetcore/

ASP.NET Core 3.1 Razor Pages cookie sample https://github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/security/authentication/cookie/samples/3.x/CookieSample

ASP.NET Core 2.2 JWT bearer sample https://github.com/blowdart/CookieJwtBearerSample/tree/master/CookieJwtBearer

THIS SOFTWARE IS PROVIDED AS IS, NO WARRANTY, NO LIABILITY. NEITHER AUTHOR NOR ANYONE ELSE ARE RESPONSIBLE FOR ANY DAMAGE THAT COULD BE CAUSED BY THIS SOFTWARE. USE AT YOUR OWN RISK.