Twig protocol

Integration level: params + settings
Protocol used by personal GPS tracking devices manufactured by Twig Com Ltd headquartered in Finland.
flespi parses the Twig protocol messages into a JSON object with the fields listed below in the Parameters tab.
alarm.mode.status
boolean
Device alarm mode status
battery.level
number
percentage
Internal battery level
battery.temperature
number
celsius
Battery temperature
channel.id
number
ID of channel that received a message
device.id
number
ID of device that received a message
device.name
string
Name of device that received a message
device.type.id
number
ID of device type of device that received a message
error.type
number
Error type identification number
event.code
string
Unique event identifier string
event.enum
number
Event code, full list of codes available at separate table
event.seqnum
number
Unique event sequence number
gnss.type
string
GNSS type: gps, glonass, etc...
ident
string
Device unique identificator and optional password
message.content
string
Message content
message.detail
string
Message detail
message.type
string
Message type
normal.mode.status
boolean
Normal mode status
peer
string
IP:port from which device connecting to the channel
position.altitude
number
meters
Altitude value for position
position.direction
number
degrees
Heading angle at position detection moment
position.hdop
number
Horizontal dilution of precision
position.latitude
number
degrees
Latitude coordinate value
position.longitude
number
degrees
Longitude coordinate value
position.speed
number
km/h
Instant speed at position detection moment
position.timestamp
number
seconds
Timestamp when coordinates where calculated
protocol.id
number
ID of protocol
report.reason
number
Transmission reason code
send.timestamp
number
seconds
Message send timestamp
server.timestamp
number
seconds
Timestamp when server received a message
test.mode.status
boolean
Device is in test(diagnostic) mode
timestamp
number
seconds
Message timestamp
Properties
Custom MPTP command
custom
Send custom MPTP command from Central Station to Mobile Telematics Terminal
payload: Payload text
Request last known position. Response will be stored as message
{"mptp_payload":"?LOC_0"}
Request position: Attempt to acquire a fresh position fix. Response will be stored as message
{"mptp_payload":"?LOC_1"}

To connect your tracker using the Twig protocol, you need to have a twig channel created first.

Point your tracker to the channel's domain name:port via SMS or configuration tool provided by the vendor.

Then create a device instance for your tracker and use a 15-character IMEI (usually specified on the tracker casing) in the ident field.

Use the Toolbox tab on the device screen to check if the messages are coming.

It is possible to configure Twig devices OTA using the flespi web-based configurator tool. To connect Twig to Wialon or another platform via flespi please read this article.