MyChild6 Install & Configuration

Install

Install

Deployment Without Docker

Required Software:

Required Services:

Optional Software/Services:

This guide assumes you are working with a new install of windows server and the client has not provided any of the services needed by MyChild6

File Install

Start by installing the following software in the order they are listed below

  1. Chocolatey  - Install Guide
  2. Microsoft SQL Server - Install Guide
  3. SQL Management studio - Install Guide
  4. RabbitMQ - Install Guide
  5. .NET 6 Runtime (download here)

Once all of the software dependencies are deployed, you can then start deploying the MyChild6 software.

1. Download the deployment zip file to the server (This can be downloaded from Gitlab currently)
2. Unzip the deployment zip file to c:\temp
3. Create the main program directory C:\Program Files\McRoberts Technologies\MyChild6_Web
4. Create the main directory for the McLink Agent (If required) C:\Program Files\McRoberts Technologies\MyChild6_McLinkAgent
5. Copy all files from the unzipped deployment file to the folder created in step 3

At this point the MyChild6 software is now deployed.

The next step is to install the MyChild6 Services. Follow the steps below.

Service Install

    Inside the main service folder (IE: C:\path\to\MyChild6_Web\helper_scripts\installers for MyChild6) there should be a file named "install-service.ps1" this is a PowerShell script that should install the MyChild6 Web Service, to run it you will need to move the file to the same folder as the MSTWatch.Web.exe file (IE: the folder created in Step 3 above), once completed you can then double click on the file using windows explorer, or you can run the script from an Elevated PowerShell (IE: Run as Administrator).

    Now you have successfully deployed the MyChild6 software to your server.

    The next step is to configure and start the services. Please visit the Configuration guide for more information

    Install

    Deployment using Docker Desktop / Docker CLI

    Install

    Microsoft SQL Server Deployment Guide

    Finding the Installer

    To begin this installation please navigate to the File Explorer on the server in question by either selecting the File Explorer icon on the Task Bar as shown below:

    InstallingSQLforMST6-2.png

    Or by right clicking the Start Menu (Windows icon) on the task bar as shown below:

    InstallingSQLforMST6-1.png

    You will then need to navigate to This PC (Found in the Quick Access Menu on the left in the File Explorer) > Local Disk (C:) >temp

    Or C:\temp.

    InstallingSQLforMST6-3.png

    You will then select the SQL2019-SSEI-Expr application and double click it.

     

    Selecting the Installation Type

    Please select the Basic installation option.

    InstallingSQLforMST6-4.5.png

     

    Accepting the Server License Terms

    Accept the Microsoft SQL Server License Terms by selecting Accept at the bottom.

    InstallingSQLforMST6-5.5.png

    Selecting the Installation Location

    Unless otherwise instructed by your supervisor allow the default installation location to be used and select Install.

    InstallingSQLforMST6-6.5 (3).png

    The Installation

    The installer will then download the files needed for installation.

    InstallingSQLforMST6-7.5.png

    After downloading the installation files the installation will begin. 

    NOTE: This could take several minutes.

    InstallingSQLforMST6-8.5.png

     

    Finishing the Installation

    Once the installation is complete Close the installer.

    InstallingSQLforMST6-10.5.png

    Install

    Microsoft SQL Management Studio Deployment Guide

    Finding the Installer

    To begin this installation please navigate to the File Explorer on the server in question by either selecting the File Explorer icon on the Task Bar as shown below:

    InstallingSQLforMST6-2.png

    Or by right clicking the Start Menu (Windows icon) on the task bar as shown below:

    InstallingSQLforMST6-1.png

    You will then need to navigate to This PC (Found in the Quick Access Menu on the left in the File Explorer) > Local Disk (C:) >temp

    Or C:\temp.

    InstallingSQLforMST6-11.5.png

    You will then need to select the SMSS-Setup-ENU application and double click it.

    Selecting the Installation Location

    Unless other wise instructed by your supervisor, install in the default location. 

    InstallingSQLforMST6-12.5.png

    Once the intended installation location has been selected select Install.

     

    The Installation

    InstallingSQLforMST6-13.5.png

    The installation has two phases, loading the packages and installing the packages.

    InstallingSQLforMST6-14.5.png

    NOTE: This may take a few minutes.

    Finishing the Installation

    Once the installation is finished, you will need to restart the server which can be done through the installer.

    InstallingSQLforMST6-15.5.png

     

    Locating the Microsoft SQL Server Management Studio

    After restarting the server you can open the Microsoft SQL Server Management Studio by clicking on the start menu and navigating to the M section and selecting it. 

    InstallingSQLforMST6-16.png

     

     

    Install

    RabbitMQ Deployment Guide

    There are several ways to deploy RabbitMQ, in this guide we will focus on the Choclatey method, as it is the most reliable and fastest.

    Install using Choclatey

    After installing chocolatey, Open a powershell prompt and type the following command

    choco install rabbitmq

    This command will fully install RabbitMQ and all required software, once the script is complete you can continue to the RabbitMQ Configuration guide.

     

    Install

    Deploying the Relay Controller without Docker

    In this guide we will install the McTech RTLS Relay Controller software as a Windows service, not using Docker or Docker compose.

    Required Software:

    Downloading Deployment Package

    When you are ready to begin deploying the Relay Controller software, you should being by downloading the Release Software from the ftp server, it should be with the MyChild6 releases and should be named something like `McTech.RelayController.<Version>.zip`

    File Deployment:

    For purposes of this guide, we will assume you have downloaded the .zip file from the last step in c:\temp on the target system.

    Follow these steps

    Once completed, you have now successfully installed the McTech Relay Controller software, next we want to create a windows service to automatically start the software when the computer boots, to do this, run the install-service.ps1 file that should be in the same folder as the files copied from the zip folder.

    Now that the Relay Controller has been installed & a windows service created, follow the steps in the Configuration Guide to get it all setup and running.

    Configuration

    Configuration

    Microsoft SQL Server Configuration

    Now that you have successfully installed Microsoft SQL Server, we will need to enable SQL logins and create a user account for the MyChild6 software to use. 

    Enable SQL Logins

    Follow these steps to enable SQL Logins

    1. Launch the SQL Management studio InstallingSQLforMST6-16.png
    2. Connect to the SQL Server instance (typically localhost\sqlexpress if using SQL express)  InstallingSQLforMST6-18.5.png
    3. Once connected, locate the "Object Explorer" pane (on the left)   
    4. Right click on the SQL Server (Should be the top level object, with the same name as the server)
    5. Click Properties on the popup menu                                                        InstallingSQLforMST6-19.png
    6. When the "Server Properties" window opens, locate the "Select a page" section (upper left corner)   
    7. Select "Security" from the "Select a page" section                                                                                                                              InstallingSQLforMST6-20.png
    8. Ensure the radio button next to "SQL Server and Windows Authentication mode" is selected 
    9. Click OK                                                                                                                                                                                              InstallingSQLforMST6-21.5.png

    Next you will need to restart the SQL Server for the changes to take effect, to restart the SQL Server, follow these steps

    1. Locate the "Object Explorer" pane (on the left)
    2. Right click on the SQL Server (Should be the top level object, with the same name as the server)      InstallingSQLforMST6-22.png
    3. Click "Restart"
    4. Click "Yes" on the confirmation popup InstallingSQLforMST6-23.5.png

    You have now successfully enabled SQL Server logins. Next we will Add a new user account.

    Create a new SQL User account

    We need to create an SQL user account that the MyChild6 software can use to communicate with the database server, we will be using the SQL Management studio, Follow these steps

    1. Login to the SQL Server 
    2. Using the Object Explorer, Expand the "Security" folder.                                                 InstallingSQLforMST6-25.png
    3. Right click on the folder labeled "Logins"                                                                                                                                  InstallingSQLforMST6-26.png
    4. Click "New Login" from the popup menu

    Once the "Login - New" window opens, follow these steps to create the user account

    1. Enter a name for the user (We recommend mychild)    InstallingSQLforMST6-27.5.png
    2. Select the radio button next to "SQL Server authentication"       
    3. Enter a password and Confirm password for this account (Note: please avoid using $ and , as special characters!)
    4. Uncheck the boxes for "Enforce password policy" which should disable the next 2 checkboxes as well  InstallingSQLforMST6-28.png
    5. Locate the "Select a page" section in the upper left corner and select the "Server Roles" page                                                  InstallingSQLforMST6-29.png
    6. On the "Server Roles" page, check the box next to "dbcreator"    InstallingSQLforMST6-30.5.png
    7. Click "OK"

    You have now successfully created a user account on your SQL Server.

    Please proceed to the Minio Configuration Guide for next steps.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Configuration

    RabbitMQ Configuration Guide

    Now that RabbitMQ is configured and running, we will need to perform the following tasks

    Update Configuration

    The default RabbitMQ configuration will work if you are doing development and/or testing. For production usage, it is highly recommended to update the configuration as we outline here. Follow these steps

    1. Open File explorer
    2. Click in the Address bar at the top of the File Explorer and type %APPDATA% and press Enter
    3. Locate the "RabbitMQ" directory and double click on it

    Now that we are inside the RabbitMQ configuration folder, we should see that there is no rabbitmq.conf file, we need to create one. Follow these steps to create the file

    Once notepad is open, we need to set a couple configuration settings, you can copy/paste these settings directly into the notepad window.

    loopback_users.guest = false
    listeners.tcp.default = 5672
    default_pass = CHANGEME
    default_user = admin
    hipe_compile = false
    management.listener.port = 15672
    management.listener.ssl = false

    Be sure to change the default_pass to a secure password!

    Next look for a file named "enabled_plugins", it should be in the same folder as the rabbitmq.conf file. If the does not exist, we will need to create it. Open a new notepad file and add following

    [rabbitmq_management,rabbitmq_mqtt].

    Make sure to include both brackets [ ] as well as the Period .

    The last step in updating the configuration is to restart the RabbitMQ service. Follow these steps

    1. Goto Start and click "Windows Administrative Tools"
    2. In the "Administrative Tools" window, locate "Services" and double click on it
    3. In the "Services" window, locate the "RabbitMQ" service in the list
    4. Once located, Right click on the service and click "Restart"

    It can take up to 5 minutes before the server is available after the first startup!

    Congratulations, RabbitMQ is now configured!

    Note: Sometimes the RabbitMQ Service will auto-start after installation before the rabbitmq.conf file can be created, when this happens the default username & default password are never set. To correct this issue, stop the RabbitMQ service and delete the "db" folder located in the RabbitMQ Data folder (IE: %APPDATA%\RabbitMQ\db), then restart the service, the default user & password should now work.

    Create a vhost

    Next we need to create  Virtual Host for the MyChild6 software to use. To do this we will be using the RabbitMQ Management Ui, this is typically located at HTTP://localhost:15672 Follow these steps

    This assumes that RabbitMQ is installed on the same computer you are working on.

    If McTech Wireless Receivers have been pre-programmed to communicate with the McLinkAgent, you MUST ensure that the same vHost is used on both the Wireless Receiver AND the MyChild6 Web server, typically in this sceneiro we would use the default / vHost and create a dedicated user with a password of 30 characters or less.

    1. Open a web browser (Microsoft Edge or Google Chrome are recommended)
    2. Browse to the Management Ui (HTTP://localhost:15672)
    3. Enter your username & password we configured in the last step and login

    Once you are logged in, you should see an Overview page with a couple of graphs and a ton of information. We need to go to the Administration section. Follow these steps

    1. At the top of the page, locate the tab named "Admin" and click on it
    2. On the right side of the page, locate "Virtual Hosts" (it's bold!) and click on it

    If all went well, you should be viewing the "Virtual Hosts" page. Near the center of the screen shoutl be a list of hosts, there should only be one listed with the "Name" of "/" and the "Add a new virtual host" dropdown should be expanded. Follow these steps

    1. Enter a name for your virtual host ( We recommend MyChild6 )
    2. Enter a description (Optional)
    3. Enter tags (Optional)
    4. Click the "Add virtual host" button

    After clicking save, the list should be updated and your new virtual host should be listed with a state of "running". 

    Congratulations, You have successfully created a vhost (Virtual Host).

    Create User Account

    Next we need to create a User account for the MyChild6 software to use. Follow these steps

    1. Locate "Users" on the top right side of the screen (its BOLD) and click on it
    2. You should see a list of user accounts, with only "guest" being listed
    3. Locate the "Add a user" section (near the bottom)
    4. Enter a username (We recommend mychild6)
    5. Enter a password (Note: do not use $ or , in your password!)
    6. Click "Add user"

    After clicking "Add user" your new user account should be listed in the list near the center of the page. We need to set permissions for our user account. Follow these steps

    Click on the name of your new account from the list

    You should now see a big yellow banner saying your user does not have permissions, as well as several places to set different permissions. Locate the section labeled "Permissions" and then locate the section "Set permission". Once located follow these steps

    1. Set the "Virtual Host" to the virtual host we created in (Create Virtual Host)
    2. Leave Configure regexp at default
    3. Leave Write regexp at default
    4. Leave Read regexp at default
    5. Click "Set Permssion"

    After clicking "Set permission" the yellow banner should disappear and a new list should be displayed under the header "Current permissions". The permissions should be set for the Virtal Host you created. 

    The above steps assume you are already logged into the RabbitMQ Management Ui

    Congratulations. RabbitMQ is now configured and ready! Continue on to the Minio Configuration Guide

     

     

     

     

     

     

     

     

     

     

     

    Configuration

    Web Configuration

    In this guide we will outline all of the settings available in the appsettings.json for the MyChild6.Web software (primary server)

    all configuration variables listed in the appsettings.json can also be defined in your environment variables

    AllowedHosts

    This value tells the software what computers are allowed to connect. This should ways be a * (allow all)

    Default Value: *

    Urls

    Urls controls what Url's the software listens on, typically this should be left at the default value

    Default Value: http://*:9982

    When deploying on-premise, you want to set the url to http://*:80 so that users can view MyChild6 by browsing to http://servername instead of being required to enter a specific port (IE: http://servername:9982)

    Credentials
    ConnectionStrings

    As of v6.0.6-SP4 there are now scripts included with the release zip to help generate the sql connection string. check the helper_scripts folder for the "generate_sql_connstring.bat" script!

    AWS

    As of v6.0.4 AWS Integration is no longer used. This section can be omitted

    JWT

    As of v6.0.6-SP4 there are now scripts included with the release zip to help generate the JWT values. check the helper_scripts folder for the "generate_jwt_secret" script!

    SSO (AzureAD)
    SendGrid
    Cache
    EventBus

    Entries that are Bold are Required.

    Sentry
    InfluxDB
    Logging
    Configuration

    McLinkAgent Configuration

    The McLinkAgent is used for several different purposes. The main purpose is as a communication "gateway" between Wired RS485 devices and the MyChild6 Web Server. The McLink Agent can also act as an OTA(Over The Air) server for McPlug devices as well as managing some of the servers local services (Time, MessageBus etc), in this guide we will focus on the default deployment, which covers handling communications for Wired devices as well as OTA duties.

    All configuration variables listed in the appsettings.json can also be defined in your environment variables

    AllowedHosts

    This value tells the software what computers are allowed to connect. This should ways be a * (allow all)

    Default Value: *

    Urls

    Urls controls what Url's the software listens on, typically this should be left at the default value, by default McPlugs will automatically search for OTA on port 5151, while port 9880 is used for the UI and API.

    Default Value: http://*:9880;http://*:5151

    API Base URL

    This should be the url of the MyChild6 API assuming you have deployed the MyChild6 Web server on the same server, API url might look something like `http://localhost/api/` when entering your ApiBaseUrl value

    Make sure that your ApiBaseUrl ALWAYS ends with api/  (IE: http://localhost/api/) the slashes are very important to ensure that the api is called correctly

    Credentials

    We recommend creating a dedicated user for the McLinkAgent to use for communications, instead of using the administrative account. To do this, you would simply create a normal user account with IT Admin permissions to view all of the backend-objects (IE: departments, floors, networks etc.)

    API Credentials

    The Api Credentials section are separate from the Credentials section above. The Api Credentials are actually used for communications with the Firmware Master API Server. These credentials should be provided by the Development team before deployment beings

    EventBus

    Entries that are Bold are Required.

    For on premise installations this information is local (ie: localhost). If this is a cloud installation the information is provided by Brad Davis. 

     

     

    Configuration

    Simulator Configuration

    Configuration

    Relay Controller Application Settings Guide

    The McTech Relay Controller software is primarily used to monitor running deployments of MyChild6/StaffWatch6/AssetWatch6/WanderWatch6 for specific alarms that the user can select, once an alarm has been detected the Relay Controller software can then activate specific relays based on user needs.

    After installing the Relay Controller software, you can use this guide to update the appsettings.json file with the correct information to communicate with your install of the MC6/SW6/AW6/WW6 software

    RelayDeviceRepositoryStorage

    This setting controls where the RelayDevice configurations are stored, this setting should not be changed.

    RelayRepositoryStorage

    This setting controls where the Relay Configurations are stored, this setting should not be changed.

    SeqServer Settings

    Cache Settings

    EventBus Settings

    The EventBus settings should be same settings used when deploying the MC6/SW6/AW6/WW6 software, the only changes you should really make are

    Logging Settings

    The logging settings should be left at thier default values. If you need more debugging information you can set the System and Microsoft values to "Debug", but be warned, this will produce A LOT of output.

    Configuration

    Relay Controller Adding Relays and Rules

    In this guide we will focus on adding relays and alarm rules to the McTech Relay Controller software that you setup in the previous guide. This guide assumes that you have already deployed the Relay Controller software and have it setup to listen on http port 5001

    Adding Relays:

    The first step in setting up the Relay Controller is to add relays to the software, currently the Relay Control software supports most of the Control By Web brand relays, with the 4-port relay being the most common / recommended relay. Follow these steps.

    1. Open a web browser and browse to http://<server ip or hostname>:5001
    2. Once the dashboard loads (See example 1) click "Add new Record"
    3. Insert all of the required information
      1. Note: the Name column is a supposed to be a unique name for the relay device itself, for example "Nurses Station 1"
    4. After filling out the required fields, save the entry and you should see the new entry listed (See example 2)

    Screenshot 2024-03-04 091843.png

    Screenshot 2024-03-04 091953.png

    Once you have all of your relay devices added, you can move on to creating rules for when to activate the relays. to do this, click on "Rules Builder" at the top of the page, a page similar to this should be displayed

    Screenshot 2024-03-04 092021.png

    This is the Rules builder page, to create a new rule, simply click the "Add Rule" button, a popup should open asking for more information

    Screenshot 2024-03-04 092035.png

    When creating a new rule, all fields are required except the "From Device" field, if this field is left blank then the software will activate this rule anytime the selected alarm is received. 

    If you device to populate the "From Device" textbox, make sure to enter the serial number of the device that should trigger this rule, for example if you have a door at nurses station B with a serial number of 123456, you would simply enter "123456" in the "From Device" text box

    Once you have created all of your rules, you can begin testing the integration by raising alarms in any of the supported products (MC6/SW6/AW6/WW6) and your relays should activate based on the rules you have configured.

    Configuration

    Configure Nginx as SSL Reverse Proxy

    Configuring Nginx on windows, using Pfx Files

    1.  Install Chocolatey (if not installed already)
    2. Install OpenSSL 
      1. Command: choco install openssl
    3. Install Nginx 
      1. Command: choco install nginx --params '"/installLocation:C:\Program Files\McRoberts Technologies\McTechProxy /serviceName:McTechProxy"'
    4. Copy the SSL Certificate PFX file to an easy to access location (C:\temp works for now)
    5. Open the OpenSSL Command prompt (Start > All Programs > OpenSSL > Win64 OpenSSL Command Prompt)
    6. Navigate to the directory where the pfx file is located (C:\temp) - cd c:\temp
    7. Extract the SSL Certificate Key from the PFX File
      1. Command: openssl pkcs12 -in <PFX_file> -nocerts -nodes -out mychild.<domain_name>.key.pem
    8. Extract the "crt" file from the PFX file
      1. Command: openssl pkcs12 -in <PFX_file> -clcerts -nokeys -out mychild.<domain_name>.certs.pem
    9. Copy the *.pem files from the temporary location, to a permnate home
      1.   Recommended Location: C:\Program Files\McRoberts Technologies\McTechProxy\nginx-<version>\conf\ssl
    10. Edit the nginx.conf in the McTechProxy\conf folder, use Template 1 as an example, changing server_name & certificates locations as needed
    Note: When setting file locations in the nginx config you *MUST* use the format c:/path/to/certificates paying attention to use ONE / (forward slash) in place of the back slashes ( \ )
    ##########################
    # Start of Template 1 - nginx.conf #
    ##########################
    #user  nobody;
    worker_processes  1;
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
    map $http_connection $connection_upgrade {
    "~*Upgrade" $http_connection;
    default keep-alive;
    }
      
        server {
            listen       80;
    listen 443 ssl;
            server_name  mychild.domain.org;
    ssl_certificate "C:/Program Files/McRoberts Technologies/RtlsProxy/conf/ssl/certs.mychild.domain.org.pem";
    ssl_certificate_key "C:/Program Files/McRoberts Technologies/RtlsProxy/conf/ssl/key.mychild.domain.org.pem";
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;
    large_client_header_buffers 4 16k;
            location / {
    proxy_http_version 1.1;
    proxy_set_header   Upgrade $http_upgrade;
    proxy_set_header   Connection $connection_upgrade;
    proxy_set_header   Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header   X-Forwarded-Scheme $scheme;
    proxy_set_header   X-Forwarded-Proto  $scheme;
    proxy_set_header   X-Forwarded-For   $remote_addr;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_pass         http://localhost:9982;
            }
            # redirect server error pages to the static page /50x.html
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    }
    ##########################
    # End of Template 1 - nginx.conf #
    ##########################

    Updates / Upgrades

    Troubleshooting

    Troubleshooting

    McLinkAgent won't stay running

    Troubleshooting

    Tag In Field (Door Open or Closed) is delayed

    Troubleshooting

    RabbitMQ using large amount of hard disk space

    Facility Configuration and Set Up

    This is where you can find, instructions walkthroughs, tips and tricks to setting up the software and devices to the facilities wants and needs.

    Facility Configuration and Set Up

    Devices - Keypad

    Ben Graham submitted this tip for getting the PIN codes to update on the Door Controller: 

    In MC6 we are required to restart services for Door Controllers to take PIN codes. This was the most likely cause because the PIN codes would not work on any door. I set a PIN to 1876# and tested with that after restarting services and door does work as intended.