Page 1 of 1

irtrans autoconnect option wish

PostPosted: Sat 23. May 2009, 11:28
by nodepeeker
Hi,

I let my ethernet irtrans get its IP from my ISP DHCP server in the modem.

So I use this command line to start irtrans:
sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 10.0.1.9

What I would love is either to pass the mac address to irserver:
sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 00:50:c2:52:78:ea

OR preferrably a parameter like 'autoconnect'

sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 autoconnect

which would connect to the 1st/only ethernet irtrans hardware on the network.

I may get round to writing a script option that will add this, but I was thinking your irtrans software could parse the arp table for completes and check if its the ether/irtrans and if it is then get the IP from the arp table and use that.

I was thinking that if I wrote a linux /etc/init.d/irserver {start|status|stop} script I would do it in that, ensuring correct runlevel (ie network up).

and then the icing on the cake would be to have an extra function in irclient (/usr/local/irtrans/irclient localhost ) that if it fails to connect to the local host it starts irserver... but thats just OTT :)

Re: irtrans autoconnect option wish

PostPosted: Sat 23. May 2009, 16:05
by IRTrans
Autoconnect is already possible: Simply use "lan" instead of the IP address.

Please note that this might not work on multihomed systems.

Connecting via the MAC Address is not possible - to be honest it does not really make sense from my point of view.

Another way would be to simply assign a fixed IP Address to the IRTrans using ip_assign or the web interface.

IRTrans

Re: irtrans autoconnect option wish

PostPosted: Sat 23. May 2009, 20:54
by nodepeeker
Cheers