senor_octopus.sources.udp.protocols package

Submodules

senor_octopus.sources.udp.protocols.micron_bolt_mini_2 module

An UDP protocol for the Micron Bolt Mini 2 GPS tracker.

class senor_octopus.sources.udp.protocols.micron_bolt_mini_2.MicronBoltMini2UDPProtocol(queue: Queue, api_key: str | None = None)[source]

Bases: DatagramProtocol

An UDP protocol for the Micron Bolt Mini 2 GPS tracker.

To configure it, send the following commands to the tracker via SMS:

  • AT+GTQSS=AIR11,${apn},,,4,,1,${host1},${port1},${host2},${port2},,10,1,,,0001$

  • AT+GTNMD=AIR11,8,2,4,15,240,,,,0002$

  • AT+GTFRI=AIR11,1,1,,,0000,2359,86400,1,86400,1,001F,1000,1000,,,,,,,0003$

This will the device send GPS data once per day.

If an API key is provided, the protocol will use the Google Geolocation service to determine the location of the device based on the WiFi access points it can see.

connection_made(transport: BaseTransport) None[source]

Called when a connection is made.

The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called.

datagram_received(data: bytes, addr: Tuple[str, int]) None[source]

Handle incoming data.

class senor_octopus.sources.udp.protocols.micron_bolt_mini_2.WifiAccessPointType(*args, **kwargs)[source]

Bases: dict

A WiFi access point.

macAddress: str
signalStrength: int
senor_octopus.sources.udp.protocols.micron_bolt_mini_2.parse_timestamp(timestamp: str) datetime[source]

Parse the GPS timestamp into a datetime object.

Module contents