JM-VL02 - temperature sensor

jean jose de matos 3 years ago

I have a JM-VL02 (gt06) equipment, with a temperature sensor. it is already configured to send temperature data every 60 seconds. I don't know how to get the data on traccar. Should I configure calculated attribute? if that's the case, how would i do it?

Anton Tananaev 3 years ago

If the device is sending the data and Traccar supports it, you should see it automatically. You don't need to configure anything.

jean jose de matos 3 years ago

but it's not showing the data.
I saw in the list of devices that the JM-VL02 is compatible with traccar... but it is not capturing the data from the temperature sensor..

jean jose de matos 3 years ago

Dear Anton, I finally managed to get the sending of data from the temperature sensor to work.
the manufacturer had entered the wrong command.
but now that the data is coming in I don't know how to create an alert in traccar.
I need to create an alert in the parameter "Temp1"
this is the return that appears in the socket:

[
    {
        "id": 133456,
        "attributes": {
            "temp1": 27.1,
            "distance": 0,
            "totalDistance": 4958264.34,
            "motion": false,
            "driverUniqueId": "              "
        },
        "deviceId": 57,
        "type": null,
        "protocol": "gt06",
        "serverTime": "2022-11-20T13:56:02.037+00:00",
        "deviceTime": "2022-11-20T13:56:02.037+00:00",
        "fixTime": "2022-11-20T13:19:30.000+00:00",
        "outdated": true,
        "valid": true,
        "latitude": -17.870445555555555,
        "longitude": -41.488208888888884,
        "altitude": 0,
        "speed": 0,
        "course": 231,
        "address": null,
        "accuracy": 0,
        "network": null
    }
]
Anton Tananaev 3 years ago

Does your device support an alert or do you want to generate it in Traccar? Also what alert?

jean jose de matos 3 years ago

I would like to generate it in traccar...

I didn't find any command to generate alerts in the device's documentation.

I'm also not finding this parameter when I look for a list of device data.
ex: I want to generate a graph showing the data in a certain past period.

with socket I can already generate the graph in real time

Anton Tananaev 3 years ago

You haven't answered the last question.

jean jose de matos 3 years ago

I want to generate in traccar...
when arriving for example:
Temp1 <= 25
the traccar generates an alert

Anton Tananaev 3 years ago

You can create an alarm computed attribute like this:

temp1 <= 25 ? "temperature" : null
jean jose de matos 3 years ago

great...i'll try it...
To complete my previous question...
How do I make this parameter be recorded along with the positioning?

Anton Tananaev 3 years ago

Not sure I understand the question. Computed attributes are stored in the position.

jean jose de matos 3 years ago

Anton, the attribute is being recorded.
I wasn't looking in the right place.
but I am not able to create the alert.

{{baseUrl}}/positions?deviceId=57&from=2022-11-20T10:00:05.802Z&to=2022-11-20T22:10:05.802Z

result

 "id": 138263,
        "attributes": {
            "temp1": 20.4,
            "distance": 0.0,
            "totalDistance": 4958264.34,
            "motion": false,
            "driverUniqueId": "              "
        },
Anton Tananaev 3 years ago

If you don't see it, it means it's not set up correctly or you're looking at the old data.

jean jose de matos 3 years ago

possibly yes.. but for today I already got positive results. I'm going to rest a little.
thanks again for your attention.
As soon as I get what I need, I'll post the results here again.

jean jose de matos 3 years ago

Hello.. I noticed that when querying the positions the json returns the parameter:
"fixTime": "2022-11-20T13:19:30.000+00:00",
exactly the same for all records.
different from server and device time.
where does this reference come from?
the API is based on this field to filter the period.

ex:
deviceTime : "2022-11-20T15:44:05.000+00:00",
"fixTime": "2022-11-20T13:19:30.000+00:00",
serverTime : "2022-11-20T15:44:05.000+00:00"