Getting Domoticz to autoconnect to Mysensors serial (not USB) gateway
So after finding Mysensors a while ago, I have actually sat down for a day, and got something working, almost..
I have set up an Orange Pi Zero with Domoticz, and have a Mysensors Serial Gateway connecting to it. I don't want the bulk size of going via USBserial, so I have conencted the Arduino Mini to the Orange Pi's UART port directly.
Domoticz seems to only let you choose a USB tty port, so I made a persistent simlink from /dev/ttyS1 to /dev/ttyUS20 and Domoticz connects to that OK.
The problem is, I assume, via USB Domoticz can restart the gateway, via serial it cannot, anyway, after a boot, until I manually hit the reset button on the Arduino, Domoticz does not actually connect to the gateway, and it will not list the version number etc, after reset everything works fine.
My first thought is to just edit the gateway code to have a delay before starting, to allow the Orange Pi to boot, but this is a bit hacky, wonder if there is a 'proper' way to solve this.
Here is how it looks with a quickly made up case I got to say, I love the size, and price of this setup!
dbemowsk last edited by dbemowsk
This post is deleted!
One other thing that I did with my setup was to add a USB connected hard drive and moved the OS from the SD card to the external drive. This will help the problem of burning through SD cards over time. This is the instructions for Raspberry Pi, but the process on the Orange Pi should be nearly, if not identical.
May be a bit hacky also, but what about wiring the reset line of the arduino to a GPIO output and use a script with the wiring Pi library to trigger it at the very end of the boot process.
Not sure what the deleted post said? Ill think about running an external disk, but not sure if it is warranted or not, have to look at how much this setup actually writes the disk, wear leveling etc etc, I have run lots of things from various flash media and not had a problem yet, touch wood! It would necessarily make this setup a fair bit physically bigger is the main thing I don't like.
Yeah, if there is no "offical" way of doing this, I will wire up a GPIO, it will also have the benefit of letting me flash hex updates to the gateway remotely, and if I ever need to, restart it.
In your deleted post, you said you had a simlink too etc, how did you solve the same issue? with the GPIO->reset pin? Also 3D printed case just something basic I threw together in blender, it needs a few tweaks. Total cost to have a fully stand alone Domoticz Linux server with Mysensors gateway = less than $30USD, what a time we live in!
In your deleted post, you said you had a simlink too etc, how did you solve the same issue? with the GPIO->reset pin?
No, I actually put a UPS in place. It has been quite a while since I ran that setup, so I can't say for sure if it behaved the same way or not. I do remember putting the UPS in place though.