Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When GPS indoor, always shows Status: offline #256

Closed
nikenikw opened this issue Sep 4, 2015 · 7 comments
Closed

When GPS indoor, always shows Status: offline #256

nikenikw opened this issue Sep 4, 2015 · 7 comments

Comments

@nikenikw
Copy link

nikenikw commented Sep 4, 2015

Hi,

When my TK102-2 device was indoor,
it will always send the last valid location like below:
22015-09-02 15:31:01 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:31:01 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:31:32 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:31:32 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:31:54 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:31:54 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:32:24 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:32:24 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735

And Traccar will shows the device offline,
If possible don't let the device offline when it still sending data?

001

thank you very much!

@vitalidze
Copy link
Owner

Device is considering offline when it doesn't send data for some time period (5 minutes or 300 seconds by default, configurable in device profile). So if your device is sending positions with updated timestamps then it should not be considered offline. Maybe you have some kind of time difference with your device and desktop where you are looking into web UI?

@nikenikw
Copy link
Author

nikenikw commented Sep 4, 2015

Hi,
sorry I paste the wrong log, here is the issue log,
the device will send old location and old timestamp continuous when no GPS signal,
all the time stamps are "Wed Sep 02 15:27:32 CST 2015"

2015-09-02 15:32:54 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:32:54 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:33:23 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:33:23 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:33:53 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:33:53 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735
2015-09-02 15:34:24 DEBUG: [21E1F92C: 55002 <- 223.139.162.54] - HEX: 283032373034323933363230334252303031353039303241323435362e363730374e31323131352e31303431453030352e31303732373332302e3030303030303030303030304c303030303030303029
2015-09-02 15:34:24 INFO: device: 9, time: Wed Sep 02 15:27:32 CST 2015, lat: 24.944511666666667, lon: 121.251735

@vitalidze
Copy link
Owner

I see, then for now there is no way to find out whether device went offline or not because the web UI works only based on data stored in database. It does not know anything about connections between trackers and traccar backend server. Probably it can be took from backend somehow, but for now there is no way to improve this.

@nikenikw
Copy link
Author

nikenikw commented Sep 4, 2015

ok, I got it, thanks for your reply!

@vitalidze
Copy link
Owner

Actually latest versions of traccar (3.0 and 3.1) besides the time sent from device also store the time on server in column serverTime. I don't have such column in my model for now, but I have in plans to put same columns as in original traccar database table model. Then there will be two ways to improve the situation:

  1. Use serverTime column, which will store the time when server last recieved data from device and check whether device went offline based on that value.
  2. Integrate with traccar backend API. AFAIK it already contains method to check whether device is connected right now to the backend or not. Also this way will make possible to send command to devices from my web UI. I have it in plans as well.

@connectnet
Copy link

Also this way will make possible to send command to devices from my web UI 👍 🔝

vitalidze added a commit that referenced this issue Sep 30, 2015
vitalidze added a commit that referenced this issue Oct 15, 2015
@vitalidze
Copy link
Owner

Implemented, written news, updated latest and demo versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants