Jump to content

Insteon 2448A7 + RaspberryPi + ISY994?


MrWorf

Recommended Posts

Three things remain now:

  1. Update README.md with good step-by-step instructions
  2. Write a bridge.service so it will automatically start/restart the bridging tool without needing to ssh
  3. See if I can locate a 5V on the ISY and get rid of the extra wallwart

But for now, I'm going to relax on the patio :D

Link to comment
9 hours ago, MrWorf said:

Three things remain now:

  1. Update README.md with good step-by-step instructions
  2. Write a bridge.service so it will automatically start/restart the bridging tool without needing to ssh
  3. See if I can locate a 5V on the ISY and get rid of the extra wallwart

But for now, I'm going to relax on the patio :D

Here is what I use for my bridging software. I run it every few minutes from cron. Should be able to just substitute your bridge run software into the command line.

#!/bin/sh -e
#If python3 is not running then start NRbridge.py
#Install times  to retest hourly using crontab -e


if ! pgrep -f "NRbridge.py" > /dev/null
then
    python3 /home/pi/NRbridge/NRbridge.py &

fi

exit 0

 

Link to comment

I actually added a bridge.service and a install.sh script now which will simplify things. Just run install.sh as root and it will place the bridge.py in /opt/serial-bridge and install and enable the service so it runs every time on boot using systemd.

Link to comment

Uhm... so... I couldn't help myself...

image.png.30e4e96a456a1bd68ed8da407d8f5dc2.pngimage.png.c120585771d50f6e4f12325bac53228a.pngimage.thumb.png.1a75bc4247287e33dad0e15bfdb2e7a2.pngimage.thumb.png.98fe004a298194cb4ac1b042b3db75ec.pngimage.thumb.png.1bd6dfb94f5bdbe63fd5ae798ee9ece0.pngimage.thumb.png.4dedb0c4b7cdd5e169241f1c10683b34.png

 Yupp, it fits :-) ... What you're seeing here is the first ISY994i with built-in Raspberry Pi Zero Wireless being powered by the ISY itself.

Turned out that the first pin on the top right provides 5V, followed by 3.3V followed by GND, as can be seen here

image.png.cf00d0f7a22ba19fb52965a572429061.png

 The tricky thing was making sure that the serial bridge was started fast enough when coldbooting the RPi.

Goal is to update the README.md with instructions for doing this, since it's crucial for the ISY to be able to find the PLM. If it's too slow to start the bridge, the ISY will just assume nothing is connected.

If you can't wait, the following resource should get you started on the right path http://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html. I'm pretty sure disabling network would further improve speed, but I like that I can SSH into my RPiZW :)

 

Link to comment
Or perhaps the ISY could handle reconnect of both PLM and polyisy? Delays are the worst workaround ever since they don't really solve the issue just the symptom
ISY already supports http(s). It retries already.
However. things can get permanently messed up by boxes half prepped and answering requests.

Like my ISY994 using an IP address of 0.0.0.0.
Why would it retry when it already had an IP address?

Many people use expensive power bar, power up sequencers already to ensure proper boot order.

Sent from my SM-G781W using Tapatalk


Link to comment
3 hours ago, hart2hart said:

Fabulous! I hope to get solder gun out and hook up to duplicate with the2413U. I had been reading about boot times so it’s great that you’ve found excellent resources to get rid of extra processes.

Soldering gun? That would be an easy way to burn off a run or two. Soldering iron designed for PC Board use. With a small tip is better.

Sudden power loss may also cause issues. When the X10 forums where using a Raspberry Pi. For their custom X10 controller.  A disorderly shut down of the Raspberry Pi frequently resulted in a corrupt memory card.

Link to comment
On 7/27/2021 at 4:15 PM, MrWorf said:

I actually added a bridge.service and a install.sh script now which will simplify things. Just run install.sh as root and it will place the bridge.py in /opt/serial-bridge and install and enable the service so it runs every time on boot using systemd.

Hi - Thanks again for all of your work!

I don't see the install.sh on github?  Tomorrow I am going to assemble everything and try to get it running. Just wanted to see if the 'noob' install.sh version is available. ?

Link to comment
  • 3 weeks later...

Thanks for all the work on this. I have assembled and connected my own copy. I did notice that the install.sh doesn't make the bridge.py executable, so my first attempt failed. Easy to fix. 

If I run bridge.py I see:

INFO: Found ttyUSB0 port
INFO: Found ttyAMA0 port
INFO: Bridging between ttyAMA0 and ttyUSB0

So that looks good. But I don't seem to be able to add an Insteon device. Is there something I can do on the ISY to check that the bridge is seen?

Link to comment

ISY should complain if it cannot talk to the PLM.

But if you select this

image.png.6e8b85f87068725b09fdb8cf2492043e.png

You should get something like this

image.png.6a6f85a137d5848a5fa235d4c7e95f02.png

Maybe the issue is that you switched PLM and haven't migrated to it? Because if you don't migrate, insteon units will ignore your messages.

Link to comment

Add another big Thank You and success story.  Rpi 2B, RJ45 to DB9 cable, DB9 RS232 to USB adapter.  Almost 'off-the-shelf'.  I still had the factory supplied ISY994 serial cable, but tx/rx have to be swapped.  I didn't have a DB9 Null Modem adapter so I made a custom cable as you suggested using a patch cord and DB9 connector with screw terminals so no soldering at all.  Both the 2448A7 and 2413U work perfectly.  And thanks to all of the other contributors on this thread and others for their advice.  I'm afraid to see what happens after power cycling, but hopefully this is temporary.

Link to comment

I wonder if it would be possible to use this to create an Insteon IP bridge/proxy between sites? (I'd love to have reliable Insteon coverage in my garage, but neither the powerline nor RF appears to be reliable ... )

My thought would be along the lines of:

ISY -> 2413S --(RF)-> 2448 --(RS232)-> RPi --(Ethernet over PowerLine)-> RPi -> 2448 --(RF)-> Light switches

(I see a future project for after my Polisy/ISY testing)

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...