|
|
Linje 6: |
Linje 6: |
| http://digitalmatter.com/OYSTER-LoRa-BATTERY-GPS-TRACKER<br/> | | http://digitalmatter.com/OYSTER-LoRa-BATTERY-GPS-TRACKER<br/> |
| Oyster LoRaWAN Long-Life Battery GPS Tracker | | Oyster LoRaWAN Long-Life Battery GPS Tracker |
− | ==Konfiguration==
| |
− | Konfiguration fremgår af denne korrespondence med Digital Matter<br/>
| |
− | 1. What App EUI should I assign to the devices? '''Please use your own AppEUI'''. <br/>
| |
− | 2. Can I use the 3 default 868 channels, or do you need a special setup? The defaults will be 868.1, 868.3, and 868.5 MHz '''YES'''<br/>
| |
− | 3. What min/max spreading factors can I choose? Our default is min=10, max=12. '''OK'''<br/>
| |
− | 4. What sort of device behaviour would you like? For testing, we normally ship with: <br/>
| |
− | a. Out of trip, GPS fix and send every 24 hours<br/>
| |
− | b. In trip (detects accelerometer movement):<br/>
| |
− | i. Fix and send on start '''OK'''<br/>
| |
− | ii. Fix and send every 10 min please - '''use 5 min'''<br/>
| |
− | iii. Fix and send on end (5 min of stationary). '''OK'''<br/>
| |
− |
| |
− | Svar til digitalmatter.com vedr. server og gateways:<br/>
| |
− | Gateways are Kerlink with version 3.17 firmware<br/>
| |
− | Loriot-server set up:<br/>
| |
− | Base and model: Kerlink iBTS<br/>
| |
− | Concentrator: <small>SPIO</small> iBTS 868<br/>
| |
− | Frequency: EU868_Semtech<br/>
| |
− |
| |
− | ==Ingen intern hukommelse==
| |
− | The internal memory is only used for configuration, and not for storing points. The device has no real way to confirm the transmission of messages (because downlinks are quite expensive), so it just sends them as they are generated. If they are not heard by the network, they are lost.
| |
− |
| |
− | ==Deviceinfo==
| |
− | Ligger nu under _83_kommunens_driftsmidler_og_inventar.oyster_lorawan_gps_tracker_devices
| |
− |
| |
− | ==Dekodning==
| |
− | Herunder ses SQL som decoder data fra Oyster GPS når det er kommet fra Loriot. Lavet ud fra denne [https://digmat.freshdesk.com/support/solutions/articles/16000066131-oyster-lorawan-integration dokumentation for dekodning af payload]. <br>
| |
− | Det er vigtigt at:
| |
− | * vælge data fra port 1, da det kun er her positioner m.m kommer ind.
| |
− | * frasorterer Adeunis test GPSer
| |
− | <syntaxhighlight lang=sql>
| |
− | CREATE OR REPLACE VIEW loriot.oyster_test AS
| |
− | SELECT row_number() OVER () AS gid,
| |
− | st_setsrid(st_makepoint(
| |
− | hex_to_int(
| |
− | concat(
| |
− | "substring"(gps.data, 15, 2),
| |
− | "substring"(gps.data, 13, 2),
| |
− | "substring"(gps.data, 11, 2),
| |
− | "substring"(gps.data, 9, 2))::character varying)::double precision / 10000000::double precision,
| |
− | hex_to_int(
| |
− | concat(
| |
− | "substring"(gps.data, 7, 2),
| |
− | "substring"(gps.data, 5, 2),
| |
− | "substring"(gps.data, 3, 2),
| |
− | "substring"(gps.data, 1, 2))::character varying)::double precision / 10000000::double precision
| |
− | ), 4326)::geometry(Point,4326) AS the_geom,
| |
− | "left"(hex_to_int("substring"(gps.data, 17, 2)::character varying)::bit(8)::text, 6)::bit(6)::integer::numeric * 5.625 AS heading,
| |
− | "right"(hex_to_int("substring"(gps.data, 17, 2)::character varying)::bit(8)::text, 1)::bit(6)::int::boolean AS in_trip,
| |
− | substring(hex_to_int("substring"(gps.data, 17, 2)::character varying)::bit(8)::text, 7, 1)::bit(6)::int::boolean AS last_fix_fail,
| |
− | hex_to_int("substring"(gps.data, 19, 2)::character varying) AS speed,
| |
− | hex_to_int("substring"(gps.data, 21, 2)::character varying) * 25 AS milivolt,
| |
− | timezone('Europe/Berlin'::text, to_timestamp((date_part('epoch'::text, gps.ts) / 1000::double precision)::integer::double precision)) AS ts,
| |
− | gps.eui
| |
− | FROM loriot.gps --Fra sorterer Adeunis test GPSer Husk port så det rigtige payload kommer ud
| |
− | WHERE gps.eui::text not in('0018B20000001313', '0018B2000000130C') AND gps.cmd::text = 'rx'::text and gps.port = 1;
| |
− | </syntaxhighlight>
| |