Hello everyone, I need to send additional information over the websocket when a new vehicle position is received.
At the moment, I've created a column in tc_positions, and I'm attempting to populate it with a select statement from another table, but it's not functioning as expected. Additionally, no error messages are being displayed.
At the moment, I'm trying to modify a newly created column in tc_positions, but none of the following approaches seem to work.
<entry key='database.insertPosition'>
INSERT INTO tc_positions (device_id, protocol, serverTime, time, valid, latitude, longitude, altitude, speed, course, address, trip)
VALUES (:deviceId, :protocol, :now, :deviceTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);
UPDATE tc_positions set trip = 'test_value' where id = :id;
</entry>
On the other hand, I'm trying to execute queries to edit fields from other tables and nothing works, nor does it show any error.
What version of Traccar are you using?
There's no such configuration parameter in 5.11.
I understand, what version should I have installed to configure the parameters?
I don't exactly understand how database query is related to sending additional data over WebSocket. Those are completely unrelated things. Even if you manage to change the database query, it won't change anything you receive through the WebSocket.
agreed!
However, now I'm asking which version I should use to perform SQL updates when new vehicle position data arrives?"
That's something you would have to figure out yourself. I don't know off the top of my head.
Hello everyone, I need to send additional information over the websocket when a new vehicle position is received.
At the moment, I've created a column in tc_positions, and I'm attempting to populate it with a select statement from another table, but it's not functioning as expected. Additionally, no error messages are being displayed.
At the moment, I'm trying to modify a newly created column in tc_positions, but none of the following approaches seem to work.
<entry key='database.insertPosition'> INSERT INTO tc_positions (device_id, protocol, serverTime, time, valid, latitude, longitude, altitude, speed, course, address, trip) VALUES (:deviceId, :protocol, :now, :deviceTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes); UPDATE tc_positions set trip = 'test_value' where id = :id; </entry>
On the other hand, I'm trying to execute queries to edit fields from other tables and nothing works, nor does it show any error.