User Tools

Site Tools


gpsprotocol_v7_0

GPS protocol

FeatureSupport
Sending
Receiving
Config

Supported Brands

BrandProtocol
Home buildGPSprotocol

Sender Arguments

None

Config

"devices": {
    "GPSensor1": {
        "protocol": [ "gpsensor" ],
        "id": [{
            "id": 100,
            "channel": 1
        }],
        "uuid": "0000-b8-27-eb-048c50",
        "munit": "?",
        "sensorvalue": 0.0,
        "battery": 1
    }
}
"gui": {
    "GPSensor1": {
        "name": "Temperature Living",
        "group": [ "Klimaat" ],
        "show-battery": 0,
        "sensorvalue-decimals": 1,
        "media": [ "all" ]
    }
}

Optional Settings

Device Settings

SettingDefaultFormatDescription
none - - -

GUI Settings

SettingDefaultFormatDescription
sensorvalue-decimals1numberHow many decimals the GUI should display for this sensor value
show-battery11 or 0Don't display the battery value

Comments

This protocol is specially developed for home build sensors. It can measure everything the builder can think of (and build). The unit of measurement is part of the protocol and shows up, after the first receiving, in the “munit” setting.

gpsprotocol.jpg

Protocol

The protocol sends 146 pulses that look like this:

376 1664 376 1660 376 780 372 788 376 780 376 1668 376 1660 380 772 376 776 376 1660 376 768 388 776 380 776 376 768 372 1676 376 1688 380 788 376 784 384 780 376 788 376 776 372 788 376 776 372 788 376 772 392 1656 388 1656 392 768 376 784 372 776 372 1672 372 1668 372 780 376 1660 380 1656 380 780 388 768 376 1660 376 804 368 780 368 788 368 1672 364 780 364 1676 368 784 372 1664 368 796 380 780 368 1676 368 788 368 776 372 784 368 776 368 1672 368 1696 380 776 372 788 372 772 372 788 368 772 368 788 368 772 380 800 364 796 364 780 364 792 368 776 368 788 368 772 380 776 368 804 364 780 364 3444

The last two pulses are the footer. We don't need them for further processing.

The next step is to transform this output into 72 groups of 2 pulses (and thereby dropping the footer pulses).

 376 1664 
 376 1660 
 376 780 
 372 788 
 376 780 
 376 1668 
 376 1660 
 380 772 
 376 776 
 376 1660 
 376 768 
 388 776 
 380 776 
 376 768 
 372 1676 
 376 1688 
 380 788 
 376 784 
 384 780 
 376 788 
 376 776 
 372 788 
 376 776 
 372 788 
 376 772 
 392 1656 
 388 1656 
 392 768 
 376 784 
 372 776 
 372 1672 
 372 1668 
 372 780 
 376 1660 
 380 1656 
 380 780 
 388 768 
 376 1660 
 376 804 
 368 780 
 368 788 
 368 1672 
 364 780 
 364 1676 
 368 784 
 372 1664 
 368 796 
 380 780 
 368 1676 
 368 788 
 368 776 
 372 784 
 368 776 
 368 1672 
 368 1696 
 380 776 
 372 788 
 372 772 
 372 788 
 368 772 
 368 788 
 368 772 
 380 800 
 364 796 
 364 780 
 364 792 
 368 776 
 368 788 
 368 772 
 380 776 
 368 804 
 364 780 
 364 3444

If we take these groups in careful consideration we can distinguish two types (of groups):

 360 780
 360 1670

So the first group is defined by a low 2nd, the second group has a high 2nd pulse. So we take either of these two pulses to define a 0 or a 1. In this case we say a high 2nd pulse means a 1 and a low 2nd pulse means a 0. We then get the following output:

110001100100001100000000011000110110010001010100100001100000000000000000

Each (group) of numbers has a specific meaning:

  • Protocol ID: 0 till 3
  • Sensor ID: 4 till 11
  • Unit: 12 till 14
  • Battery: 15
  • Value: 16 till 35
  • Decimals: 36 till 38
  • Label: 39 till 70
  • ParityBit: 71
1100 01100100 001 1 00000000011000110110 010 00101010 01000011 00000000 00000000 0
  • The Protocol ID is defined as a binary number (always 1100)
  • The Sensor ID is defined as a binary number
  • The Unit is defined as a binary number
  • The Battery identifies the state of the battery
  • The Value is defined as a binary number and represents the measured value
  • The Decimals is defined as a binary number and represents the Value divider
  • The Label are four characters (ASCII) representing the Unit of measurement

This protocol was created for pilight with the help of this thread: https://forum.pilight.org/Thread-Proposol-General-Purpose-Sensor-Protocol

In the actual GPSprotocol definition the pulses are defined as follows:

Pulse NameDuration in microSec
START 250
SYNC 4500
Data “0” 900
Data “1” 1800
gpsprotocol_v7_0.txt · Last modified: 2017/01/10 20:15 by TheWheel