From d6f566008d25cc2d153b9ed13c69e411eb9ba834 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Thu, 26 Dec 2019 18:38:30 +0100 Subject: [PATCH] Create GPS-NTP-server.md --- peripherals/GPS-NTP-server.md | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 peripherals/GPS-NTP-server.md diff --git a/peripherals/GPS-NTP-server.md b/peripherals/GPS-NTP-server.md new file mode 100644 index 0000000000..5ec0f826e1 --- /dev/null +++ b/peripherals/GPS-NTP-server.md @@ -0,0 +1,74 @@ +## GPS-based NTP-server (Serial) + +The foremost reason for the inclusion of this driver was to have a network unrelated time source, but besides this location data is provided too. + +!>**Only u-blox-devices are supported** +The UBX binary protocol was chosen, because it is very memory efficient and all the needed data can be read without further parsing. The genereric NMEA-standard is NOT supported!` + +The driver is tested on a NEO-6m and a Beitian-220. Series 7 should work too. These modules are quite cheap, starting at about 3.50€ for the NEO-6m. + + +### Features: +- simplified NTP-server +- sets system time automatically and Settings.latitude and Settings.longitude via command +- get position and time data +- can log postion data with timestamp to flash with a small memory footprint of only 12 Bytes per record (!!EXPERIMENTAL!!) +- constructs a GPX-file for download of this data +- Web-UI and console command interface + +### Connecting the GPS-device to a Wemos D1 mini + +| Wemos D1 Mini | GPS | +|---|---| +|VCC +3.3V | Vin| +|GND | GND| +|TX |Rx| +|RX |Tx| + +#### Tasmota Settings +In the Configuration -> Configure Module page, select the following for Wemos D1 mini: +1. **Module Type:** 18 Generic +2. **TX GPIO1 Serial Out:** GPX_TX +3. **RX GPIO3 Serial In:** GPX_RX + +No further installation steps needed. To get more debug information compile it with option "DEBUG_TASMOTA_SENSOR". +The driver expects the device to be configured for 9600 baud, which is the default for most of these sensors. +If necessary the configuration can be changed with the freely available "u-center"-software, which is windows-only but is reported to run quite well with WINE. + +### NTP-server +Simply start the server with 'sensor60 9'. + +### Flash-Log +This is highly experimental feature, which uses the OTA-partition to log position data. +!! ⚠️ FOR OBVIOUS REASONS THIS WILL SHORTEN THE LIFE OF THE FLASH MEMORY AND SHOULD BE USED WISELY ⚠️ !! +After the first recording, a download-link will appear in the web interface. By clicking on it, a GPX-file will be created on-the fly for download. All recorded data is lost after each OTA-update. + +### Commands: ++ sensor60 0 + write to all available sectors, then restart and overwrite the older ones ++ sensor60 1 + write to all available sectors, then restart and overwrite the older ones ++ sensor60 2 + filter out horizontal drift noise ++ sensor60 3 + turn off noise filter ++ sensor60 4 + start recording, new data will be appended ++ sensor60 5 + start new recording, old data will lost ++ sensor60 6 + stop recording, download link will be visible in Web-UI ++ sensor60 7 + send mqtt on new postion + TELE -> consider to set TELE to a very high value ++ sensor60 8 + only TELE message ++ sensor60 9 + start NTP-server ++ sensor60 10 + deactivate NTP-server ++ sensor60 11 + force update of Tasmota-system-UTC with every new GPS-time-message ++ sensor60 12 + do not update of Tasmota-system-UTC with every new GPS-time-message ++ sensor60 13 + set latitude and longitude in settings