doubt with Computed Attributes

carlocka year ago

Greetings, I have some gps at20 it uses h02 port similar to sinotrack, but it has an additional cable to use in hood doors, trunk or extras, I understand that I must place a commputed attribute to that value but the truth is I have carried out several tests and I am lost, Can someone advise me, I attach the values that the GPS gives me

with acc on, and extra cable unplugged to gorund

"channel.id":1149957,
"engine.ignition.status":true,
"ident":"*******",
"message.type":"V1",
"peer":"***********",
"position.direction":216,
"position.latitude":-34.777735,
"position.longitude":-58.209237,
"position.speed":0,
"position.valid":true,
"protocol.id":291,
"server.timestamp":1676299447.616004,
"timestamp":1676299446,
"vehicle.state":"FFFF9FFF",
"vehicle.state.bitmask":4294942719,
"vendor.code":"HQ"} 

wuth acc on and extra cable conected to gorund

channel.id : 1149957
engine.ignition.status : true
ident : "******"
message.type : "V1"
peer : "*******"
position.direction : 216
position.latitude : -34.777747
position.longitude : -58.20922
position.speed : 0
position.valid : true
protocol.id : 291
server.timestamp : 1676304541.210723
timestamp : 1676304540
vehicle.state : "FFFF9EFF"
vehicle.state.bitmask : 4294942463
vendor.code : "HQ"

witch acc off and extra cable conected to gorund

channel.id : 1149957
engine.ignition.status : false
ident : "******"
message.type : "V1"
peer : "*********"
position.direction : 247
position.latitude : -34.777715
position.longitude : -58.209262
position.speed : 0.24
position.valid : true
protocol.id : 291
server.timestamp : 1676308026.171687
timestamp : 1676308025
vehicle.state : "FFFFBAFF"
vehicle.state.bitmask : 4294949631
vendor.code : "HQ"

withc acc off and extra cable disconected to gorund

channel.id : 1149957
engine.ignition.status : false
ident : "******"
message.type : "V1"
peer : "*************"
position.direction : 279
position.latitude : -34.777738
position.longitude : -58.209297
position.speed : 3.54
position.valid : true
protocol.id : 291
server.timestamp : 1676309712.110729
timestamp : 1676309702
vehicle.state : "FFFFBBFF"
vehicle.state.bitmask : 4294949887
vendor.code : "HQ"
}

thank you

Anton Tananaeva year ago

What are these parameters? It doesn't look like it's from Traccar.

carlocka year ago

its the translated protocoll, i flespi to see it give a minute i post the parameters as it comes directly from the gps

Anton Tananaeva year ago

I'm assuming you want to extract some bits from the status. It should be possible with computed attributes. What we would would need to help you is the protocol documentation describing the bitmask and list of the values you want to extract. Make sure that your parameters are available in the doc.

carlocka year ago

these are the lines in original, as soon i get the documentation ill pot it here, it works great on 5013 the only thing that not works is that aditional cable

with acc on, and extra cable unplugged to ground

2A48512C393137313837373735302C56312C3134343430362C412C333434362E363634312C532C30353831322E353534322C572C3030302E30302C3231362C3133303232332C46464646394646462C3732322C33342C353036312C343634323423

wuth acc on and extra cable conected to ground

2A48512C393137313837373735302C56312C3136303930302C412C333434362E363634382C532C30353831322E353533322C572C3030302E30302C3231362C3133303232332C46464646394546462C3732322C33342C353036312C343634323423

witch acc off and extra cable conected to ground

2A48512C393137313837373735302C56312C3137303730352C412C333434362E363632392C532C30353831322E353535372C572C3030302E31332C3234372C3133303232332C46464646424146462C3732322C33342C353036312C343634323423

withc acc off and extra cable disconected to ground

2A48512C393137313837373735302C56312C3137333530322C412C333434362E363634332C532C30353831322E353537382C572C3030312E39312C3237392C3133303232332C46464646424246462C3732322C33342C353036312C343634323423
Anton Tananaeva year ago

Even based on the samples you can probably figure out which bits are used for what in the status.

carlocka year ago

I have a week trying everything I can think of and no good results, I admit that this is surpassing me

Anton Tananaeva year ago

What have you tried exactly? I think if you provide full details on your investigation so far, we can try to point you in the right direction.

carlocka year ago

formulas and combinations of true / false based on the state that I see in detail of the equipment and that (it seems) coincide with the information that the gps line gives me when changing the cable, but it has given me arid errors, I know that for the expert eye must be nonsense,

Anton Tananaeva year ago

Before trying to create any computed attributes you have to figure out which bit represents what in the status field. Have you done that? If not, that's what you need to do first. Take your samples, take the status value, convert it into binary and check the difference. Once you have that information, post it here and we can try to help with the expression to use. Of course if you're still interested.

carlocka year ago

you mean here? vehicle.state : "FFFFBAFF? or here vehicle.state.bitmask : 4294949887 o in the original line

Anton Tananaeva year ago

Yes.

carlocka year ago

in the three parts or in the one that is shown in the traccar details that would be vehicle.state.bitmask: 4294949887

Anton Tananaeva year ago

Those are the same. Value FFFFBBFF (hexadecimal) is 4294949887 (decimal).

carlocka year ago

would this be then?

https://ibb.co/LptHJzj