[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mihini-dev] Greenhouse Demo access via m3da using the java api
|
Hi,
I want to try to access the greenhouse demo via m3da. I actually have no
idea how.
By the way, if you look at
http://m2m.eclipse.org/portalTest/webapp/app/#/devices/RPI000000006f257df2,
the values seem to be stuck, all dates are not changing from July 23rd
00:35:29
Ok, just to explain what I tried:
As far as I understand, there is a M3DA server running on
m2m.eclipse.org at port 44900
This is the same server which is the base for the web GUI, correct?
What I try to do, is to get the greenhouse temperature.
There I'm starting to become confused, the java client doesn't offer any
way to subscribe to a tag.
Is it then always request/response driven? So I would have to poll for
value changes?
I tried something like this:
public class Application
{
public static void main ( final String[] args ) throws Exception
{
final M3daTcpClient client = new M3daTcpClient (
"m2m.eclipse.org", 44900, "openscada.org#1" );
client.connect ();
final M3daBodyMessage[] x = client.sendEnvelope (
createMessages () );
System.out.println ( x );
System.out.println ( x.length );
client.close ();
}
private static M3daMessage[] createMessages ()
{
final Map<Object, Object> map = new HashMap<> ();
map.put ( "A1", "ON" );
return new M3daMessage[] { new M3daMessage ( "greenhouse",
Math.abs ( new Random ().nextLong () ), map ) };
}
}
This maybe total nonsense but I just dont find any documentation for the
greenhouse demo, even the source code parts I managed to find, seem
incomplete to me.
What is the path?
What is the name of the tags?
Is there a way to query/browse the server for existing tags?
Best regards
Jürgen
--
IBH SYSTEMS GmbH
D 85235 Pfaffenhofen an der Glonn
Läutenring 43
Geschäftsführer / CEO: Dr. Thomas Heitzig
Amtsgericht München
Handelsregister Nummer HRB 197959
USt ID: DE267945175
Office Munich
D 80992 München
Agnes-Pockels-Bogen 1
T +49 89 18 9 17 49 0
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or pivileged
material. Any review, retransmission, dissemination or other use of,
or taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer.