Changes

no edit summary
Line 41: Line 41:  
==Bluetooth Data to Server via MQTT protocol==
 
==Bluetooth Data to Server via MQTT protocol==
   −
In this section, we are going to upload Bluetooth data to server using MQTT Protocol.
+
In this section, we are going to upload Bluetooth data to server using MQTT Protocol. Prerequisites for this example:
 +
*MQTT Broker
 +
*MQTT Subscriber
 +
 
 +
You could set up MQTT Broker on Teltonika device, or use an external service as a broker. In order to subscribe to the topic, we are going to use [https://mosquitto.org/ Mosquitto] application.
 +
 
 +
===Data sender setup===
 +
----
 +
Follow these steps to configure Data to server functionality:
 +
* Navigate to '''Services -> Data to server'''
 +
* Press Add to add new data sender
 +
 
 +
[[File:Bluetootheyesensorconfiguration addnewsender v1.png|border|1000px|class=tlt-border]]
 +
 
 +
In the next screen, adjust settings accordingly:
 +
 
 +
*'''Enable''': on
 +
*'''Name''': BT_MQTT (input any preferred name) (1)
 +
*'''Data source''': Bluetooth data (2)
 +
*'''Protocol''': MQTT (3)
 +
*'''JSON format''': {"Data": "%b", "Hour": "%d"} - adjust JSON format according to your needs (4)
 +
*'''Segment count''': 1 (5)
 +
*'''URL/Host/Connection string''': 192.168.1.139 (MQTT broker address) (6)
 +
*'''Topic''': BT_data (7)
 +
* Leave everything else as default and press '''Save & Apply'''
 +
 
 +
[[File:Bluetootheyesensorconfiguration mqttdata v1.png|border|600px|class=tlt-border]]
 +
 
 +
===MQTT Subscriber setup and testing===
 +
----
 +
Follow these steps to subscribe on BT_data topic and get the Bluetooth data via MQTT:
 +
* Navigate to your '''Mosquitto''' installation folder
 +
* While holding '''Shift''' key, use '''Mouse right-click''' an press O'''pen Powershell window here'''
 +
 
 +
[[File:Bluetootheyesensorconfiguration powershell v1.png|border|300px|class=tlt-border]]
 +
 
 +
Once open, input this command to subscribe on the topic:
 +
 
 +
<pre>
 +
.\mosquitto_sub -t BT_data -h 192.168.1.139
 +
</pre>
 +
 
 +
Here '''-t''' option means topic and '''-h''' identified MQTT broker IP address.
 +
 
 +
If everything is set up correctly, you should be able to see incoming MQTT messages:
 +
 
 +
[[File:Bluetootheyesensorconfiguration mqttsub v1.png|border|1000px|class=tlt-border]]
    
==Bluetooth Data to Server using HTTP protocol==
 
==Bluetooth Data to Server using HTTP protocol==
Line 55: Line 101:  
[[File:Bluetootheyesensorconfiguration addnewsender v1.png|border|1000px|class=tlt-border]]
 
[[File:Bluetootheyesensorconfiguration addnewsender v1.png|border|1000px|class=tlt-border]]
   −
In the new screen, adjust settings accordingly:
+
In the next screen, adjust settings accordingly:
    
*'''Enable''': on
 
*'''Enable''': on
Line 70: Line 116:  
===TCP server setup and testing===
 
===TCP server setup and testing===
 
----
 
----
Since we are using Hercules application as TCP Server, the setup is simple: start the application and switch to the TCP Server tab. Make sure to listen on the same port (1) as set up in data sender configuration (8080 for this example) and you should see the Bluetooth data incoming (2).
+
Since we are using Hercules application as TCP Server, the setup is simple: start the application and switch to the TCP Server tab. Make sure to listen on the same port (1) as set up in data sender configuration ('''8080''' for this example) and you should see the Bluetooth data incoming (2).
    
[[File:Bluetootheyesensorconfiguration herculesdata v1.png|border|600px|class=tlt-border]]
 
[[File:Bluetootheyesensorconfiguration herculesdata v1.png|border|600px|class=tlt-border]]
 +
 +
==References==
 +
 +
[https://teltonika-gps.com/eye/?gclid=Cj0KCQiAw8OeBhCeARIsAGxWtUyTO_kjiPfwAv1v_4Z_r7kg9AsD3a-4dU9sbOfyGgf2uDOm4lXfefMaAgJAEALw_wcB Teltonika EYE sensor] - More information about Teltonika EYE sensor
 +
 +
[https://teltonika-gps.com/eye/?gclid=Cj0KCQiAw8OeBhCeARIsAGxWtUyTO_kjiPfwAv1v_4Z_r7kg9AsD3a-4dU9sbOfyGgf2uDOm4lXfefMaAgJAEALw_wcB Teltonika EYE beacon] - More information about Teltonika EYE beacon
 +
 +
[[RUTX11_Data_to_Server|RUTX11 Data to server]] - More information about Data to Server functionality
 +
 +
[https://wiki.teltonika-gps.com/view/EYE_BEACON_/_BTSID1#EYE_App_Configuration EYE App configuration] - Teltonika EYE App configuration
 +
 +
[https://mosquitto.org/ Mosquitto] - Mosquitto MQTT Client
 +
 +
[https://www.hw-group.com/software/hercules-setup-utility Hercules] - Hercules TCP Client / Server application

Navigation menu