Skip to content

Teltonika TRB143 setup

Mikael Håkansson edited this page Mar 29, 2024 · 8 revisions

Initial configuration

  1. Plug in the TRB143 to your laptop
  2. Open a browser and navigate to 192.168.2.1
  3. Log into the portal using credentials specified on the back of the gateway

System setup

  1. Navigate to System=>Access Cotrol
  2. Check Enable SSH access, Remote SSH access and Enable CLI
  3. Hit Save & apply

Network settings

  1. Navigate to Network => WAN
  2. Select Advanced from the top menu
  3. Type "wan" in INTERFACE NAME and hit ADD

General settings

Enable: On Protocol: DHCP

Advanced settings

Use default gateway: On

Physical settings

Interface: br-lan

  1. Navigate to Network => DNS
  2. Set DNS forwardings to 8.8.8.8

Service setup

  1. Navigate to Services => M-Mbus
  2. Enable M-Bus settings

Install Python

  1. Navigate to System => Packet Manager
  2. Add (+) Python3

Install dependancies

  1. Install Python from the web ui
  2. Update opkg
opkg update
  1. Install opkg packages:
opkg install python3-pip
opkg install python3-gobject
opkg install python3-psutil
opkg install bash
opkg install python3-ubus
  1. Install pip packages:
pip install asyncio
pip install signalrcore
pip install packaging
pip install azure-iot-device
pip install microservicebus-py

Set up boot process (daemon)

  1. Create a new file called /etc/init.d/microservicebus-py and paste the content below
#!/bin/sh /etc/rc.common

START=10
STOP=15

start() {
        echo starting microbervicebus-py
        HOME=/storage/ \
        microservicebus-py
}

stop() {
        echo stopping microservicebus-py
        kill -9 $(ps | grep microservicebus-py | awk '{ print $1 }')
}
  1. Create a symlink using the following command:
ln -s /etc/init.d/microservicebus-py /etc/rc.d/S99microservicebus-py
chmod +x /etc/rc.d/S99microservicebus-py
  1. Reboot

Logging

You can view the log using command:

tail /tmp/log/microservicebus-py.log -n 100 -f

Reading MBUS telegram

Use the Teltonika MBus Reader to read off any of the connected meters.

Update firmware

The Teltonika Firmware Handler can be triggered using the UpdateFirmware API. The service will download, verify and install the latest update