Skip to content

Commit

Permalink
Update GPS-NTP-server.md
Browse files Browse the repository at this point in the history
  • Loading branch information
blakadder authored Nov 19, 2021
1 parent 119b0ab commit ba48520
Showing 1 changed file with 40 additions and 41 deletions.
81 changes: 40 additions & 41 deletions docs/GPS-NTP-server.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
## GPS-based NTP-server (Serial)
# GPS-based NTP-server (Serial)

!!! failure "This feature is not included in precompiled binaries"

To use it you must [compile your build](Compile-your-build). Add the following to `user_config_override.h`:
```
#ifndef USE_AHT1x
#define USE_AHT1x // [I2cDriver43] Enable AHT10/15 humidity and temperature sensor (I2C address 0x38) (+0k8 code)
#endif
```
----

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.

!!! info "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:
## 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
## Connecting the GPS-device to a Wemos D1 mini

| Wemos D1 Mini | GPS |
|---|---|
Expand All @@ -25,7 +37,7 @@ The driver is tested on a NEO-6m and a Beitian-220. Series 7 should work too. Th
|TX |Rx|
|RX |Tx|

### Tasmota Settings
## 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
Expand All @@ -35,46 +47,33 @@ No further installation steps needed. To get more debug information compile it w
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 and can be confirmed to work with CrossOver on macOs Catalina.

### NTP-Server
## NTP-Server
Simply start the server with 'sensor60 9'.

### Flash-Log
## 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
+ sensor60 14
open virtual serial port over TCP, usable for u-center:
tcp://ip-address:port (default port: 1234)
!! ⚠️ misconfiguration via u-center can virtually brick the device ⚠️ !!
+ sensor60 15
pause virtual serial port over TCP (connection stays active in the background)
## Commands

| Command | Description |
|---|---|
| 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 |
| sensor60 14 | open virtual serial port over TCP, usable for u-center<br>tcp://ip-address:port (default port 1234)<br>⚠️ misconfiguration via u-center can virtually brick the device ⚠️ |
| sensor60 15 | pause virtual serial port over TCP (connection stays active in the background) |

0 comments on commit ba48520

Please sign in to comment.