Fixed byte order in the esp32-paxcounter.yaml to make it validate and changed decoder file name to esp32-paxcounter-packed.js because no uppercase is allowed
This commit is contained in:
parent
335d646fe7
commit
a83ef4ba72
@ -1,27 +1,28 @@
|
|||||||
# Uplink decoder decodes binary data uplink into a JSON object (optional)
|
# Uplink decoder decodes binary data uplink into a JSON object (optional)
|
||||||
# For documentation on writing encoders and decoders, see: https://thethingsstack.io/integrations/payload-formatters/javascript/
|
# For documentation on writing encoders and decoders, see: https://thethingsstack.io/integrations/payload-formatters/javascript/
|
||||||
uplinkDecoder:
|
uplinkDecoder:
|
||||||
fileName: esp32-paxcounter-packed_decodeUplink.js
|
fileName: esp32-paxcounter-packed.js
|
||||||
examples:
|
examples:
|
||||||
- description: Paxcount data
|
- description: Paxcount data
|
||||||
input:
|
input:
|
||||||
fPort: 1
|
fPort: 1
|
||||||
bytes: [0x00, 0x07, 0x00, 0x03]
|
bytes: [0x07, 0x00, 0x03, 0x00]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x00, 0x07, 0x00, 0x03]
|
bytes: [0x07, 0x00, 0x03, 0x00]
|
||||||
port: 1
|
port: 1
|
||||||
wifi: 7
|
wifi: 7
|
||||||
ble: 3
|
ble: 3
|
||||||
|
pax: 10
|
||||||
errors: []
|
errors: []
|
||||||
warnings: []
|
warnings: []
|
||||||
- description: Device status query result
|
- description: Device status query result
|
||||||
input:
|
input:
|
||||||
fPort: 2
|
fPort: 2
|
||||||
bytes: [0x01, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4B, 0xC0, 0x2D, 0x00, 0x03, 0x4B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00]
|
bytes: [0x2F, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x2D, 0xC0, 0x4B, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x01, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4B, 0xC0, 0x2D, 0x00, 0x03, 0x4B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00]
|
bytes: [0x2F, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x2D, 0xC0, 0x4B, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
|
||||||
port: 2
|
port: 2
|
||||||
voltage: 303
|
voltage: 303
|
||||||
uptime: 216000
|
uptime: 216000
|
||||||
@ -46,24 +47,39 @@ uplinkDecoder:
|
|||||||
wifichancycle: 50
|
wifichancycle: 50
|
||||||
blescantime: 10
|
blescantime: 10
|
||||||
rgblum: 30
|
rgblum: 30
|
||||||
flags: 0
|
flags:
|
||||||
payloadmask: 0
|
adr: 0
|
||||||
version: 0
|
antenna: 0
|
||||||
|
blescan: 0
|
||||||
|
countermode: 0
|
||||||
|
reserved: 0
|
||||||
|
screen: 0
|
||||||
|
screensaver: 0
|
||||||
|
payloadmask:
|
||||||
|
battery: 0
|
||||||
|
bme: 0
|
||||||
|
counter: 0
|
||||||
|
gps: 0
|
||||||
|
reserved: 0
|
||||||
|
sensor1: 0
|
||||||
|
sensor2: 0
|
||||||
|
sensor3: 0
|
||||||
|
version: ''
|
||||||
errors: []
|
errors: []
|
||||||
warnings: []
|
warnings: []
|
||||||
- description: GPS data
|
- description: GPS data
|
||||||
input:
|
input:
|
||||||
fPort: 4
|
fPort: 4
|
||||||
bytes: [0x6E, 0x1C, 0x07, 0x03, 0x0A, 0x63, 0x6F, 0x0B, 0x51, 0x00, 0xCD, 0x00]
|
bytes: [0x65, 0xCA, 0x06, 0x03, 0x05, 0x19, 0x6F, 0x00, 0x05, 0xC6, 0x00, 0x42, 0x00]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x6E, 0x1C, 0x07, 0x03, 0x0A, 0x63, 0x6F, 0x0B, 0x51, 0x00, 0xCD, 0x00]
|
bytes: [0x65, 0xCA, 0x06, 0x03, 0x05, 0x19, 0x6F, 0x00, 0x05, 0xC6, 0x00, 0x42, 0x00]
|
||||||
port: 4
|
port: 4
|
||||||
latitude: 50.797678
|
latitude: 50.776677
|
||||||
longitude: 7.29985
|
longitude: 7.280901
|
||||||
sats: 11
|
sats: 5
|
||||||
hdop: 0.81
|
hdop: 1.98
|
||||||
altitude: 205
|
altitude: 66
|
||||||
errors: []
|
errors: []
|
||||||
warnings: []
|
warnings: []
|
||||||
- description: Button data
|
- description: Button data
|
||||||
@ -72,7 +88,7 @@ uplinkDecoder:
|
|||||||
bytes: [0x01]
|
bytes: [0x01]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x00]
|
bytes: [0x01]
|
||||||
port: 5
|
port: 5
|
||||||
button: 1
|
button: 1
|
||||||
errors: []
|
errors: []
|
||||||
@ -80,10 +96,10 @@ uplinkDecoder:
|
|||||||
- description: Environmental sensor data
|
- description: Environmental sensor data
|
||||||
input:
|
input:
|
||||||
fPort: 7
|
fPort: 7
|
||||||
bytes: [0x08, 0x34, 0x27, 0x10, 0x1F, 0x40, 0x27, 0x10]
|
bytes: [0x08, 0x34, 0x10, 0x27, 0x40, 0x1F, 0x10, 0x27]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x08, 0x34, 0x27, 0x10, 0x1F, 0x40, 0x27, 0x10]
|
bytes: [0x08, 0x34, 0x10, 0x27, 0x40, 0x1F, 0x10, 0x27]
|
||||||
port: 7
|
port: 7
|
||||||
temperature: 21.00
|
temperature: 21.00
|
||||||
pressure: 1000.0
|
pressure: 1000.0
|
||||||
@ -94,10 +110,10 @@ uplinkDecoder:
|
|||||||
- description: Battery voltage data
|
- description: Battery voltage data
|
||||||
input:
|
input:
|
||||||
fPort: 8
|
fPort: 8
|
||||||
bytes: [0x01, 0x2F]
|
bytes: [0x2F, 0x01]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x01, 0x2F]
|
bytes: [0x2F, 0x01]
|
||||||
port: 8
|
port: 8
|
||||||
voltage: 303
|
voltage: 303
|
||||||
errors: []
|
errors: []
|
||||||
@ -105,10 +121,10 @@ uplinkDecoder:
|
|||||||
- description: Time/Date
|
- description: Time/Date
|
||||||
input:
|
input:
|
||||||
fPort: 9
|
fPort: 9
|
||||||
bytes: [0x60, 0xC8, 0x86, 0x90, 0x00]
|
bytes: [0x90, 0x86, 0xC8, 0x60, 0x00]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x60, 0xC8, 0x86, 0x90, 0x00]
|
bytes: [0x90, 0x86, 0xC8, 0x60, 0x00]
|
||||||
port: 9
|
port: 9
|
||||||
time: 1623754384
|
time: 1623754384
|
||||||
timestatus: 0
|
timestatus: 0
|
||||||
@ -117,10 +133,10 @@ uplinkDecoder:
|
|||||||
- description: User sensor data
|
- description: User sensor data
|
||||||
input:
|
input:
|
||||||
fPort: 10
|
fPort: 10
|
||||||
bytes: [0x00]
|
bytes: [0x00, 0x00]
|
||||||
output:
|
output:
|
||||||
data:
|
data:
|
||||||
bytes: [0x00]
|
bytes: [0x00, 0x00]
|
||||||
port: 10
|
port: 10
|
||||||
ens: 0
|
ens: 0
|
||||||
errors: []
|
errors: []
|
||||||
|
@ -43,21 +43,27 @@ firmwareVersions:
|
|||||||
# vibration, voltage, water potential, water, weight, wifi ssid, wind direction, wind speed.
|
# vibration, voltage, water potential, water, weight, wifi ssid, wind direction, wind speed.
|
||||||
sensors:
|
sensors:
|
||||||
- battery
|
- battery
|
||||||
- ble
|
# - ble
|
||||||
- wifi
|
# - wifi
|
||||||
- pax
|
# - pax
|
||||||
- gps
|
- gps
|
||||||
- altitude
|
- altitude
|
||||||
- latitude
|
# - latitude
|
||||||
- longitude
|
# - longitude
|
||||||
- hdop
|
# - hdop
|
||||||
- sats
|
# - sats
|
||||||
- temperature
|
- temperature
|
||||||
- humidity
|
- humidity
|
||||||
- barometer
|
- barometer
|
||||||
- pm2.5
|
- pm2.5
|
||||||
- pm10
|
- pm10
|
||||||
|
|
||||||
|
# Additional radios that this device has (optional)
|
||||||
|
# Valid values are: ble, nfc, wifi, cellular.
|
||||||
|
additionalRadios:
|
||||||
|
- ble
|
||||||
|
- wifi
|
||||||
|
|
||||||
# Dimensions in mm (optional)
|
# Dimensions in mm (optional)
|
||||||
# Use width, height, length and/or diameter
|
# Use width, height, length and/or diameter
|
||||||
#dimensions:
|
#dimensions:
|
||||||
@ -70,11 +76,11 @@ sensors:
|
|||||||
|
|
||||||
## Operating conditions (optional)
|
## Operating conditions (optional)
|
||||||
#operatingConditions:
|
#operatingConditions:
|
||||||
# Temperature (Celsius)
|
# Temperature (Celsius)
|
||||||
# temperature:
|
# temperature:
|
||||||
# min: -30
|
# min: -30
|
||||||
# max: 60
|
# max: 60
|
||||||
# Relative humidity (fraction of 1)
|
# Relative humidity (fraction of 1)
|
||||||
# relativeHumidity:
|
# relativeHumidity:
|
||||||
# min: 0
|
# min: 0
|
||||||
# max: 0.9
|
# max: 0.9
|
||||||
|
Loading…
Reference in New Issue
Block a user