It is currently 04 Oct 2024, 13:30




 Page 1 of 1 [ 6 posts ] 
Author Message
 Post subject: Using a MOXA NPort as a serial port LAN server
PostPosted: 20 Sep 2024, 06:15 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4708
Location: Tokyo
Has thanked: 320 times
Been thanked: 1269 times
Still working on my Home Theater Automation project.

This is the solution to (professionally) replace the RPi 3B+ I was using with USB-Serial adapters.

MOXA has a LOT of products in catalog, and they're quite pricey ($1.5K~2K).
But if you go for older/used models on eBay, they can be found for less than $100.

Got a NPort 6650-8 for $89 recently.

Attachment:
6650-8.jpg
6650-8.jpg [ 42.59 KiB | Viewed 173 times ]


You connect the device to your LAN, it comes with a Web GUI but you can use CONSOLE port, Telnet or SSH to configure it.
From there each Serial port, using the official MOXA pin out (took me a while to understand that), can be connected and become LAN-enabled.

DO NOT USE CISCO/Arista Console cables. They connect DB9 Port #5 (GND) on RJ45 pin 4~5 which is where MOXA expects Tx/Rx.
Best case you'll get an echo of your Tx back to Rx, but you can't communicate with the serial device.

You can choose to access it over Telnet, SSH, or have MOXA drivers installed to look like a local COM ports (called RealCOM, Windows or Linux), or even be a COM to COM proxy (over Ethernet) or reverse telnet. There's a lot you can do with this device, it's aimed at industrial/professional usage.

So, from there, any device with DB9 Serial control (such as DVD/BD players, Projectors, some A/V Amps, etc.) just becomes an IP:Port on your network.

Example, using port #2 of the MOXA to control an OPPO Player:

Attachment:
MOXA1.png
MOXA1.png [ 10.8 KiB | Viewed 173 times ]

Attachment:
MOXA2.png
MOXA2.png [ 9.28 KiB | Viewed 173 times ]


$ telnet moxa 4002
Trying 192.168.10.240...
Connected to moxa.
Escape character is '^]'.
#PON
@OK ON
#QVR
@OK 20XRU-65-0131
#QPL
@OK HOME MENU
#EJT
@OK OPEN
#EJT
@OK CLOSE
#POF
@OK OFF


Next... get Pioneer (SR + Xantech) and SONY (CONTROL S) devices IR IN turned into a LAN-controllable device.

And then automate everything with a VM running NODE-RED.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Using a MOXA NPort as a serial port LAN server
PostPosted: 20 Sep 2024, 12:17 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4708
Location: Tokyo
Has thanked: 320 times
Been thanked: 1269 times
admin wrote:
And then automate everything with a VM running NODE-RED.


Happy to report the basic functions are working!

Attachment:
Node-RED.jpg
Node-RED.jpg [ 84.2 KiB | Viewed 165 times ]


Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Using a MOXA NPort as a serial port LAN server
PostPosted: 22 Sep 2024, 22:01 
Honest fan
Honest fan
User avatar

Joined: 28 Sep 2023, 06:27
Posts: 126
Location: United States
Has thanked: 48 times
Been thanked: 43 times
Those are interesting concepts. I can understand the convenience of having automated control of a complex system. My "theater" room is small enough that I can reach all of the devices physically, a few steps away.
Offline
 Profile  
 
 Post subject: Re: Using a MOXA NPort as a serial port LAN server
PostPosted: 23 Sep 2024, 08:35 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4708
Location: Tokyo
Has thanked: 320 times
Been thanked: 1269 times
chrisw6atv wrote:
My "theater" room is small enough that I can reach all of the devices physically, a few steps away.


I am working on this for a few reasons:

  1. It's fun if you're into geeky stuff
  2. I'm planning to move 2/3rd of my gear away from the living room, in an adjacent space, where remote controls won't reach anymore
  3. The remote controls won't live forever
  4. The iOS Apps won't work forever (unless you keep old phones only for this purpose)
  5. CRESTON (or similar) systems costs an arm and a leg and won't support old gears forever either

If I can manage to turn everything into a simple telnet IP port then it becomes easy to write a simple web local page triggering pre-designed scripts to turn on/off/preset things automatically, having all I/Os aligned without thinking about it anymore.

You can also use some of the triggers to automate further.
Ex: when switching on my pre-amp, the amp automatically powers up.
Ex: when setting the pre-amp to "5.1 inputs #2", the Lexicon LD-1 will power on for AC3RF, otherwise it's just a passive COAX pass-through.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Using a MOXA NPort as a serial port LAN server
PostPosted: 23 Sep 2024, 16:45 
True fan
True fan
User avatar

Joined: 02 Jan 2021, 00:35
Posts: 278
Location: Northern Virginia
Has thanked: 187 times
Been thanked: 186 times
admin wrote:
I'm planning to move 2/3rd of my gear away from the living room, in an adjacent space, where remote controls won't reach anymore

The dream for me is to someday have a spare room where I can put the noise-generating gear especially like the LD player and a more robust NAS. Think I'll bookmark this page for when I'm there; great stuff.
Offline
 Profile  
 
 Post subject: Re: Using a MOXA NPort as a serial port LAN server
PostPosted: 26 Sep 2024, 18:48 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4708
Location: Tokyo
Has thanked: 320 times
Been thanked: 1269 times
Node-RED is a little disorienting at first but then things start to make sense and the node/connection/condition/node just write themselves.

This will turn on an OPPO-205 into a DAC-only device, with Digital Audio coming on COAX IN, Display turned OFF (Dimmer OFF) and Video turned OFF (Pure Video ON).

Sequence works as follows:
  • Power ON, wait for 15 seconds
  • Select COAX IN, wait for 2 seconds
  • Loops the Dimmer status until it reports OFF, wait 2 seconds each time
  • Loops the Pure Audio status until it reports ON, wait 2 seconds each time
  • END

Attachment:
Scenario.PNG
Scenario.PNG [ 93.18 KiB | Viewed 81 times ]


And here is the finished script, triggered from a simple web request (URL hit) on a local NAS.

Attachment:
Scenario with HTTP Request.png
Scenario with HTTP Request.png [ 105.54 KiB | Viewed 61 times ]


Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: