GPS protocol
Brand | Protocol |
---|---|
Home build | GPSprotocol |
None
"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" ] } }
Device Settings
Setting | Default | Format | Description |
---|---|---|---|
none | - | - | - |
GUI Settings
Setting | Default | Format | Description |
---|---|---|---|
sensorvalue-decimals | 1 | number | How many decimals the GUI should display for this sensor value |
show-battery | 1 | 1 or 0 | Don't display the battery value |
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.
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:
1100 01100100 001 1 00000000011000110110 010 00101010 01000011 00000000 00000000 0
Protocol ID
is defined as a binary number (always 1100
) Sensor ID
is defined as a binary number Unit
is defined as a binary number Battery
identifies the state of the batteryValue
is defined as a binary number and represents the measured valueDecimals
is defined as a binary number and represents the Value dividerLabel
are four characters (ASCII) representing the Unit of measurementThis 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 Name | Duration in microSec |
---|---|
START | 250 |
SYNC | 4500 |
Data “0” | 900 |
Data “1” | 1800 |