Remote Mode with EnOcean IoTC Needs To Be Manually Started for SmartConnect
This section describes how to manually enable remote mode with EnOcean IoT Connector (IoTC) for SmartConnect. Follow the procedure in this section if your:
MQTT and IoTC instance credentials (username and password) are different
IoTC instance is not using security on the MQTT side
Environment has more than one SmartConnect connecting to a given IoTC instance
If your MQTT and IoTC instance credentials are the same, and/or you do not have more than one SmartConnect connecting to a given IoTC instance, then see (Optional) Add a Remote EnOcean Interface for SmartConnect to enable remote mode with IoTC using the SmartConnect EnOcean Configuration page.
The procedure in this section manually sets the MQTT and IoTC parameters. The MQTT parameters define the connection information and authentication credentials to the MQTT broker of IoTC. The IoTC parameters define the connection information and authentication credentials to the REST API of IoTC. This procedure also describes how to configure a unique clientid if your environment has more than one SmartConnect connecting to a given IoTC instance. Every client that connects to the same IoTC instance must have a unique clientid.
To manually enable remote mode with IoTC for SmartConnect, perform the following steps:
Open a terminal connection to SmartConnect.
Verify that the local EnOcean interface (enocean) and remote EnOcean interface (iotcid) are inactive by entering the following command:
smartserverctl status enocean iotcidExample result:
enocean inactive iotcid inactiveIf the interface(s) is active, then stop and disable the interface(s) by entering the following commands:
sudo smartserverctl stop <enocean> <iotcid> sudo smartserverctl disable <enocean> <iotcid>Edit the remote mode configuration file by entering the following command, followed by the apollo password:
sudo nano /var/smartserver/conf.d/iotcid/iotcid.confConfigure the remote interface mqtt and iotc (API) settings as shown in the example below, where x’s are placeholders (example for release 4.5 Update 1).
{"mqtt":{"address":"xxx","port":xxxx,"keepalive":xx,"username":"<MQTT_USERNAME>","password":"<MQTT_PASSWORD>","clientid":"xxx"},"iotc":{"address":"xxx","username":"<BASIC_AUTH_USERNAME>","password":"<BASIC_AUTH_PASSWORD>","insecure":true,"isSmartStudio":false},"telemetry":{"enabled":false,"ipcPath":"/usr/bin/smartserver/iotcid.ipc","ipcId":123,"prometheusPort":8080}}The iotc settings, as shown below, may need to be added to the file following the mqtt settings.
"iotc":{"address":"xxx","username":"<BASIC_AUTH_USERNAME>","password":"<BASIC_AUTH_PASSWORD>","insecure":true},If you are using SmartConnect 4.5 Update 1 or higher, then you may also need to add the isSmartStudio parameter, as shown below, where false indicates remote mode with IoTC.
"iotc":{"address":"xxx","username":"<BASIC_AUTH_USERNAME>","password":"<BASIC_AUTH_PASSWORD>","insecure":true,"isSmartStudio":false},The address parameter sets the IoTC instance IP address or hostname.
The port parameter sets the MQTT port.
The username and password parameters specify the MQTT and IoTC credentials. See EnOcean IoT Connector Documentation for IoTC environment variable information.
MQTT username is defined in MQTT_USERNAME; MQTT password is defined in MQTT_PASSWORD.
IoTC username is defined in BASIC_AUTH_USERNAME; IoTC password is defined in BASIC_AUTH_PASSWORD.
If your IoTC instance is not using security on the MQTT side, then remove the username and password parameters from the mqtt settings.
If you are updating from SmartConnect 4.3 or 4.3 Update 1 to SmartConnect 4.4, then change the keep_alive parameter to keepalive. This parameter sets the keep alive interval for MQTT connections.
If you have more than one SmartServer connecting to a given IoTC instance, then specify a unique clientid for each SmartServer. The clientid parameter provides a way to identify your specific connection.
Save your changes to the iotcid.conf file.
Start the remote EnOcean interface (iotcid), and enable it so that it will start automatically after reboot, by entering the following commands:
sudo smartserverctl start iotcid sudo smartserverctl enable iotcidVerify that the remote EnOcean interface (iotcid) is active by entering the following command:
smartserverctl status iotcidExample result:
iotcid active since Fri 2024-04-19 15:50:14 EDT; 6s ago
Remote mode with IoTC is now enabled on your SmartConnect.