Tunnel – Remote management of up to 4 0-10V analog outputs via Telnet and/or MQTT/S.

¿Buscas alguna otra cosa?

Scenario details:

  • 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 1.2.3.4 and 1.2.3.5 must be allowed

Solution: MTX-Tunnel firmware + MTX-IoT-S [4-N]

Configuration example (config.txt file) for the indicated scenario:

Configuration Observations
GPRS_apn: movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_timeout: 0
MTX_pin: 0000
MTX_model: 199802407
MTX_mode: none
MTX_ping: 30
MTX_pingIP: 8.8.8.8
MTX_numGSMErrors: 180
MTX_TPProtocol: ntp
MTX_TPServer: ntp.roa.es
MTX_TPServer2: es.pool.ntp.org
MTX_TPFormat: unix
FIREWALL_enabled: on
FIREWALL_IP1: 1.2.3.4
FIREWALL_IP2: 1.2.3.5
TELNET_enabled: on
TELNET_login: user
TELNET_password: 1234
TELNET_port: 20023
MQTT_enabled: on
MQTT_server: tcp://broker.mqttdashboard.com:1883
MQTT_id: [IMEI]
MQTT_login:
MQTT_password:
MQTT_attopic1: [IMEI]/AT
MQTT_atrtopic: [IMEI]/ATR
MQTT_persistent: off
MQTT_qos: 1
MQTT_keepalive: 60
GPRS APN provided by GSM operator
GPRS Login
GPRS Password
Modem is permanently connected to GPRS
PIN if it has one
Device model
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
Time server backup
Unix time format
All IPs are not authorized
Authorized IP 1
Authorized IP 2
We activate the Telnet service
Username
Password
TCP port
MQTT service
MQTT broker, format protocol://url:port
Device ID in broker
Username
Password
MTX topic to recieve AT commands
Topic where MTX sends responses to AT commands
No persistence
QoS established
Keepalive

Details:

  • 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.