pktechnology/cgateserver

By pktechnology

Updated 3 months ago

Docker container image for Clipsal Cgate Server 3..x.x

Image
Integration & delivery
Internet of things
1

10K+

pktechnology/cgateserver repository overview

Clipsal CGATE Server 3.x.x

This is the new version of Clipsal C-Gate Server incorporating a new database (.db) format.
SpaceLogic C-Bus Lighting & Building Automation Systems.

Installation

Perform steps 1-3 before creating & starting the container for the first time.
This will allow for the creation of certain files and folders as explained below.

Note: These instructions assume you have a current working version of C-Gate Server 2.x.x as part of your C-Bus Toolkit software installation or otherwise, and therefore can reuse a couple of files you already have. Or perhaps, you have already migrated to the new C-Gate Server 3.x.x, running on your computer, - but now want to use a docker container instead.

  1. Create the following two docker folder structures on your host.
    Assume the "\docker" folder is anywhere you like. For example /volume1/docker on your Synology NAS or C:\docker on your computer, etc.
\docker\cgate3\appdata\config
\docker\cgate3\home\Projects
  1. Place your existing "access.txt" file from your current "config" folder into the new "config" folder.

  2. Copy your existing project file, for example, "Site1.xml" from your current "tag" folder, into the "Projects" folder. This will be converted to "Site1.db" within a new subfolder of the same name, when the container is started for the first time. Alternatively, if you already have a new *.db project file, then go ahead and create a folder of the same name under "Projects" and copy your *.db file here.

  3. Create, then Start the container. You may choose to use the Docker CLI or Docker Compose examples shown below or any other method you prefer.
    Ensure <YOUR_PATH> in these examples, is mapped only to the "appdata" and "home" host paths created in step 1.
    For example, on a Synology NAS, these two volume mappings may look like this:

/volume1/docker/cgate3/home:/home/clipsal/cgate3/home
/volume1/docker/cgate3/appdata:/home/clipsal/cgate3/appdata
  1. After the container has started for the first time, a "C-GateConfig.txt" file will be created in the "config" folder, with all required paths to your respective "appdata" and "home" folders.
    Edit this newly created "C-GateConfig.txt" file to include the name of your project file (eg: Site1) in the "project.default" & "project.start" sections. Then restart the container.

Note: A "logs" folder will also be created for you under "appdata". And your "Site1.xml" project file will be moved to the "..\Projects\Site1\XML Backup files" folder.

Your final folder structure should look like this:

Imgur.

Testing Installation

An easy way to test that C-Gate Server is up and running is by checking the container log. You should see something like this:
Imgur

Another way to test, is by using C-Bus Toolkit software ver 1.17.0 or later on your computer. Select to Connect to remote C-Gate", using the IP address of your NAS or computer that is running the Docker container..
Don't forget to modify your "access.txt" file to allow the IP address of the computer your C-Bus Toolkit software is being run from. For example add the line "interface 192.168.0.10 Program" or whatever the IP address of your computer is.

Homebridge

If you are using the Homebridge Cbus plugin for Apple HomeKit you will need to modify a line in the C-GateConfig.txt file to reflect the old cgate-name.
Change "cgate-name=Schneider Electric C-Gate" to "cgate-name=Clipsal C-Gate".
Note:, this may not be required in future updates of Homebridge Cbus plugin.

If this image is running on NAS hardware like Synology, you may also need to allow the IP address of the running container in "access.txt".
For example add the line "interface 172.17.0.3 Program" or whatever IP is set under your container network details section.

Docker CLI

docker create \
  --name=cgate3 \
  -p 20023:20023 \
  -p 20024:20024 \
  -p 20025:20025 \
  -p 20026:20026 \
  -p 20123:20123 \
  -v <YOUR_PATH>:/home/clipsal/cgate3/home \
  -v <YOUR_PATH>:/home/clipsal/cgate3/appdata \
  --restart unless-stopped \
  pktechnology/cgateserver

Docker Compose

version: '3'

services:
  clipsal-service:
    image: pktechnology/cgateserver:latest
    container_name: cgate3
    ports:
      - "20023:20023"
      - "20024:20024"
      - "20025:20025"
      - "20026:20026"
      - "20123:20123"
    volumes:
      - <YOUR_PATH>:/home/clipsal/cgate3/home
      - <YOUR_PATH>:/home/clipsal/cgate3/appdata
    restart: unless-stopped  

Tag summary

Content type

Image

Digest

sha256:519d20fb8

Size

208.3 MB

Last updated

3 months ago

docker pull pktechnology/cgateserver