Hello everyone.
I read the forum and found no solution.
I have a Coban TK102-2-V1.06 device (port 5001).
In the traccar server application I am trying to add an attribute and an alarm about the battery level.
I found many solutions on the forum, but none of them works (six-step scale, device voltage etc.) to show me the battery level in percent.
After calling, the device sends feedback to the phone with a percentage of the battery level. Information is sent in the following values: 100, 75, 50, 25, 5 %.
So I combined the use of the following attributes and alarms:
06=100% 05=80% 04=60% 03=40% 02=20% 01=10%
4.20v = 100%
4.03v = 76%
3.86v = 52%
3.83v = 42%
3.79v = 30%
3.70v = 11%
3.60v > 0%
if (battery <=4.50 && battery >=3.65) { null; } else {'Help';}
However, none of them work ...
Here are my logs:
2021-04-15 10:48:39 INFO: [26d5e546: gps103 < 10.85.90.163] HEX: 696d65693a3836343839343033303434393232382c747261636b65722c3231303431353038343833372c2c462c3038343833372e30302c412c353330312e32303737342c4e2c30313833372e38353531
2021-04-15 10:48:39 INFO: [26d5e546: gps103 < 10.85.90.163] HEX: 322c452c302e3030302c303b
2021-04-15 10:48:39 WARN: Geocoding failed - HTTP 301 Moved Permanently - RedirectionException (...)
2021-04-15 10:49:56 INFO: [95fa4b3b: gps103 < 31.0.88.92] HEX: 696d65693a3836343839343033303435343733312c747261636b65722c3231303431353038343935342c2c462c3038343935342e30302c412c353330312e32313338312c4e2c30313833372e38383634392c452c302e3030302c303b
2021-04-15 10:49:56 WARN: Geocoding failed - HTTP 301 Moved Permanently - RedirectionException (...)
2021-04-15 10:49:56 WARN: Attribute computation error - org.traccar.handler.ComputedAttributesHandler.computeAttribute@102![0,12]: 'batteryLevel < 10? 'lowBattery' : null;' undefined variable batteryLevel - Variable (... < ComputedAttributesHandler:102 < *:113 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ...)
I noticed that after "f" there is no value of any kind ...
PS. I tried to set up reverse geocoding and it didn't work out either ... However, I don't want to give up and I learn every day thanks to the forum and trial and error methods.
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>gisgraphy</entry>
<entry key='geocoder.url'>http://services.gisgraphy.com/reversegeocoding/search</entry>
I also added a button "show address"...
I don't use the show address option too often. I saw that google has limits, but I can not set it ... and where to get the key ... if I exceed the limit, how will I know about it and how will I have to pay for it?
Do you have any ideas? Thank you very much for every suggestion. Have a nice day.
Logs actually point out both issues:
- Computed attribute error is pretty self explanatory:
undefined variable batteryLevel
- Gisgraphy redirects URL, so you have to update the URL.
Hi Anton, thank you very much for your commitment and answer.
Unfortunately I don't understand solution number "1".
Can you explain it to me somehow in detail?
Indicate what exactly they are making a mistake in and advise on an attribute ...
Unfortunately, I am a beginner and a wandering user, and you are a Master.
As for solution number "2", I will find the appropriate URL in a moment.
Unless you can advise something else? I will have a max. 1000 per month.
Regards, hold on and THANK YOU again.
Hi Anton,
I solved problem number 2 on my own. Everything works, which made me very happy.
Unfortunately, I don't understand your answer to problem number 2. It's a bit of a mystery. Do you know what attribute I would have to use?
Thank you for every tip. I do not understand why in the logs, after "f" (which applies to the battery) there are no values, data ...
PS. I am surprised that apart from you, I cannot see the involvement of other forum members. Detriment. It needs to be changed :-)
Take care.
fresh logs:
imei:864894030440000,tracker,210422053943,,F,053943.00,A,5301.16999,N,01837.86799,E,2.149,166.03;
Hi. I contacted the manufacturer and it turns out that there is no information regarding the battery in the gprs information that coban tk102-2 is sending. Strange, since the device sends this information via SMS.
Hence my question. Is it possible to add somewhere in the program such functionality that, using a SIM card in the router, make a connection to the device, and then the device would send feedback to this card?
I think it is a good solution for devices without gprs data information.
I greet you. I am counting on a reply because I can see that the forum is slowly dying out. A pity as it is a very useful tool for this amazing software.
Is it possible to add somewhere in the program such functionality that, using a SIM card in the router, make a connection to the device, and then the device would send feedback to this card?
Anything is possible, but I don't think we would implement something like that any time soon. We have a lot of more important tasks to work on. It seems like your problem can easily be solved by getting a more functional device.
Hello everyone.
I read the forum and found no solution.
I have a Coban TK102-2-V1.06 device (port 5001).
In the traccar server application I am trying to add an attribute and an alarm about the battery level.
I found many solutions on the forum, but none of them works (six-step scale, device voltage etc.) to show me the battery level in percent.
After calling, the device sends feedback to the phone with a percentage of the battery level. Information is sent in the following values: 100, 75, 50, 25, 5 %.
So I combined the use of the following attributes and alarms:
06=100% 05=80% 04=60% 03=40% 02=20% 01=10%
4.20v = 100%
4.03v = 76%
3.86v = 52%
3.83v = 42%
3.79v = 30%
3.70v = 11%
3.60v > 0%
if (battery <=4.50 && battery >=3.65) { null; } else {'Help';}
However, none of them work ...
Here are my logs:
I noticed that after "f" there is no value of any kind ...
PS. I tried to set up reverse geocoding and it didn't work out either ... However, I don't want to give up and I learn every day thanks to the forum and trial and error methods.
<entry key='geocoder.enable'>true</entry> <entry key='geocoder.type'>gisgraphy</entry> <entry key='geocoder.url'>http://services.gisgraphy.com/reversegeocoding/search</entry>
I also added a button "show address"...
I don't use the show address option too often. I saw that google has limits, but I can not set it ... and where to get the key ... if I exceed the limit, how will I know about it and how will I have to pay for it?
Do you have any ideas? Thank you very much for every suggestion. Have a nice day.