Skip to Content
Author's profile photo Rui Nogueira

RaspberryPi on SAP HCP – IoT blog series part 3: Sending sensor data from Raspberry Pi to your cloud-app

In the second blog post of this blog post series around Raspberry Pi and the SAP HANA Cloud Platform we’ve taken care of the receiving part in the cloud. If you’ve followed the instructions in the blog post you have now an app running on your free developer account which can receive sensor data and persist it and provide some output in JSON format for the user interface.

In this blog post we’ll now look into the code for the Raspberry Pi and will connect an external temperature sensor to our Raspberry Pi. That code will be sending the temperature data from the CPU inside the Raspberry Pi as well as the temperature from the external temperature sensor.

Screen+Shot+2014-11-12+at+14.20.26.png

Table of Contents

But first thing first. Let’s first tackle some hardware challenges.

Connecting the external sensor

This is the part where you need to have solding skills (or know somebody who has). Follow the instructions on this blog under the section “

Step Two: Connecting the Temperature Sensor” and connect your sensor to your Raspberry Pi.

CAUTION:

Please be aware that this is hardware-stuff which actually can react in a physical way like getting hot, explode, burn you, etc.. So you either know what you are doing, find someone who can do it, buy it somewhere ready-made or just leave it. You do this at your own risk (which you’ve probably know before anyways, but just mentioning it here, so you don’t forget while reading 🙂

The Java app for the Raspberry Pi

You can find the code for your Raspberry Pi in the file I’ve attached to this blog post.

Just unzip it on your machine and open a console to connect to your Raspberry Pi like I’ve described in my first blog post of this series.

After logging-in to your Raspberry Pi change the current directory to the folder you’ve created for your scripts. If you did it, like I’ve done it, you’ll switch to your myscripts folder.

cd /home/pi/myscripts

The next thing we do is to create the app on the Rasperry Pi. To create the corresponding Java file we create a file called Temperature.java with the text editor nano.

nano Temperature.java

Your window should look more or less like this:

Screen Shot 2014-11-21 at 17.07.11.png

Now copy the content of the file you’ve extracted before on your machine into your clipboard. Switch back to the console with the opened nano editor and paste the clipboard into the window.

Screen Shot 2014-11-21 at 17.08.44.png

Now press the command and X key and the editor will ask you to either press Y to save the file or N for not doing it. Press Y and hit the return key to save the file.

Screen Shot 2014-11-21 at 17.11.17.png

Before you can move forward you need to adapt the code so it works with your account. So let’s open the Temperature.java file again in nano

nano Temperature.java

Check proxy

First thing you need to do is adapt the USEPROXY variable in the Temperature.java file. Set it to false if you are working from home, as most probable you don’t use a proxy server at home. If you do have a proxy server for accessing the internet, set it to true.

Adapt URL of Java app on your SAP HANA Cloud Platform account

Now look into the variable called SERVLET_URL_cloud and change it to the URL of your application that you’ve deployed in the second blog post of this series.

Get Hardware ID of the external temperature sensor (optional)

In case you want to use the values of the external temperature sensor, you need to find out it’s ID before. To do that you should ensure you’ve added the modules for the sensors as described in the first blog post and also connect the sensor to the Raspberry Pi as described above.

Now move to the folder /sys/bus/w1/devices/ and search for a subfolder there called 28-xxxxxxxxxxx. That folder name is the id of your sensor.

ls /sys/bus/w1/devices/

If you don’t get any results or an error message saying “No such file or directory” you’ve either not connected the external sensor, or you’ve connected it wrongly to your Raspberry Pi.

Once you have the id of your sensor you need to assign it to the variable called SENSOR_HARDWARE_ID in your Temperature.java file.

Assign DB id’s of sensors to the ones on your Raspberry Pi

In the past blog post you’ve already created at least one sensor in your database. What you need to do now is to get the database ids for 2 sensors. So if you haven’t done, yet, create at least two sensors in your app like described in the past blog post.

If you call your app you should see something like this

Screen Shot 2014-11-21 at 17.44.25.png

Take the number after the “id” field and assign them in your code to the variables SENSOR_DB_ID_CPU_TEMP and SENSOR_DB_ID_TEMP_SENSOR.

Compile the Temperature.java file

After doing all the changes you need to save the file in nano. Now you need to compile the file. To do that enter this command in your myscript folder:

javac Temperature.java

Should you get an error message you might have messed-up the code. Try again 🙂

If there are no errormessages a new file was created called Temperature.class. Check it by listing up the files in your myscript folder:

ls -l

Send your sensor data to your app on SAP HANA Cloud Platform

The last thing missing now is to actually run the app. To do it simply we call the Java app like this

java Temperature 10

The 10 at the end tells the app that it should iterate through the app 10 times.

Screen Shot 2014-11-21 at 17.58.22.png

If everything worked fine you should now be able to see the sent sensor data in your Java app on your account.

Screen Shot 2014-11-21 at 17.59.32.png

Next Steps

Now that we have worked on the hardware side of this, we’ll work on the user interface to provide a nice looking dashboard for Rui’s Fish Import/Export Inc..

Screen+Shot+2014-11-12+at+14.20.26-1.png

That’s what we’ll do in the next blog post.

Have fun.

Best,

Rui

Assigned Tags

      24 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo P. Lans
      P. Lans

      Received the sensors. Solding and connecting them is for the weekend.

      Curious to see what will happen

      Author's profile photo P. Lans
      P. Lans

      It's up and running.

      I had fun putting it together.

      Looking forward to the next parts.

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      Congratulations! More blog posts coming soon.

      Best,

      Rui

      Author's profile photo Former Member
      Former Member

      Perfect Step-by-Step tutorial.

      Here is my result:

      Screen Shot 2014-12-04 at 11.29.28 PM.png

      Note: You don't have to solde the components:

      /wp-content/uploads/2014/12/unnamed_601721.jpg

      Cheers,

      Fouad

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      Cool to to see this up and running on your side.

      Very adventurous setup of your temperature sensor 🙂

      Best,

      Rui

      Author's profile photo Robert Eijpe
      Robert Eijpe

      Hi Rui,

      I'm also following the scenario and it works well. Hopefully we will see the next blogs soon.

      I use the eclipse plugin LaunchPI to run and debug the PI application directly from Eclipse.

      This works very easily without to code on the pi.

      Best

      Robert

      Author's profile photo Michael Liebeskind
      Michael Liebeskind

      Hi,

      It's a great project!!

      I adapted the Raspberry piece a bit by using  Python and send the URL request to add data via that way. This makes a maybe a bit easier.

      Best,

      Michael

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      Nice. That's exactly what I intended with this blog post series: people start modifying the code and adapt it to their needs and their know-how.

      Hope you're having fun with this series.

      Best,

      Rui

      Author's profile photo Hendrik Hilger
      Hendrik Hilger

      Hi Michael, We also try to send an URL request to add data from Python. Can you tell us, what kind of security/Authentication you used? We successfully test with postman, but having trouble with sending the request from the Raspberry Pi.

      Thank you,

      Hendrik

      Author's profile photo Michael Liebeskind
      Michael Liebeskind

      Hi Hendrik,

      I didn't use anything special in terms of security or authentication. I simply used the urllib2. from python and built the ULR string as per the tutorial.  I started the script via sudo and used & to make it run in the background with sudo authorization. You can find the code including some streamer logging here: https://github.com/mliebski/Sensors/blob/master/temp_logging.py

      I found that even easier than using JAVA.

      Cheers,

      Michael

      Author's profile photo P. Lans
      P. Lans

      Hi Rui,

      I challenged myself. I altered the programs in order to be more flexible.

      The program running on the Raspberry Pi now first reads the cpuinfo file, located in the /proc directory and retrieves the serial number of the Pi. This is used as hardware ID.

      It then checks on HCP if the sensor is known. If not, it asks for a device name and description, stores this at HCP and requests the ID on HCP.

      Same for the external sensor(s). I managed to connect 5 of them to the Pi.

      It reads the directory /sys/bus/w1/devices and searches for directories starting with “28-“, the id’s of the temperature sensors and uses the name as hardware ID.

      After that, the program runs as usual, sending the readings of the connected sensors to the cloud.

      As I am not a java-developer, it took me a long time to figure it all out. It is probably not the best or most elegant solution, but it works 🙂 .

      In order to retrieve the json information coming back from the cloud, I used the json-simple libraries (couldn’t get the gson-lib working). These can be found at https://code.google.com/p/json-simple/

      For those interested in my solution, the eclipes-projects can be found here:

      https://onedrive.live.com/?cid=55CEDAAF12202C3F&id=55CEDAAF12202C3F%21116

      - Pi_onHCP is the cloud project

      - pi_sensors the application for the Pi

      Now on to the dashboard....

      Kind regards,

      Peter Lans

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      Hi Peter, nicely done. I've actually done similar things, too, like the automatic detection of sensors and the Pi serial number. You'll also see a few more things in next blog posts from me.

      Meanwhile have fun playing with HCP and the Raspberry Pi.

      Best,

      Rui

      Author's profile photo Former Member
      Former Member

      Hi there!

      I got stuck with sending data from Raspberry PI to HCP. The error msg the PI is giving is "401 <html><head><title>Error report</title></head></body><h1>HTTP Status 401 -..."

      Config.py and insert.py files are in place and I could not find any issue from there. Any ideas what might be the cause?

      Author's profile photo Michael Liebeskind
      Michael Liebeskind

      Hi,

      the 401 error codes indicates that the HCP site asks for authentication to open the called page. Did you set it up that way? If yes, the URL string needs to contain the authorization details.

      Regards,

      Michael

      Author's profile photo Former Member
      Former Member

      Hi,

      thanks! I got the issue solved, authorization token was the problem.

      Olli

      Author's profile photo Former Member
      Former Member

      Hi Olli,

      Can you tell me how did you pass the authorization token?

      I am facing the same problem.

      Author's profile photo Former Member
      Former Member

      Hi,

      Thank you for the tutorial, it works like a charm. I was wondering, is there a way to export the data from the app to an excel/txt so I can analyse it using SAP Predictive Analytics?

      Author's profile photo Former Member
      Former Member

      Hi,

       

      Thank you Rui.

      A very detailed and interesting step by step explanation.

      Unfortunately, I cannot find the Java App for R Pi attached,

      Can you please share that.

      Author's profile photo Former Member
      Former Member

      Hi Rui and community,

      I am looking for the file Temperature.java  ... attached to this blog post ... Where can I find that file?

      Thanks!

       

      Author's profile photo Former Member
      Former Member

      Hey Rui and Community,

      I am also looking for the Temperature.java file.

      Can anyone please share it?

      Would be awesome, i want to finish this great tutorial! 🙂

       

      Regards,

       

      Nadine

      Author's profile photo Tom Van der Beken
      Tom Van der Beken

      Hello, is it possible to post the code for Temperature.java? I really need this for my school project. Thanks in advance!

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      See my comment below. Let me know in case it doesn't work. If it does, I expect a picture from your school project here in this blog post 🙂

      Best,

      Rui

      Author's profile photo Tom Van der Beken
      Tom Van der Beken

      After a long time of trying, the code didn't work. The solution is that I wrote a python script which reads the data from the sensor and calls the webservice with the data.

      Author's profile photo Rui Nogueira
      Rui Nogueira
      Blog Post Author

      Hi all, here's the content of the Temperature.java file that I found on my laptop. Hope it's the right version. Still amazed to see that many take this blog post series to do some experiments with SAP Cloud Platform.

      Best,

      Rui

      import java.io.BufferedReader;
      import java.io.DataOutputStream;
      import java.io.IOException;
      import java.io.InputStream;
      import java.io.InputStreamReader;
      import java.math.BigDecimal;
      import java.math.RoundingMode;
      import java.net.URL;
      import java.nio.charset.Charset;
      import java.nio.file.Files;
      import java.nio.file.Paths;
      import java.util.ArrayList;
      import java.util.Date;
      import java.util.List;
      import java.util.Properties;
      import java.util.Random;
      
      import javax.net.ssl.HttpsURLConnection;
      
      import org.apache.commons.io.IOUtils;
      
      public class Temperature {
      
      	// Set this to true if you are working behind a proxy server.
      	// If you are working from home you should set this most probable to false
      	public static boolean USEPROXY = true;
      	// Add your account id here
      	// Get the devide ID and the OAuth Token from the Device List in your
      	// IoT Services Cockpit
      	public static String MY_ACCOUNT_ID = "d045023trial";
      	public static String MESSAGETYPE_ID = "09da26c5b800dde65133";
      	public static String DEVICE_1_ID = "5ea0541b-2b1d-4122-a2c1-e4faedba6c1c";
      	public static String DEVICE_1_TOKEN = "9737e9bd8ef523c2265efa9e4e99978";
      
      	public static void main(String args[]) {
      		String repeatString = null;
      
      		if (args.length > 0) {
      			repeatString = args[0];
      		} else {
      			repeatString = "10";
      		}
      		int repeats = Integer.parseInt(repeatString);
      
      		List<DevicesDTO> devices = getDevices();
      
      		for (int i = 0; i < repeats; i++) {
      			// send data every 2000ms
      			try {
      				Thread.sleep(4000);
      			} catch (InterruptedException ie) {
      				// Handle exception
      			}
      			// System.out.println("Loop " + (i + 1));
      			// long timestamp = System.currentTimeMillis();
      			// double sensorTemperature = getOnboardTempSensor();
      			// double sensorTemperature = getRandomValue(-5, 5);
      			for (int j = 0; j < devices.size(); j++) {
      				String bodyMessage = buildBody(MESSAGETYPE_ID, devices.get(j));
      				sendToCloud(bodyMessage, devices.get(j), String.valueOf(i + 1));
      				
      				try {
      					Thread.sleep(2000);
      				} catch (InterruptedException ie) {
      					// Handle exception
      				}
      			}
      
      			// sensorTemperature = getRandomValue(-5, 0);
      			// sensorTemperature = getOnboardTempSensor();
      			// sensorTemperature = getOneWireSensor("28-0000060a4638");
      			// bodyMessage = buildBody(MESSAGETYPE_ID, sensorTemperature,
      			// timestamp);
      			// sendToCloud(bodyMessage, DEVICE_2_ID, DEVICE_2_TOKEN ,
      			// String.valueOf(i + 1));
      		}
      	}
      
      	// Creates random value within give limits
      	private static double getRandomValue(double min, double max) {
      		Random r = new Random();
      		double value = min + (max - min) * r.nextDouble();
      
      		// Round up the value to 2 decimal places
      		// E.g. will make out of 1.42342232 a 1.42
      		BigDecimal bd = new BigDecimal(value);
      		bd = bd.setScale(2, RoundingMode.HALF_UP);
      		return bd.doubleValue();
      
      	}
      
      	private static String buildBody(String messageType, DevicesDTO device) {
      		String body = "{";
      		body += buildJson("mode", "async") + ",";
      		body += buildJson("messageType", messageType) + ",";
      		body += '"' + "messages" + '"' + ":[";
      
      		String messageContent = "{";
      		messageContent += buildJson("timestamp", new Date().getTime()) + ",";
      		messageContent += buildJson("latitude", device.getLatitude()) + ",";
      		messageContent += buildJson("longitude", device.getLongitude()) + ",";
      		messageContent += buildJson("temperature", getRandomValue(4, 10)) + ",";
      		messageContent += buildJson("cansIn", (int) getRandomValue(0, 10)) + ",";
      		messageContent += buildJson("cansOut", (int) getRandomValue(1, 200)) + ",";
      		messageContent += buildJson("compressorRate", (int) getRandomValue(1000, 1200));
      		messageContent += "}";
      
      		body += messageContent;
      		body += "]";
      
      		body += "}";
      
      		return body;
      	}
      
      	private static void sendToCloud(String body, DevicesDTO device, String loop) {
      
      		// long sensorTimestamp = System.currentTimeMillis();
      		String iotServiceMainLink = "https://iotmms" + MY_ACCOUNT_ID + ".hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/http/data/";
      		String url = iotServiceMainLink + device.getId();
      
      		byte[] postData = body.getBytes();
      
      		setProxy(USEPROXY);
      
      		try {
      			URL obj = new URL(url);
      			String responseMessage = "<NONE>";
      			// System.out.println(" Calling url " + url);
      
      			HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
      			con.setDoOutput(true);
      			con.setInstanceFollowRedirects(false);
      			// add request header
      			con.setRequestMethod("POST");
      			con.setRequestProperty("Content-Type", "application/json;charset=utf-8");
      			con.setRequestProperty("Authorization", "Bearer " + device.getToken());
      
      			// Send post request
      			con.setDoOutput(true);
      			DataOutputStream wr = new DataOutputStream(con.getOutputStream());
      			wr.write(postData);
      			wr.flush();
      			wr.close();
      			responseMessage = con.getResponseMessage();
      
      			// Get the response from the server for the received data
      			InputStream in = con.getInputStream();
      			String encoding = con.getContentEncoding();
      			encoding = encoding == null ? "UTF-8" : encoding;
      
      			System.out.println("  - Loop " + loop + " sent body: " + body);
      			System.out.println("    - Response from server   : " + IOUtils.toString(in, encoding));
      			System.out.println("    - Response to connection : " + responseMessage);
      
      		} catch (IOException e) {
      			e.printStackTrace();
      		}
      
      	}
      
      	private static void setProxy(boolean needsProxy) {
      
      		Properties systemSettings = System.getProperties();
      		if (needsProxy == true) {
      			systemSettings.put("https.proxyHost", "proxy");
      			systemSettings.put("https.proxyPort", "8080");
      			systemSettings.put("http.proxyHost", "proxy");
      			systemSettings.put("http.proxyPort", "8080");
      
      		} else {
      			systemSettings.put("http.proxySet", "false");
      			systemSettings.put("https.proxySet", "false");
      		}
      	}
      
      	private static String buildJson(String param, String value) {
      		String result = "";
      		char hk = '"';
      		String paramPart = hk + param + hk;
      		String valuePart = hk + value + hk;
      
      		result = paramPart + ":" + valuePart;
      
      		return result;
      	}
      
      	private static String buildJson(String param, long value) {
      		String result = "";
      		char hk = '"';
      		String paramPart = hk + param + hk;
      		String valuePart = String.valueOf(value);
      
      		result = paramPart + ":" + valuePart;
      
      		return result;
      	}
      
      	private static String buildJson(String param, double value) {
      		String result = "";
      		char hk = '"';
      		String paramPart = hk + param + hk;
      		String valuePart = String.valueOf(value);
      
      		result = paramPart + ":" + valuePart;
      
      		return result;
      	}
      
      	private static double getOnboardTempSensor() {
      
      		String command = "/opt/vc/bin/vcgencmd measure_temp";
      
      		String fileContent = getCommandOutput(command);
      		String sensorValue = null;
      
      		if (fileContent != null && fileContent.length() > 0) {
      			String[] temp = fileContent.split("=");
      			sensorValue = temp[1].trim();
      			sensorValue = sensorValue.substring(0, sensorValue.length() - 2);
      			System.out.println(" - Measured temperature for CPU sensor is " + sensorValue);
      		}
      		return Double.parseDouble(sensorValue);
      	}
      
      	private static double getOneWireSensor(String sensorHardwareId) {
      
      		String sensorValue = null;
      		String filename = "/sys/bus/w1/devices/" + sensorHardwareId + "/w1_slave";
      
      		String fileContent = null;
      		fileContent = readFile(filename);
      
      		if (fileContent != null && fileContent.length() > 0) {
      			String[] temp = fileContent.split("t=");
      			sensorValue = temp[1].trim();
      			System.out.println(" - Measured temperature for 1wire sensor " + sensorValue + " is " + sensorValue);
      		}
      
      		return Double.parseDouble(sensorValue);
      	}
      
      	private static String readFile(String filename) {
      		String result = null;
      		try {
      			List<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());
      			result = lines.get(1).toString();
      		} catch (IOException e) {
      			return null;
      		}
      		return result;
      	}
      
      	private static String getCommandOutput(String command) {
      
      		String result = "";
      		String s;
      		Process p;
      
      		try {
      			p = Runtime.getRuntime().exec(command);
      			BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
      			while ((s = br.readLine()) != null)
      				result += s;
      			p.waitFor();
      			p.destroy();
      		} catch (Exception e) {
      		}
      		return result;
      	}
      
      	private static List<DevicesDTO> getDevices() {
      		List<DevicesDTO> result = new ArrayList<DevicesDTO>();
      
      		DevicesDTO device = new DevicesDTO();
      		// San Francisco
      		device.setId("5ea0541b-2b1d-4122-a2c1-e4faedba6c1c");
      		device.setToken("9737e9bd8ef523c2265efa9e4e99978");
      		device.setLatitude(-122.5078118);
      		device.setLongitude(37.7578149);
      		result.add(device);
      
      		// Mumbai
      		device = new DevicesDTO();
      		device.setId("5baf9a09-057c-4724-bb98-32506c4b564b");
      		device.setToken("568b82a5c57d808c2cc66ce049dd59ee");
      		device.setLatitude(72.7407744);
      		device.setLongitude(19.0825221);
      		result.add(device);
      
      		// Walldorf
      		device = new DevicesDTO();
      		device.setId("fff4d290-0a90-4ed8-9aca-1262d45fefe4");
      		device.setToken("ab2297629e588d26a7717e9ed47daa9");
      		device.setLatitude(8.5968078);
      		device.setLongitude(49.3012258);
      		result.add(device);
      
      		// Benfica do Ribatejo
      		device = new DevicesDTO();
      		device.setId("5b6e3e92-4127-4617-bdf7-f6be53953dc9");
      		device.setToken("c135cf13a85626e6a24a5d7237442e6");
      		device.setLatitude(-8.7002487);
      		device.setLongitude(39.1464271);
      		result.add(device);
      
      		// Sao Paulo
      		device = new DevicesDTO();
      		device.setId("ad008b9a-e981-4891-a7d0-5747028399d1");
      		device.setToken("1789eb92fe90df24ecc646eb3292091");
      		device.setLatitude(-46.8761767);
      		device.setLongitude(-23.6815302);
      		result.add(device);
      
      		// Reykjavík
      		device = new DevicesDTO();
      		device.setId("5ea7a50c-e926-4401-bbd8-3dac7bbee9e9");
      		device.setToken("aaaabefd0f6c11729fe4bfd6a125f8a");
      		device.setLatitude(-21.9226532);
      		device.setLongitude(64.1325);
      		result.add(device);
      
      		// Daneborg
      		device = new DevicesDTO();
      		device.setId("0931fa2f-8799-4027-9f45-21555b6356f9");
      		device.setToken("67c940db8a79595239138889c16f18c5");
      		device.setLatitude(-20.2355269);
      		device.setLongitude(74.3000014);
      		result.add(device);
      
      		// Sydney
      		device = new DevicesDTO();
      		device.setId("089f5432-f7ec-4029-a9df-2e84b41822e5");
      		device.setToken("7cb02ea9b11a5742b3c0cb71f2a725e5");
      		device.setLatitude(151.1730824);
      		device.setLongitude(-33.9399183);
      		result.add(device);
      
      		// Madrid
      		device = new DevicesDTO();
      		device.setId("e7bd30c0-d35d-429b-b8ba-a3f16dc8268c");
      		device.setToken("c1734caeee9f642cdecbade2a72aa961");
      		device.setLatitude(-3.8199645);
      		device.setLongitude(40.4381307);
      		result.add(device);
      
      		// Paris
      		device = new DevicesDTO();
      		device.setId("08ecde8a-05c3-41c0-97f1-bdeec49189fd");
      		device.setToken("5ed9129f894379fdbae57e1fa8e6dcb");
      		device.setLatitude(2.2773454);
      		device.setLongitude(48.8589506);
      		result.add(device);
      
      		// Buenos Aires
      		device = new DevicesDTO();
      		device.setId("4d619f96-fd4f-4053-ac91-7992cf437476");
      		device.setToken("8484a16c413b1b97fd1fb78479ced446");
      		device.setLatitude(-64.5302821);
      		device.setLongitude(-37.0572537);
      		result.add(device);
      
      		// New York
      		device = new DevicesDTO();
      		device.setId("f9e75621-5557-4bb1-b53e-8688914d7925");
      		device.setToken("592a72bf33c9529821462985e261037");
      		device.setLatitude(-74.2588767);
      		device.setLongitude(40.70583);
      		result.add(device);
      
      		// Salzburg
      		device = new DevicesDTO();
      		device.setId("560eaf47-8672-4286-b8f4-bb58c72d2aac");
      		device.setToken("2928fc91ac527212ecd23a30396c5e6c");
      		device.setLatitude(12.9863903);
      		device.setLongitude(47.8027887);
      		result.add(device);
      
      		// Vienna
      		device = new DevicesDTO();
      		device.setId("41cc93bc-d740-4c64-bcc5-5fbec79f7dc9");
      		device.setToken("af7c77148ede2e5dbcc1e41956e171");
      		device.setLatitude(16.3100209);
      		device.setLongitude(48.2206636);
      		result.add(device);
      
      		// RedBull - Fuschl am See
      		device = new DevicesDTO();
      		device.setId("2a546f32-abe4-4a96-a08a-c7392822a485");
      		device.setToken("7cafbc846a48ec8bb2aec5cdf3547c48");
      		device.setLatitude(13.294546);
      		device.setLongitude(47.7912181);
      		result.add(device);
      		
      		
      
      		// Rio 
      		device = new DevicesDTO();
      		device.setId("9380e0b6-4918-4238-8280-d4688506d6ae");
      		device.setToken("6a8cb9bf19e9dc46e9b240c662b38");
      		device.setLatitude(-43.728527);
      		device.setLongitude(-22.9109878);
      		result.add(device);
      		/*
      		// ""Dolce Vita - Trutnov (PA) (408m) >+420499828555""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.86905);
      		device.setLongitude(50.54590);
      		//result.add(device);
      		
      		// ""Bukovina Buiten - Bukovina U Ciste [<51] (407m) >+420737559148""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.59010);
      		device.setLongitude(50.54607);
      		//result.add(device);
      		
      		// ""Kacanovy - Kacanovy (LB) [<51] (288m) >+420728995433""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.14186);
      		device.setLongitude(50.54923);
      		//result.add(device);
      		
      		// ""Sedmihorky - Sedmihorky (LB) (259m) >+420481389162""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.18897);
      		device.setLongitude(50.55971);
      		//result.add(device);
      		
      		// ""Holman - Prosecne (HK) [<51] (01/04-31/10) (403m) >+420499441447""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.67636);
      		device.setLongitude(50.56895);
      		//result.add(device);
      		
      		// ""Klucek - Doksy (285m) >+420487872138""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(14.66554);
      		device.setLongitude(50.56956);
      		//result.add(device);
      		
      		// ""Bily Kamen - Doksy (LB) (293m) >+420487872489""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(14.66821);
      		device.setLongitude(50.56976);
      		//result.add(device);
      		
      		// ""Zdenek Matous - Dolni Branna [<51] (447m) >+420499425276""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(15.58792);
      		device.setLongitude(50.58711);
      		//result.add(device);
      		
      		// ""Borny - Stare Splavy (LB) (276m) >+420603218762""
      		device.setId("");
      		device.setToken("");
      		device.setLatitude(14.65554);
      		device.setLongitude(50.58835);
      		//result.add(device);
      		
      		*/
      
      		return result;
      	}
      
      }