doubt with Computed Attributes

Anton Tananaev2 years ago

Yeah, but you need to check the binary format.

carlock2 years ago
Anton Tananaev2 years ago

Seems like there are two bits for the ignition. Not sure which one is right. And I don't see anything for the AUX cable. Are you sure the mapping is correct?

carlock2 years ago

Yes, confirmed, that's the info on each of those states of the gps and its acc and the cable

Anton Tananaev2 years ago

OK, so for the ignition you can try this ignition:

status & 1024 > 0

For the AUX cable, it seems like the device is not reporting it in the status. At least not as a dedicated flag.

carlock2 years ago

the ignition marks without problem with the normal parameters of traccar in port 5013

carlock2 years ago

the only alert that it does not detect is the auxiliary cable

Anton Tananaev2 years ago

You can try this expression:

!((status & 256 > 0) ^ (status & 1024 > 0))
carlock2 years ago

ok, I tried it in test and it tells me TRUE, two doubts, what attribute should I put in the box in this case and could you tell me how to get to that solution, it is to be able to understand more in the future

Anton Tananaev2 years ago

You put the attribute that you want it to be stored as.

carlock2 years ago

ok, basically it is the name of the category that I want that correct event to indicate to me, I was asking because it varied in boolean and chain down depending on the one I chose

Anton Tananaev2 years ago

Well, the result is boolean.

carlock2 years ago

And how does this translate, so to speak, to know how to get from 11111020 to (status & 256 > 0, that is, what it refers to, so that I can do it in the next few times

Anton Tananaev2 years ago

Read about binary number representation and read about the expression syntax.

carlock2 years ago

Regards, the attribute leaves the alarm on traccar all the time, that is, it signals it but it does so in the listing all the time and in the event it repeats it each time the car is turned on and off, remaining the same active, but I got the documentation Original direct from the distributor, here it is

https://www.mediafire.com/file/132scgag1rqiz4u/Protocol.pdf/file

this is the device

https://es.made-in-china.com/co_autoseekergps/product_4G-GPS-Tracker-at-20-with-Android-and-Ios-Apps_yssnieinyg.html

this protoocoll is for the 2g version, whit door sensor cable 3g does not have it