Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mita-dev] Feedback zu Eclipse Mita / XDK Live

Of course, I’m sorry for the inconvenience!

 

Dear Eclipse Mita community,

 

we are a software development team at Bosch Connected Industry (BCI/ECO). We are currently developing an IIoT architecture based on open source components. In our setup, a Bosch XDK sends sensor data to a broker (Eclipse Kura) running on a Raspberry Pi. On the XDK, we are running an Eclipse Mita application (see attachment). We are amazed by the simplicity of Eclipse Mita / XDK Live and we believe that it is a fantastic tool to be used in typical IIoT use cases.

 

In our first steps with Mita, we noticed some things that we would like to share with you:

 

1.      As far as we can tell, the platform XDK100 does not support the magnetometer and gyroscope of the XDK yet (https://bit.ly/2rfipwu) – perhaps this could be implemented in a future release of the XDK workbench? This way, we could make use of the XDK’s full potential.

 

2.      In our setup, the XDK sends data to the broker using the WIFI network of the Raspberry Pi. However, this network is not 100% reliable, and as a result the WIFI connection is interrupted after a period of time. Unfortunately, the WIFI connectivity is only set up once, and as soon as the connection is lost, a WIFI connectivity exception occurs and the entire XDK Live application crashes. Therefore, we would love to have the possibility to reconnect to the WIFI network. Maybe, an automatic WIFI reconnect could be implemented in the WIFI setup or a WIFI reconnect method could be provided as part of the Eclipse Mita language. In our eyes, the ability to reconnect to a WIFI network after a connection loss is crucial for the application’s persistence.

 

Please do not take our feedback as criticism – we just wanted to share our first experiences with Eclipse Mita with you.

 

We see great potential in this programming language and we are excited for what is yet to come!

 

Best regards

Niklas Cornelius Kunz

Ecosystem Solution Integration (BCI/ECO)
Tel. +49 711 811-0 | Fax +49 711 811 | fixed-term.NiklasCornelius.Kunz@xxxxxxxxxxxx



Von: mita-dev-bounces@xxxxxxxxxxx [mailto:mita-dev-bounces@xxxxxxxxxxx] Im Auftrag von Benjamin Cabé
Gesendet: Mittwoch, 2. Mai 2018 15:50
An: mita developer discussions <mita-dev@xxxxxxxxxxx>
Cc: nthekunz@xxxxxxxxx; Mueller Patrick (BCI/ECO) <Patrick.Mueller10@xxxxxxxxxxxx>
Betreff: Re: [mita-dev] Feedback zu Eclipse Mita / XDK Live

 

This looks great! However, I, and probably many others on this list, do not speak a single word of German :-)

Can you please use the english language to communicate on this mailing list?

 

Thanks!

Benjamin.

 

Le mer. 2 mai 2018 à 15:42, FIXED-TERM Kunz Niklas Cornelius (BCI/ECO) <fixed-term.NiklasCornelius.Kunz@xxxxxxxxxxxx> a écrit :

Liebes Eclipse-Mita-Team,

 

wir sind ein Entwicklerteam der Abteilung BCI/ECO (Bosch Connected Industry) und beschäftigen uns mit der Entwicklung von Open-Source-Komponenten für das Internet der Dinge. Dabei arbeiten wir unter anderem auch mit dem XDK.

 

Aktuell beschäftigen wir uns mit der Programmiersprache XDK Live / Eclipse Mita, die ja in der neuesten Version der XDK-Workbench enthalten ist. Wir sind total begeistert, wie einfach sich mit XDK Live typische Anwendungsfälle des IIoT umsetzen lassen.

 

Bei unserer Arbeit mit XDK Live sind uns zwei Dinge aufgefallen, die wir euch gerne rückmelden möchten:

 

1. In unserem aktuellen Setup sendet der XDK die Sensordaten per MQTT an einen Broker (Kura), der auf einem Raspberry Pi läuft (Code siehe Anhang). Dabei verwenden wir die Plattform XDK110. Diese unterstützt noch nicht das Magnetometer und das Gyroskop des XDK (siehe https://bit.ly/2rfipwu). Vielleicht kann eine Implementierung dieser beiden Sensoren in einer zukünftigen Version von XDK-Live umgesetzt werden? Darüber würden wir uns sehr freuen, da wir gerne das ganze Potenzial des XDK ausschöpfen würden.

 

2. Um die Daten an den Broker zu senden, verbindet sich der XDK mit dem WLAN-Netz des Raspberry Pi. Dieses ist nicht 100% zuverlässig, weshalb es hin und wieder zu kurzen Unterbrechungen kommt. Diese führen dann auf dem XDK zu einer WLAN-Exception, wodurch die ganze Applikation beendet wird und neu über die Workbench gestartet werden muss. Die WLAN-Connection wird nur einmalig mit "setup" eingerichtet, daher haben wir noch keine Möglichkeit gefunden, mit XDK Live einen automatischen WLAN-Reconnect nach x Sekunden zu definieren. Für einen reibungslosen Betrieb wäre das jedoch sehr hilfreich. Wir schlagen deshalb vor, in einer künftigen Version von XDK Live entweder einen Auto-Reconnect in das WLAN-Interface zu integrieren oder einen Reconnect als Methode bereitzustellen.

 

Bitte fasst unser Feedback nicht als Kritik auf – uns ist klar, dass es sich erst um Version 1.1.0 von XDK Live handelt. Wir wollten vielmehr unsere ersten Erfahrungen mit euch teilen, vielleicht ja als Anregung für zukünftige Releases.

 

Wir sind schon gespannt, wie sich das Projekt XDK Live / Eclipse Mita noch weiterentwickeln wird, da wir darin ein großes Potenzial sehen!

 

 

Mit freundlichen Grüßen / Best regards

Niklas Cornelius Kunz

Ecosystem Solution Integration (BCI/ECO)
Tel.
+49 711 811-0 | Fax +49 711 811 | fixed-term.NiklasCornelius.Kunz@xxxxxxxxxxxx

_______________________________________________
mita-dev mailing list
mita-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mita-dev

package main;
import platforms.xdk110;

var sendData = false;

// Configure the WLAN connectivity of the XDK.
setup devnet : WLAN {
    ssid = "SSID_MSW_Pi_AccessPoint";
    psk = "PassWord123!";
}
 
// Software resources are set up using the setup keyword. 
// Notice how we refer to the devnet WLAN setup
// as means of transport, and instantiate a signal to the / topic.
setup backend : MQTT {
    transport = devnet;
    url = "mqtt://172.16.1.1:1883";
    clientId = "client_xdk";
    var events = topic(name="xdk/data");
}

setup hmi : LED {
	var dataSent = light_up(color=Red);
	var errorInfo = light_up(color=Yellow);
}

every button_one.pressed {
	sendData = true;
	println("Publishing to mqtt broker.");
	hmi.dataSent.write(true);
}

every button_two.pressed {
	sendData = false;
	println("Not publishing to mqtt broker.");
	hmi.dataSent.write(false);
}
 
// The every keyword handles events. Here we use time as an event source and
// run at a regular interval.
every 3 seconds {
	
    // Writing to the signal instance we've created in the signal block
	// above sends out the MQTT message (backend is an MQTT resource
	// after all). Using backticks we can use string interpolation.
	// Here we construct a JSON string inline to the function call.
	if (sendData == true) {
		
		// Sensor data (and other modalities) are available due to the platform import above.
	    // One can use some resources even if they were not configured beforehand.
	    
	    let temp = environment.temperature.read() - 7000;
	    let hmd = environment.humidity_fixed_point.read();
	    let pres = environment.pressure.read();
	    let li = light.intensity.read();
	    let acc_x = accelerometer.x_axis.read();
	    let acc_y = accelerometer.y_axis.read();
	    let acc_z = accelerometer.z_axis.read();
	    let gyro_x = 0;
	    let gyro_y = 0;
	    let gyro_z = 0;
	    let mag_x = 0;
	    let mag_y = 0;
	    let mag_z = 0;
	    
	    try {
	    	
		    backend.events.write(`{ "temperature": ${temp}, "humidity": ${hmd}, 
			"pressure": ${pres}, "light": ${li}, 
			"acc_x": ${acc_x}, "acc_y": ${acc_y}, "acc_z": ${acc_z}, "gyro_x": ${gyro_x}, "gyro_y": ${gyro_y}, "gyro_z": ${gyro_z},
			"mag_x": ${mag_x}, "mag_y": ${mag_y}, "mag_z": ${mag_z}}`);
		    	
	    }	catch(Exception) {
	    	
	    	hmi.errorInfo.write(true);
	    	println("Exception. Data could not be published.");
	    	
	    }
			 
	}
	
}

Back to the top