Traccar Addtional Sensor Data

huismori6 years ago

Hello all,
I am using RPi 3 that I get data from multiple sensors

What I actually what ;
So far I can send all the GPS data to traccar server and all works fine.
Additionally I want to store other sensor datas (Temperature, Humidity, IP of RPi 3, Hostname of RPi 3 and all other sensors, send all sensor data with gps location data.

and also I want to include live view of camera, I can give a link for live view such as ;
http://192.168.1.5:8000/stream.mjpg
Is it possible to embed live camera view to the front end of Traccar page, a small square iframe or something !

Thanks in advance

Ernesto Vallejo6 years ago

For additional sensor data you can send all you need and store it as attributes, including a url for live view.
Your link is at LAN level.
For live view, you can customize web app and create a new window for that.

huismori6 years ago

Thanks for reply,

I would be happy if you can explain more or give some examples about attributes and creating new window.

Thanks alot.

Ernesto Vallejo6 years ago

Do you have some previous experience with Java and Sencha ExtJS ?

huismori6 years ago

Not really but i would appreciate if you could help about it.

Ernesto Vallejo6 years ago

I would recommend you have a talk to @Anton and get a quote on your requirement. I can assure you it will be money good invested.

huismori6 years ago

Ok i will do that for camera live but, but what about attributes for additional sensor data, do I still need Java and Sencha ExtJS coding ?

Ernesto Vallejo6 years ago

You need to verify your devices protocol in java and check is doing what you need.

huismori6 years ago

Well it is using osmand protocol, so far I can send gps data and it works fine;

params = (('id', id), ('timestamp', int(time.time())), ('lat', lat), ('lon', lon), ('speed', speed))

How can I send additionally tempareture, humidity, IP, Hostname ?

Ernesto Vallejo6 years ago

Check here current Position params that OsmAnd Protocol handles. However, you can always customize at will official protocol implementation.

huismori6 years ago

OK I think I can add parameters I need in java file, what about datbase side ? will it be enough if add parameters to java file ?

Anton Tananaev6 years ago

Yes. Actually, you don't even need to change Java, unless you want to convert parameters to specific data type.

huismori6 years ago

H i Anton,

no I dont need to convert anything, bu still I dont know how to store all data I need !
I need an exampe if you can provide.

Thanks in advanced

Anton Tananaev6 years ago

Add same way as other parameters are added to the HTTP query.

huismori6 years ago

Is there any documentation for adding parameters, also can I change name of parameters as Humidity, Temperature, Ip Address, Host name ?