Looking for something else?
Tunnel – Remote management of up to 4 0-10V analog outputs via Telnet and/or MQTT/S.
- It is necessary to be able to change the state of 4 remote 0-10V analog outputs to dim some of the luminaires connected to them. Such remote activation must be done through telnet and/or an MQTT/S platform.
- For telnet access, only TCP connections from authorized IPs 22.214.171.124 and 126.96.36.199 must be allowed
Configuration example (config.txt file) for the indicated scenario:
|GPRS APN provided by GSM operator
Modem is permanently connected to GPRS
PIN if it has one
No need for serial-IP tunnels
Every 30 minutes PING check
Google IP (f.e.) to ping
Reset if no registry on GSM network in 1800 secs.
Time synch protocol
Time server backup
Unix time format
All IPs are not authorized
Authorized IP 1
Authorized IP 2
We activate the Telnet service
MQTT broker, format protocol://url:port
Device ID in broker
MTX topic to recieve AT commands
Topic where MTX sends responses to AT commands
MTX-IOT-S family modems have up to 4 0-10V analog outputs (DAC) (from DAC0 to DAC3)
To remotely change the status of an analog output, it must be done by using an AT command sent remotely via Telnet and / or MQTT (it is also possible via SMS, modbus tcp, etc). The command to send is AT ^ MTXTUNNEL = SETDAC, X, Y where X indicates the DAC on which to act (0… 3) and Y indicates the value of the analog output (0… 10000) expressed in millivolts.
To send the AT command to the modem via MQTT you must do it on the topic configured in MQTT_attopic1 Remember that if you configure something like [IMEI] / AT, the modem will replace that text [IMEI] with its real IMEI, that is, for example by something like 354033091777774 / AT. The modem will send the response to the command to the TOPIC specified in the MQTT_atropic parameter, which in the case of this example is [IMEI] / ATR
Example of sending AT commands to remotely change the value of DAC0 to 6.5V from an MQTT broker
- Example of sending AT commands via telnet to change the value of the DAC2 analog output to 7.3V. Also example of querying the set value.