Giter Club home page Giter Club logo

gw's Introduction

OwnTracks

OwnTracks allows you to keep track of your own location. You can build your private location diary or share it with your family and friends. OwnTracks is open-source and uses open protocols for communication so you can be sure your data stays secure and private.

To get started, install OwnTracks on your smartphone. Afterwards you can connect it to an existing server straight away or follow the guide in our Documentation to set up your own.

Documentation

Build Status

gw's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gw's Issues

Hangup MqttException

org.eclipse.paho.client.mqttv3.MqttException

  • org.eclipse.paho.client.mqttv3.internal.MqttDeliveryTokenImpl.waitForCompletion(), bci=60
  • general.MQTTHandler.publish(), bci=68
  • general.SocketGPRStask.run(), bci=952

TLS support

  • tcp://host:1883 without TLS works well!
  • ssl://host:8883
    OpenSSL Error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
  • ssl://host:8886 (tls_verision tlsv1)
    OpenSSL Error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol
  • ssl://host:8887 (tls_verision tlsv1.1)
    OpenSSL Error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
  • ssl://host:8888 (tls_verision tlsv1.2)
    OpenSSL Error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

Add pub to hw/IMEI

The default clientID is the IMEI number, but that can be overriden by a user-defined value. $dump reports the IMEI, but that is almost impossible to parse (as well as dumping loads of additional info).

I'd like to request that we publish the device's IMEI number upon startup:

.../hw/imei 1234567890

This is useful for 'inventory' purposes.

Monitoring

I'd like to propose a feature which is easy to implement and would aid in monitoring device status, interesting in particular when we have several devices.

Can we publish to .../status a retained 1 when the device first comes online, coupled with a default retained LWT of 0 when it goes away?

Remove 'batt' from JSON payload?

Should we remove the batt level from the JSON payload for GW devices? It's mostly the same value, and if the battery does die (it happened to my first device) the device probably won't do much anyway ... Saves a few bytes, in particular as the information doesn't seem really valuable.

cmd/gps is reported twice

I published a /cmd gps to the device, whereupon I get

owntracks/GWBUS-ak {"_type":"location","t":"m", ... }
owntracks/GWBUS-ak/cmd/out ACK: command: "gps" {"_type":"location","t":"m", ...}

The first message is expected.
The second isn't. Bug?

^EXIT repeating

Running OwnTracks Choral 0.5.13
AppMain: watchdog starting
AppMain: Recover system settings in progress...
AppMain: Last closing of application: ResetHW
AppMain: STATOexecApp is PostResetExecution
AppMain: Set AUTOSTART...
AppMain: wakeupMode is 1
AppMain: SWITCH ON RADIO PART of the module...
>
^SHUTDOWN

^EXIT 0007000b,03516a6e665f6174436f6d6d616e645f676b692e632c4572726f722067657420726573706f6e73652048572c206e6f2064617461207265616420283029
^SYSSTART
Running OwnTracks Choral 0.5.13
AppMain: watchdog starting
AppMain: Recover system settings in progress...
AppMain: Last closing of application: ResetHW
AppMain: STATOexecApp is PostResetExecution
AppMain: Set AUTOSTART...
AppMain: wakeupMode is 1
AppMain: SWITCH ON RADIO PART of the module...
>
^SHUTDOWN

^EXIT 0007000b,03516a6e665f6174436f6d6d616e645f676b692e632c4572726f722067657420726573706f6e73652048572c206e6f2064617461207265616420283029
^SYSSTART
Running OwnTracks Choral 0.5.13
AppMain: watchdog starting
AppMain: Recover system settings in progress...
AppMain: Last closing of application: ResetHW
AppMain: STATOexecApp is PostResetExecution
AppMain: Set AUTOSTART...
AppMain: wakeupMode is 1
AppMain: SWITCH ON RADIO PART of the module...
>
^SHUTDOWN

^EXIT 0007000b,03516a6e665f6174436f6d6d616e645f676b692e632c4572726f722067657420726573706f6e73652048572c206e6f2064617461207265616420283029
^SYSSTART

Remote MQTT Commands

subscribe to .../cmd topic
execute commands:

  • set parameters
  • report location now
  • reboot

CR in topic name / settings

0000460    0   0   0   *   1   9  \n   o   w   n   t   r   a   c   k   s
0000500    /   x   x   x   x   x   /  \r   G   W   B   U   S   -   a   k
0000520   \r   /   r   a   w       $   C   H   X   ,   3   5   6   6   1

Add OwnTracks Parameters

  • minDistance minimum distance travelled before next location is published in meters, default 0
  • maxInterval maximum time interval before next location is published in seconds, default 0
  • retained publish locations with retained flag, 0/1, default 1
  • qos publish locations with quality of service 0..2, default 1

SSLSocketFactory IOException unrecoverable error

2014-08-25 12:38:59 E SSLSocketFactory IOException
2014-08-25 19:56:26 E SSLSocketFactory IOException
2014-08-25 21:25:45 E SSLSocketFactory IOException
2014-08-25 21:42:29 E SSLSocketFactory IOException
2014-08-25 21:43:15 E SSLSocketFactory IOException
2014-08-25 21:44:00 E SSLSocketFactory IOException
2014-08-25 21:44:45 E SSLSocketFactory IOException
2014-08-25 21:45:30 E SSLSocketFactory IOException
2014-08-25 21:46:15 E SSLSocketFactory IOException
2014-08-25 21:47:00 E SSLSocketFactory IOException
2014-08-25 21:47:45 E SSLSocketFactory IOException
2014-08-25 21:48:30 E SSLSocketFactory IOException
2014-08-25 21:49:15 E SSLSocketFactory IOException
2014-08-25 21:50:00 E SSLSocketFactory IOException
2014-08-25 21:50:45 E SSLSocketFactory IOException
2014-08-25 21:51:30 E SSLSocketFactory IOException
2014-08-25 21:52:15 E SSLSocketFactory IOException
2014-08-25 21:53:00 E SSLSocketFactory IOException
2014-08-25 21:53:45 E SSLSocketFactory IOException

2014-08-25 21:54:30 E SSLSocketFactory IOException
2014-08-25 21:54:30 W MQTTHandler connectToBroker: 32103
2014-08-25 21:54:33 W MQTTHandler disconnect: 32101

Version 'number' in payload

I think we need a short (!) version number in the payload, maybe not in each and every PUBblish, but upon request? Something that enables an operator to determine whether his devices are up to date.

Distance calculation "dist": obviously wrong or inaccurate

dist is given in meters since last reboot ("t": = "f").

Positive example:
vehicle ey travels at 97 km/h and reports ~3300 m distance every 120 seconds

ey: {... "tst":"1408524280","vel":"97.830048","dist":"607591"...}
ey: {... "tst":"1408524400","vel":"97.678184","dist":"610864"...}
ey: {... "tst":"1408524520","vel":"97.594844","dist":"614137"...}

Negative example:

vehicle car travels at ~138 km/h and reports ~ 120 m distance every 120 seconds

car: {..."tst":"1408506896","vel":"131.762392","dist":"24140"...}
car: {..."tst":"1408506957","vel":"137.786948","dist":"24267"...}
car: {..."tst":"1408507018","vel":"144.976412","dist":"24390"...}

Incorrect operator value in $state command output

$state
ACK: NUMSAT:7;BEARER:3;CREG:-1;CGREG:-1;BATT:4.467;EXTV:12.275;gpsQ:0;sending:true;network:true;operator:"Vodafone.de"

OK
;uFW:02.18,02.01,02.16;SW:0.5.89;EG5:Cinterion,EGS5-X,REVISION 02.004;IMEI:356612027383852

should be:

>$state
ACK: NUMSAT:7;BEARER:3;CREG:-1;CGREG:-1;BATT:4.467;EXTV:12.275;gpsQ:0;sending:true;network:true;operator:"Vodafone.de";uFW:02.18,02.01,02.16;SW:0.5.89;EG5:Cinterion,EGS5-X,REVISION 02.004;IMEI:356612027383852

Incorrect timestamp in tst

A few seconds ago, at Wed Jul 30 08:47:09 UTC 2014:

"tst":"1406753195"

which translates to Wed Jul 30 22:46:35 2014, which is several hours hence

Commands Harmonisation

Current status:

$-commandos - available auf MQTT/cmd, RS232

login
logout
set
reboot
dump
gps

#-commandos - available on RS232

PWD
REBOOT
CFG
CHPWD
SETID
GPRSCFG
POSREP
POSUSR
PUBTOPIC
SETINSENSIBILITAGPS
SIG
SLPTM
TRK
TRKCFG
SETSPEED
TRKTM
LOGREAD
EE_GET_PTR

#-commandos available on Modem-CSD (ATA...ATH)

CLOSE
LOGREAD
LOGQUEUE
OLDLOGREAD
LOGDELETE
PWD
REBOOT
CFG
CHPWD
SETID
GPRSCFG
POSREP
POSUSR
SIG
SLPTM
TRK
TRKCFG
TRKTM
SETINSENSIBILITAGPS
SETSPEED
EE_GET_PTR

SMS commandos - listening on SMS

gps
reboot
state

NPE after $destroy

>$destroy
AppMain: destroyApp
AppMain: powerDown from NormalExecution
AppMain: powerDown @ last fix time Fri Aug 15 18:14:31 UTC 2014
execute Command: at+cclk="14/08/15,18:14:31"
commandResponse: at+cclk="14/08/15,18:14:31"
OK

ATListenerEvents:
+CALA:

AppMain: powerDown @ Fri Aug 15 18:14:31 UTC 2014
AppMain: powerDown setting wakeup call for Fri Aug 15 23:14:31 UTC 2014
execute Command: at+cala="14/08/15,23:14:31"

Uncaught exception: java.lang.NullPointerException:   0
- general.AppMain.destroyApp(), bci=633
- general.CommandProcessor.perform(), bci=252
- general.CommandProcessor.execute(), bci=260
- general.CommASC0Thread.run(), bci=164

 commandResponse: at+cala="14/08/15,23:14:31"
OK

Please rename 't':'p'

't':'p' is also emitted by iOS devices on 'ping'; can we please change this to 'k' (parK) or something?

Reasoning: In order to suppress 'p'ings from iOS, m2s queries the value of 't' (there's no other way I can check for pings), and this would suppress park messages from greenwich devices.

Round velocity to 1 decimal for $gps

The JSON payload of vel is fine as it is, but for the gps SMS, I'd suggest rounding velocity/speed to a single decimal point. The potentially long decimal is overkill and potentially causes truncation of the following text.

After power up / power down, device does not reconnect to MQTT broker

GPS fix is ok (red light and $state)
Network is available (yellow light blinking twice and $state)

MQTTconnect returns 32103=Unable to connect to server

Can only be solved by HW reset

a) find reason for problem
hint: at+cgatt=1 returns ERROR

b) add timeout for 32103 and use GPIO Watchdog to reset device

Make dist integer

I'm seeing dist as a fractional number with about a million decimal places in the SMS (but not in the JSON payload). This is unnecessary (they are meters) and it consumes valuable space in the gps SMS.

M2M and publishes

(I warned you I'd think up evil stuff during your vacation!)

In view of limiting data (M2M etc.) I'm thinking whether we could add some intelligence to the number of MQTT publishes that occur. For example:

  • Quiet time (a.k.a. parked hours). Configurable time frame (22:30 - 06:45) during which the Greenwich should not publish at all, or maybe once an hour only.
  • Dynamic speed. We currently have minDist and minSpeed, but supposing we have minDist=100 and we're driving at 100 km/h, this will cause lots of publishes. If we can detect we're going over a certain speed, we could dynamically increase the minDist, thereby lowering number of publishes but still having dynamic maps update rather frequently.

Something we should consider as enhancement, I'd say.

Connection Lost when lowering the frequence of location publish

Using maxInterval and minDist, in my test setup the gw does sent every 3 minutes one publish.
It issues the PINGs every keepAlive (default 60) seconds. But now looses the connection.

Will try with keepAlive = 30.

Is there any timeout parameter on the GPRS connection?

Reduce reporting of external battery voltage

Currently voltage is reported when changes > 0.1V happen. Better use 0.5V or make this configurable. As internal battery is more stable, 0.1V seems to be a good reporting level.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.