MrWorf Posted May 2, 2021 Posted May 2, 2021 Just found out today that insteon seems to have given up on the serial PLM and availability is very scarce (not to mention non-existent). But I also found that they had a RF only PLM called 2448A7. Now, if I understand things correctly, the ISY994 PLM port is nothing more than a serial port, and while the 2448A7 is USB, it actually just exposes a serial port as well (but over USB). My plan was to do a quick "hack" where I take a RaspberryPi, connect a 2448A7 and a USB to serial port adapter and then build a cable to go between my Raspberry and the ISY994. The thinking being that I could cobble together a gateway on the Pi which would open the port to the insteon usb device and basically forward all comms to the other USB adapter and thus connect the ISY994 to the USB Insteon. Does it sound sane? I think it does, but I'm wondering if anyone has the pin-out for the ISY994i port and also what signal level it uses (5V, 3.3V, etc..) so I don't burn something. If it's 3.3 I should in theory be able to use the serial port built-in to the Pi, but that seems a bit optimistic So what's the question? I need the lay of the land of the PLM port on the ISY994 so I can custombuild that cable and avoid frying it if it's expecting 3.3V
Brian H Posted May 2, 2021 Posted May 2, 2021 (edited) The 2448A7 is strictly Insteon RF. So it has to go through another Dual Band device to process the Insteon RF to and from the power lines. Not important to most users but it also does not do any X10 signaling. The PLM uses RS232 for communicating to the outside world. MAX232 or MAX232EI interface chip. So the signals are RS232 swinging + and -. The ISY994i would have to have a matching signal pin out and signals as the PLM. The pin outs and RS232 signal specifications are in the PLM Quick Start Manual. If you don't have one. https://cache-m2.smarthome.com/manuals/2413Sqs.pdf Though most have not found them and tossed the box. There is a RJ45 to standard DB9S serial port cable in the 2413S or 2412S PLM box from the factory. It is only 3 wires being used. Serial In, Serial Out and Ground. Pin 2 was a unregulated 12VDC from the older 2412S as the ISY994i technically could use its power to run. I can ring one out if you need the pin connections. I looked at the output of my spare ISY994i and did not see any signals on its pins for the PLM TTL signals and one seemed to have a termination resistor on it. So I doubt the TTL signals would be used. My thoughts are the 2413S is not abandoned but in very short supply. Due to the pandemic and it is the more popular of the two interfaces. USB or Serial Port. Here is the 2448A7 Quick Start Manual if you want some information on it. http://cache.insteon.com/documentation/2448A7qsg.pdf Edited May 2, 2021 by Brian H More Data
Brian H Posted May 2, 2021 Posted May 2, 2021 The pin out on the 2413S PLM Quick Guide. Looks like it is using the signal names from the PC. As its reference. From the serial port schematic. Pin 1 is RS232 signal out to the equipment connected to it. Pin 7 is common ground. Pin 8 is RS232 signal in from the equipment connected to it.
MrWorf Posted July 22, 2021 Author Posted July 22, 2021 (edited) Good news, I finally got it all put together as well as a hack to bridge the two serialports logically inside the Raspberry Pi and waddayaknow, it works. It actually works 100% so far, meaning that the ISY994 didn't realize that it's talking to the 2448A7 via a linux bridge and performance is no different than before. Reliability on my network also went way up, I (knock on wood) haven't had any failed operations, whilst my old PLM couldn't do much anything anymore. Obviously right now it's a horrible hack, but expect an update in a few days with pictures and github link. Right now I'm waiting for a better RS232-to-TTL which should arrive next week. End goal is to make a SD card image for the RPi Zero where you use the onboard UART to talk to ISY994 and the USB port to connect to the 2448A7 usb plug. Stay tuned .. but for now, some pictures to prove it exists Edited July 22, 2021 by MrWorf Images were borked 3
hart2hart Posted July 22, 2021 Posted July 22, 2021 Good news, I finally got it all put together as well as a hack to bridge the two serialports logically inside the Raspberry Pi and waddayaknow, it works. It actually works 100% so far, meaning that the ISY994 didn't realize that it's talking to the 2448A7 via a linux bridge and performance is no different than before. Reliability on my network also went way up, I (knock on wood) haven't had any failed operations, whilst my old PLM couldn't do much anything anymore. Obviously right now it's a horrible hack, but expect an update in a few days with pictures and github link. Right now I'm waiting for a better RS232-to-TTL which should arrive next week. End goal is to make a SD card image for the RPi Zero where you use the onboard UART to talk to ISY994 and the USB port to connect to the 2448A7 usb plug. Stay tuned .. but for now, some pictures to prove it exists Congratulations. Do you think the same would apply to a 2413U dual band usb PLM? I ordered one and about to set off on what you’ve done for this device. I’ll wait to see GitHub!
hart2hart Posted July 22, 2021 Posted July 22, 2021 I'm pretty sure it would work the same way.That’s what I thought. I haven’t looked yet but feels like PiZero should be able to get power from the PLM USB port. Also, I look to see if any cases for pizero have been uploaded to thingiverse.com to modify or use as is.
MrWorf Posted July 22, 2021 Author Posted July 22, 2021 Not sure how that would work since normally USB power flows the other direction and providing 5V as a device on the Vcc isn't exactly considered OK and can cause issues. Also, given that the PLMs tend to burn out, I'd be hesitant to rely on it to power your Pi since fluctuating power can easily corrupt an SD card (seen that, done that )
hart2hart Posted July 22, 2021 Posted July 22, 2021 Not sure how that would work since normally USB power flows the other direction and providing 5V as a device on the Vcc isn't exactly considered OK and can cause issues. Also, given that the PLMs tend to burn out, I'd be hesitant to rely on it to power your Pi since fluctuating power can easily corrupt an SD card (seen that, done that )Gotcha. I found a few cases to 3D print to keep it contained.
Brian H Posted July 22, 2021 Posted July 22, 2021 My Pi Zero. Has a separate USB connector a power supply plugs into. That has a matching plug on it. The other USB connector is for communication with it.
hart2hart Posted July 22, 2021 Posted July 22, 2021 My Pi Zero. Has a separate USB connector a power supply plugs into. That has a matching plug on it. The other USB connector is for communication with it.Both USB ports can power the RPi Zero wireless. The one marked power does not have data pins.
Brian H Posted July 22, 2021 Posted July 22, 2021 Thanks for the information. I have the Pi Zero not the Pi Zero W. Though it maybe the same for the USB ports on mine.
Michel Kohanim Posted July 24, 2021 Posted July 24, 2021 @MrWorf, Bravoooo!!!! With kind regards, Michel
MrWorf Posted July 24, 2021 Author Posted July 24, 2021 First version available here: https://github.com/mrworf/serial-bridge You'll need a USB Insteon PLM (I'm using the usb stick) and a RS232 converter connected either via USB or via the UART on the RPi. The cable to talk to the ISY looks like this: RJ45 PIN1 --> RS232 TX RJ45 PIN8 --> RS232 RX RJ45 PIN7 --> GND No other connection needed, this will allow your RS232 connection to communicate with the ISY994. I used https://www.amazon.com/gp/product/B07WKKVZRF to split out the ethernet cable to individual cables (handy when testing). The bridge.py is completely automated (once python3-serial is installed, see README.md), it has the following logic: If 3 serial ports are detected, the two external ones will be bridge (RPi always has ONE serial port) If 2 serial ports are detected, these will be bridged (happens only when you use the UART on the RPi itself) Less than 2 or more than 3 will result in error code Big thanks to @Michel Kohanim for providing the exact pinouts of the ISY to simplify the work on getting it properly wired. If you find issues and are able to do bugfixes, please submit PRs for this project. If you're not able to fix, feel free to submit an issue on the project. No promises that I will fix it, especially if it's not related to the USB stick from Insteon (since I don't want to get the powerline USB one). As for performance of this setup? I see no difference in reaction times using wireless only. In fact, since switching to this, the comms between the ISY and my insteon network has never been more reliable I'm also hopeful that by being offgrid (from a PLM standpoint) it will stay solid much longer since the main culprit (from my understanding) with the wired ones is all the extra components that connect to 110. Will update later next week when I get my RS232 to TTL adapter so I don't need a USB hub for my RPi0W. 1
hart2hart Posted July 24, 2021 Posted July 24, 2021 First version available here:https://github.com/mrworf/serial-bridge You'll need a USB Insteon PLM (I'm using the usb stick) and a RS232 converter connected either via USB or via the UART on the RPi. The cable to talk to the ISY looks like this: RJ45 PIN1 --> RS232 TX RJ45 PIN8 --> RS232 RX RJ45 PIN7 --> GND No other connection needed, this will allow your RS232 connection to communicate with the ISY994. I used https://www.amazon.com/gp/product/B07WKKVZRF to split out the ethernet cable to individual cables (handy when testing). The bridge.py is completely automated (once python3-serial is installed, see README.md), it has the following logic: If 3 serial ports are detected, the two external ones will be bridge (RPi always has ONE serial port) If 2 serial ports are detected, these will be bridged (happens only when you use the UART on the RPi itself) Less than 2 or more than 3 will result in error code Big thanks to @Michel Kohanim for providing the exact pinouts of the ISY to simplify the work on getting it properly wired. If you find issues and are able to do bugfixes, please submit PRs for this project. If you're not able to fix, feel free to submit an issue on the project. No promises that I will fix it, especially if it's not related to the USB stick from Insteon (since I don't want to get the powerline USB one). As for performance of this setup? I see no difference in reaction times using wireless only. In fact, since switching to this, the comms between the ISY and my insteon network has never been more reliable I'm also hopeful that by being offgrid (from a PLM standpoint) it will stay solid much longer since the main culprit (from my understanding) with the wired ones is all the extra components that connect to 110. Will update later next week when I get my RS232 to TTL adapter so I don't need a USB hub for my RPi0W.Fantastic! I’m going to start work on seeing if I can apply this to the 2413U. One question … which RS232 to TTL adapter do you plan to use? I plan to use onboard RPi UART so I don’t think I’ll need it but it may make it more reliable. Edit. I ran it on rpi3 and it found the internal serial ttyAMA0 and the usbserial ttyUSB0 of the 2413U! The breakout connector you listed will be here tonight and I’ve got a backup ISY. I’ll add a lamplinc to it for a very simple test.
MrWorf Posted July 24, 2021 Author Posted July 24, 2021 I'm going to be using https://www.amazon.com/gp/product/B07BJJ3TZR I was looking at cheaper options, but the reviews were horrible. And since I have all the RJ45 tools I need I will be fabricating a cable with RJ45 in one end and the RS232->TTL in the other with 4 leads going out (since it needs power). If it all works, I will shrinktube it so it becomes a fat adapter cable instead. It would have been really cool if I could get hold of 5V ~250mA from the ISY itself since then the ISY could power the RPi Zero and I would only need one plug. The thinking would be to remove the Z-Wave board anyway so maybe power can be pilfered from that connector since I doubt that the ZWave board uses 12V. If anyone knows if this is feasible ( @Michel Kohanim ?) then let me know
hart2hart Posted July 24, 2021 Posted July 24, 2021 I'm going to be using https://www.amazon.com/gp/product/B07BJJ3TZR I was looking at cheaper options, but the reviews were horrible. And since I have all the RJ45 tools I need I will be fabricating a cable with RJ45 in one end and the RS232->TTL in the other with 4 leads going out (since it needs power). If it all works, I will shrinktube it so it becomes a fat adapter cable instead. It would have been really cool if I could get hold of 5V ~250mA from the ISY itself since then the ISY could power the RPi Zero and I would only need one plug. The thinking would be to remove the Z-Wave board anyway so maybe power can be pilfered from that connector since I doubt that the ZWave board uses 12V. If anyone knows if this is feasible ( @Michel Kohanim ?) then let me know Sounds good. The 2413U as suspected does not provide any power. Be interested to see if you can get power from ISY.
austin_john Posted July 25, 2021 Posted July 25, 2021 5 hours ago, MrWorf said: I'm going to be using https://www.amazon.com/gp/product/B07BJJ3TZR I was looking at cheaper options, but the reviews were horrible. And since I have all the RJ45 tools I need I will be fabricating a cable with RJ45 in one end and the RS232->TTL in the other with 4 leads going out (since it needs power). If it all works, I will shrinktube it so it becomes a fat adapter cable instead. It would have been really cool if I could get hold of 5V ~250mA from the ISY itself since then the ISY could power the RPi Zero and I would only need one plug. The thinking would be to remove the Z-Wave board anyway so maybe power can be pilfered from that connector since I doubt that the ZWave board uses 12V. If anyone knows if this is feasible ( @Michel Kohanim ?) then let me know Hi - First off: Thank you!!!!! This is pretty amazing and great timing since my last serial PLM just died and I bought a USB PLM. Forgive my ignorance, but can you explain the basic configuration? Your photo shows an RPi with (1) the Insteon 2448A7 connected via USB; (2) the RS232-to-TTL connected to a USB port, (3) a RJ45 connection (not sure what that is) and (4) power connection. The RPi Zero only has two mini USB ports and one is for power, so I'm confused. Is the setup PLM USB -> RS232-toTTL -> RPi -> ISY? I've ordered your new TTL converter (NOYITO TTL to RS232) and I can make RJ45 cables, but I'm not sure what I will need to connect to the NOYITO. I don't have any issues soldering. Thanks again!!
MrWorf Posted July 25, 2021 Author Posted July 25, 2021 (edited) The picture was of a RPi3 with a USB Insteon stick, a USB 6-in-1 Serial converter (takes practically anything serial and makes it readable as a standard USB serial port). The serial converter was connected via a board to both the ISY994i but also a logic analyzer (had issues with socat, a tool which supposedly does serial bridging, before I wrote my own solution). What you ordered, the RS232 to TTL is something I haven't yet done but will be doing next week when it arrives, so I cannot give any info on how to hook that up.... YET I can tell you however that you'll be needing to modify your Raspbian image to make it work because default behavior for RPi is to use the built-in UART (aka serial port) for outputting a console. Obviously that will not work for us. But I'll post more details next week once I have it working. Shouldn't be a big issue. Current setup I have now is as follows: ISY994i --> RS232 --> 6-in-1 USB Serial Converter --> USB Hub --> RPi Zero W Insteon 2448A7 -----^ @hart2hartyes, only the 2413S provided power via the port. Will be opening my ISY next week to see if I can figure out if there's some 5V to be had on the port stay tuned End game is to have a SD Card image with a modified raspberry pi distro which boots into the bridge.py tool which supports both USB and built-in UART for ISY994 connectivity along with instructions for building your own RPi Bridge. Should make it fairly easy for anyone to set up and depending on skill, can be done entirely solderless (but bulkier). Edited July 25, 2021 by MrWorf Clarified socat 1
Brian H Posted July 25, 2021 Posted July 25, 2021 Only the older 2412S provides power over ( unregulated 12V normally about 20V) its serial port RJ45 type connector. In the 2413S they did not put F1 on the serial daughter board. So no voltage was on the serial connector. Starting with V2.4 the serial board is a new design and there is no power to the serial connector. A ISY994i could be powered by a 2412S. It did have the pins wired. It also had a diode in the voltage input. As did the power connector on it. If booth where connected only one provided power.
austin_john Posted July 25, 2021 Posted July 25, 2021 10 hours ago, MrWorf said: What you ordered, the RS232 to TTL is something I haven't yet done but will be doing next week when it arrives, so I cannot give any info on how to hook that up.... YET Thanks for the explanation, that was very helpful. And I'll stay tuned as you provide more details on your progress. ?
MrWorf Posted July 26, 2021 Author Posted July 26, 2021 Converter arrived today, should hopefully have updates later
MrWorf Posted July 27, 2021 Author Posted July 27, 2021 Time for an update It's all working as expected 2
hart2hart Posted July 27, 2021 Posted July 27, 2021 Time for an update It's all working as expected Congratulations! I’ve got all the parts today. I’ll work to duplicate using the 2413U in next couple days. 1
MrWorf Posted July 27, 2021 Author Posted July 27, 2021 Here's what's needed hardware-wise: - Raspberry Pi Zero kit (board, case, power supply, memory card) - NOYITO TTL to RS232 Module - Insteon USB based PLM (using the stick 2448A7) - RJ45 tools to crimp cable Here's what you do: RJ45 pins 1, 7 and 8 are needed and should be mapped to TX, GND and RX respectively on the NOYITO board (RS232 side). If you're using 568B color coding/layout, it will be 1 = Striped orange, 7 = Striped brown and 8 = Brown. On the TTL side, you'll connect GND to any ground on the Pi (I used pin 6), VCC to 3.3V (pin 1), RXD to TX (pin 8), TXD to RX (pin 10). Be careful here, I'm talking about PIN layout, not GPIO layout, see Next you'll need to flash that SD Card with raspberry pi's official OS (the Lite version, we don't need no desktop). Make sure you also place a ssh file in the BOOT drive or you can't access it via network once you've sorted that out (I will not go into details of RPi setup here, plenty of guides for that in the net). Now you need to disable the serial console and BT since they typically use the built-in UART. See https://di-marco.net/blog/it/2020-04-18-tips-disabling_bluetooth_on_raspberry_pi/ Also look at https://www.raspberrypi.org/documentation/configuration/uart.md specifically "Disable Linux serial console" to disable the built-in serial console. Almost there Now you just need to git clone or download a zip of https://github.com/mrworf/serial-bridge ... it will get better instructions to do all the above but I figured this was faster . Once you run the tool, you'll see something like this on the screen: Now it's time to start/restart your ISY. During bootup you should see something similar to this: That's a good sign, it means it's properly communicating with the insteon via your RPi bridge 1
Recommended Posts