This page last changed on Oct 30, 2013 by drewscm.

I am looking for input on general I/O modules that work well with open remote. I like the modbus and bacnet modules but I know they are not native to open remote. What have you guys used for general purpose I/O??

Thanks


product56.png (image/png)

if you are looking for simple status devices or relay boards, have a look to the ADAM interfaces from Advantech on

http://www.advantech.com.tw/ia/popcorn/eDM/2013/ADAM-6200/index.html

Those devices you can control via TCP/IP commands.

Posted by hennemarc at Nov 04, 2013 20:02

Also you may want to check with the original authors of this thread if they have feedback: Ethernet Controller IO Board - Hard wired devices

Posted by juha at Nov 04, 2013 20:36

I use a custom RF module communicating with PC via USB. The USB communication uses serial protocol through FTDI drivers.

Posted by atamariya at Nov 05, 2013 04:25

Have you done any work with the Adam-6000 units? I've been trying to figure out how to integrate with openremote

Posted by drewscm at Jan 11, 2014 04:20

Hi Scott,

yes, I did. Have a look on the manual of an ADAM Interface:

http://advantech.vo.llnwd.net/o35/ProductFile/1-NXTDWV/ADAM-6200%20Series%20User%20Manual%20Ed.1.pdf

In section B1 "ASCII Commands for ADAM-6200 modules" (page 148) there is a description how to communicate with ASCII commands to the ADAM module.

An example is this:

Create a TCP command in OR with the following command: $01M (fyi, '01' is the address of the ADAM interface.
Next create a sensor with that command and the OR response will be "!016250".
This string is the default module name.

All other commands are done in the same way.

Marc

Posted by hennemarc at Jan 12, 2014 18:57

hi anand I am looking for a low cost RF or wireless actuator that works with OR - where did you find that one? What is the range like?

Regards

Julian

Posted by jules_bike at Jan 12, 2014 19:02

hi anand I am looking for a low cost RF or wireless actuator that works with OR - where did you find that one? What is the range like?

Regards

Julian

Posted by jules_bike at Jan 12, 2014 19:02

Hi Julian, I got it custom built from a local manufacturer in Bangalore, India. You can find more details here. I've personally tested it for close to 50m range.

Posted by atamariya at Jan 13, 2014 04:40

Marc

I cannot seem to get this to work. Which port do the Adams use for The commands? I've tried using both.

Is there a command to read the status of one Digital Out status (on/off)?

I don't know why I can't get this figured out, frustrating because I know it's going to be a simple mistake.

Any further explanation would be much appreciated.

Thanks

Posted by drewscm at Jan 17, 2014 03:44

Hi Scott,

try the following:

The port for the ASCII commands is 1025, but this is not a TCP, but a UDP port (see page 57 in the manual for what I sent you the link).
The "Digital Input/Output Command Set" is described on page 176. In case you want to check a status of the digital inputs create a UDP command in OR designer with the following content:

NAME: chose a name
PROTOCOL: UDP
IP ADDRESS: put in your IP address
PORT: 1025
COMMAND: $016
Line Endings: CR

Next create a custom sensor with that command, so that you can display the response string in a label. Now you should at least see the response from the Adam interface. To present only the payload of that answer, you need a regular expression.
With that response you have to work now a bit, because the response is a hex value (in ascii text), which you have to interpret as shown in the example on page 177. I can not give you a common explanation, because the bits are differently allocated in different models of the ADAM modules (see table on page 177).
In short you have to convert the hex string to binary (0 and 1) by using a rule. 0 means the digital input is off and 1 means it is on.

I hope that helps you a bit.

Marc

Posted by hennemarc at Jan 19, 2014 17:29

Marc

I had time tonight to play with this, been swamped at work and the new house is consuming my time. Still not working, I wish I had more time to mess with it to figure out.

I tried your TCP $01M

Name: Adam name
Protocol: TCP/IP
IP Address: 192.168.1.10
Port: 502
Command: $01M

The response I am getting with my sensor is "$01M..?"

Any idea why? Does it need a polling interval?

Posted by drewscm at Jan 28, 2014 04:25

Hi Marc.

I own ADAM-6050 which are older models then the ADAM-6200 series. As per the manual this series do work with hex as well as ASCII. The table you fine in page 57 of the 6200 is not available in the 6000 series but I assume it is the same. With Wireshark I get the full packet syntax.
If I understand you correctly, when using TCP/IP I can use the hex format with port 502 while with UDP I can use the ASCII with port 1025.
For the ADAM-6050 I am expected to send an ASCII $016 to read all channels (both DI and DO I guess) while in hex format (TCP) I need to send 0x01010000000c to read the DI and 0x010100100006 to read the coils status.
This hex format is only the Modbus protocol (function code and data along with the Unit Identifier). The ModbusTCP layer is not sent except for the Unit Identifier. This layer contains transaction ID which is a counter I can't generate.
I am not sure what exactly to do. Tried the hex / TCP but the label response is N/A.

Please let me know what is the correct syntax.

Posted by niraviry at Jul 26, 2014 19:17

I am not so familiar with MODBUS, which is not easy to implement, so the best way is to communicate with the ADAM-6050 via TCP/IP (ASCII) protocol.

I had a look into the manual at http://downloadt.advantech.com/ProductFile/Downloadfile1/1-QJSSTZ/ADAM-6000-Ed6-0-2-EN.pdf

From page 146 onwards you see the commands how they have to look. Don't forget to add the CR at the end.

I recommend to use a small terminal program (e.g. putty) to do some testing without OpenRemote. That simplifies the testing. Just connect as RAW TCP connection to your ADAM IP and Port and send an ASCII command. If you get a response via putty you are at least sure that the ADAM module replies correctly. After this you should do the OR implementation.

Marc

Posted by hennemarc at Jul 29, 2014 05:57

Hi Marc.

I have a ping to the ADAM. I set up the PuTTy in its default configuration except for IP, Port (502) and raw mode. The log shows:

Event Log: Writing new session log (SSH raw data mode) to file: putty.log
Event Log: Looking up host "10.0.0.42" (IPv4)
Event Log: Connecting to 10.0.0.42 port 502

When I type in the firmware command which is common to alll models - $01F I see nothing in the log nor any respond in the terminal.
I have no idea what is wrong except for the CR issue. I did not figure out how to the CR when pressing the Enter.

BTW, i have managed to do the job with a utility called UniGo under Android, which is independent from the OR, and just controls the Alarm and the air condition units.
The UniGo is a ModBus application.
For now its fine but I would like it in one application.

Need your advice to understand why I can't control the ADAM through PuTTy.

Posted by niraviry at Jul 29, 2014 15:58

I am beginning to look at my new system again when I have time.

I never was able to get Openremote to communicate with the Adam-6052. I'm glad someone else is trying to get one working as well. The Adam line provides a lot of options so it would be nice to be able to get it working.

I will do some tinkering and let you know if I come up with anything.

Posted by drewscm at Jul 29, 2014 23:31

sorry, my mistake.

Putty does not allow UPD connections. Try a terminal program which allows UPP

--> http://new.hwg.cz/files/download/sw/version/hercules_3-2-8.exe
--> http://sourceforge.net/projects/multiterminal/
--> http://www.cinetix.de/interface/tiptrix/udpterm.htm

Posted by hennemarc at Jul 30, 2014 06:34

Hi.

Tested all 3. Herculas seems to be configured OK but when I send $01F I see only F being echoed as sent.
In UDPTerm I did not find a way to type ASCII or any type. No Response.
The Multiterminal is too old and does not work well with some Win7 dll files.
I will try to fine a similar solution.

Posted by niraviry at Jul 30, 2014 19:46

Hi again.
When setting the a UDP device with its IP, port 1025, the proper ASCII comand and CR as a delimiter, get the following error:

ERROR [Polling Sensor Thread ID = 5122897, Name ='Read DI Sensor']: could not perform UDP Event
java.net.SocketTimeoutException: Receive timed out
	at java.net.PlainDatagramSocketImpl.receive0(Native Method)
	at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:145)
	at java.net.DatagramSocket.receive(DatagramSocket.java:725)
	at org.openremote.controller.protocol.socket.UDPSocketCommand.send(UDPSocketCommand.java:277)
	at org.openremote.controller.protocol.socket.UDPSocketCommand.read(UDPSocketCommand.java:293)
	at org.openremote.controller.model.sensor.Sensor$DeviceReader.read(Sensor.java:682)
	at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:608)
	at java.lang.Thread.run(Thread.java:662)
Exception in thread "Polling Sensor Thread ID = 5122897, Name ='Read DI Sensor'" java.lang.NullPointerException
	at org.openremote.controller.model.sensor.StateSensor.processEvent(StateSensor.java:233)
	at org.openremote.controller.model.sensor.Sensor.update(Sensor.java:338)
	at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:608)
	at java.lang.Thread.run(Thread.java:662)

Need help.

Posted by niraviry at Aug 17, 2014 17:18
Document generated by Confluence on Jun 05, 2016 09:41