# AutomationPortalConnector

## `AutomationPortalConnector` (FB)

FUNCTION\_BLOCK AutomationPortalConnector

### Short description

> Connects the controller to the HVAC Automation Portal. More info at [www.hvac-automation.com.\\](http://www.hvac-automation.com.\\)
> Allows the transfer of variables via the CODESYS symbol configuration.\
> In the portal these can then be recorded and analyzed.\
> Alarms can also be forwarded, the CODESYS visualization can be accessed and the device directory can be accessed.\
> For the powerIO IoT Gateway and PLC controller H1.M100 a VPN connection can be established directly via the portal.

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-add5a849000d6f7bc031c3722d0adbe13aa34f8b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Function description

To connect please go through the following steps:

#### Transfer variables:

> 1. <https://portal.hvac-automation.com> visit and register for free.
> 2. Attach the generated project ID to the input **diProjectId** set xEn to TRUE.
> 3. Set a password at the input **sPassword** .
> 4. Right-click on “Application” and create “Symbol Configuration”. There check the variables that should be transferred to the portal.
> 5. Download the application to the controller.
> 6. In the HVAC Automation Portal the controller now appears orange, the password you created must be entered here. Done.

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-99ba0c5fd2bf105f728ef1ca6ae57e46df96dc5d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Transfer visualization:

> To transfer the visualization you must enter at the input **sLocalVisuUrl** the visualization to be transferred. If the local CODESYS visualization is to be transferred, it is sufficient to enter ‘<http://127.0.0.1>’ or ‘<http://127.0.0.1:8080/webvisu.htm>’. In the HVAC Automation Portal the visualization can then be placed and used like a variable.

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-4b393968908db1f27f8e5f5e3cdab7d09fd755f7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Transfer device directory:

> The HVAC Automation Portal can access the folder structure of the device to, for example, back up files remotely. For this, at the input **sBrowsePath** either ‘/’ for the complete root directory or ‘./’ for the CODESYS PLC directory must be entered.

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-7f632363471c86bba95e7f1f9fd8262d7e863b07%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

InOut:

| Scope  | Name                 | Type          | Initial              |
| ------ | -------------------- | ------------- | -------------------- |
| Input  | `xEn`                | `BOOL`        | TRUE                 |
| Input  | `diProjectId`        | `DINT`        | -1                   |
| Input  | `sPassword`          | `STRING`      |                      |
| Input  | `sStorageDirectory`  | `STRING`      |                      |
| Input  | `tLiveValueInterval` | `TIME`        | TIME#1s0ms           |
| Input  | `sLocalVisuUrl`      | `STRING(200)` | ‘<http://127.0.0.1>’ |
| Input  | `sBrowsePath`        | `STRING`      |                      |
| Output | `sStatus`            | `STRING(255)` |                      |
| Output | `xError`             | `BOOL`        |                      |
| Output | `xConnected`         | `BOOL`        |                      |
