ST-901 & ST-905 H02 devices going offline & online at regular intervals

Andy6 years ago

Hi,

I have an ST-901 device from SinoTrack & ST-905 device also from Sinotrack. The ST-901 device goes offline and then back online within about 10 seconds every 60 minutes almost exactly. The ST-905 device goes offline and then back online within about 30 seconds every 10 minutes almost exactly, this is during normal operation when they are active.

offline

I suspect this is a firmware fault but I doubt I will be able to get this fixed (i have contacted the manufacturer), is there a workaround in Traccar to stop the offline/online events being generated each time this happens?

If not, could the following be added as a config item?

example:

  1. entry key='offline.delay'>30</entry
  2. entry key='online.delay'>25</entry

Where 30/25 is the number of seconds.

The logic for the above config item would be as follows:

  1. When a device goes offline an offline event is not registered in Traccar until the time (30 seconds here) has passed. If the device comes back online in this time (30 seconds here) then the event is ignored. If the device does not come back online in the time then the event is registered like normal.

  2. When a device registers as coming online the event is not registered if the device sent an offline alert in the last (25 seconds in this example). The event is ignored.

I have set the <device.online> delay to less than the <device.offline> as if it is longer it won't work because the event will have already been rejected by Traccar. Or I guess config option 2 would not be needed as the device has not gone offline so it would re register as being online??

The above should mean that the short offline/online events never register and the device appears to have remained online the whole time.

I hope this makes sense!

Anton Tananaev6 years ago

Try to add "status.ignoreOffline" configuration parameter with "h02" as value (assuming that the protocol).

Andy6 years ago

Thanks Anton, that stops the repeated online/offline messaged but stops the device ever properly reporting offline & it ends up going unknown. I tried the following to force it to go to offline from unknown but it does not work:

    <entry key='status.ignoreOffline'>h02</entry>
    <entry key='status.timeout'>180</entry>
    <entry key='server.timeout'>180</entry>

I tried the h02 specific command fromhttps://www.traccar.org/forums/topic/from-unknown-to-off-line/ also.

Is there anything else I can try?

Anton Tananaev6 years ago

It should work if you are using reasonably recent version of Traccar.

Andy6 years ago

Hi Anton,

I am using the latest version of Traccar, I've double checked the config & restarted the whole server to be sure but it is still going to "unknown" (currently shows unknown 10 minutes). Any suggestions on what I can try?

<entry key='processing.copyAttributes.enable'>true</entry> 
<entry key='processing.copyAttributes'>ignition,battery,alarm</entry>
<entry key='filter.skipAttributes'>result</entry>
<entry key='filter.invalid'>true</entry>
<entry key='filter.zero'>true</entry>
<entry key='filter.duplicate'>true</entry>
<entry key='filter.maxSpeed'>25000</entry>
<entry key='filter.skipLimit'>28800</entry>
<entry key='coordinates.filter'>true</entry>
<entry key='coordinates.minError'>5</entry>
<entry key='event.motion.speedThreshold'>0.2</entry>
<entry key='status.ignoreOffline'>h02</entry>
<entry key='status.timeout'>180</entry>
<entry key='server.timeout'>180</entry>
<entry key='tcp.timeout'>600</entry>
Anton Tananaev6 years ago

I'm confused. I thought you didn't want offline status.

Andy6 years ago

Hi Anton,

I still want offline status but I want to stop the repeated offline messages I was getting due to the way the device works. The ignore offline entry stops traccar from registering online/offline events constantly which is good. But when the device finally goes offline properly because the vehicle is parked for 5 minutes it doesn't register the offline status in traccar and goes to "unknown". I want to get rid of Unknown and just have "offline".

Demetris6 years ago

Andy i believe we are in the same boat I have been trying to fix this issues a couple months now.
I currently have 300 Sinotrack ST-901 devices connected on Traccar.
This online/offline thing is really annoying. Also i believe that the fact that each device connects/disconnects every couple of minutes from the server increases the costs of data usage.

By using <entry key='status.ignoreOffline'>h02</entry> as Anton mentioned above i managed to get rid of the problem that the devices keeps going from online to offline and vice versa. I have also noticed that it won't even show in the log file which that 's strange.
I also stopped using the Last Update Column because the time that shows doesn't have anything to do with reality based on the logfile.
When i used <entry key='status.ignoreOffline'>h02</entry> i though that all my problems were gone. My devices were shown always online and when a device lost it's data connection for 10 minutes it was shown as Unknown. That was a perfect solution for me to know when a device had a problem with data connection or signal coverage problem.

BUT after some hours a very strange thing happened. Out of the blue one by one all my devices started going from Online to Unknown for no reason. I tried calling me devices and they were answering back without any problem. I then tried to restart the traccar service. After doing that all my devices came back online just fine. And after a couple of hours same thing happened, everything went Unknown.

I am still trying to figure out how to sort this out. If you have any idea or any thoughts please share it with us.

Anton Tananaev6 years ago

Andy, what you are asking is not possible. Offline means that device disconnected. You can either have it, or not have it. I don't understand how you want to identify when "device finally goes offline properly".

Demetris6 years ago

Anton any suggestion on my issue?

Anton Tananaev6 years ago

Sounds like you have an issue with your devices. Server works as expected.

Demetris6 years ago

Why do you think that server works as expected? How do you justify that? How is it possible out of the blue 300 devices to start going unknown?
Why those problems don't occure with the vendors platform? Mayby those are h02 protocol issues with traccar?

Demetris6 years ago

Or maybe a problem with my server? Is it possible the server to come to a limit that cannot serve more requests on port 5013 and start dropping connections?

Andy6 years ago

Hi Anton,

Sorry I think there may be some confusion with the way I am explaining it. I just want them to go straight to "Offline" and not Unknown.

Hi Demetris,

it may be that where your devices are leaving open TCP connections when they disconnect and then when they reconnect they open a new TCP connection, eventually the server will reach a maximum number of open TCP connections and prevent new ones from happening, forcing your devices to go offline/unknown one by one.

entry key='tcp.timeout'>6000</entry

This config parameter closes open TCP connections after a period of time, the number is the number of seconds to wait before closing the TCP connection. This is server wide and not device specific.

Out of interest, if you don't mind me asking how much is it costing in data per month per device & how often are you configuring the devices to talk to the server?

Thanks,

Andy

Anton Tananaev6 years ago

Unknown status - device hasn't reported location for certain period of time (10 minutes by default)
Offline status - network connection is closed