Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

How to run custom comand with IR remote?
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
How to run custom comand with IR remote?
9th Apr, 2013, 05:09 AM
Post: #1
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
How to run custom comand with IR remote?
Sometimes my IR remote starts work incorrectly. To fix it I must went to another room then run ssh client and execute 2 sudo-commands. How to map these commands to one button of my remote?
Find all posts by this user
Quote this message in a reply
9th Apr, 2013, 05:15 AM
Post: #2
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: How to run custom comand with IR remote?
The program you need is irexec.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
9th Apr, 2013, 03:34 PM
Post: #3
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
RE: How to run custom comand with IR remote?
Ok, thanks.
Second question. How to run this at the system start? Looks like this dont work
Terminal
xbian@xbian ~ $ cat /etc/rc.local
#!/bin/sh -e
#
# By default this script does nothing.

irexec -d /home/xbian/.lircrc
exit 0
xbian@xbian ~ $ ls -al /etc/rc.local
-rwxr-xr-x 1 root root 336 Apr 9 09:13 /etc/rc.local
Find all posts by this user
Quote this message in a reply
9th Apr, 2013, 06:18 PM
Post: #4
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: How to run custom comand with IR remote?
Edit the file for your config in /etc/lirc/hardware/ and set START_IREXEC=false to START_IREXEC=true

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
9th Apr, 2013, 06:46 PM
Post: #5
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
RE: How to run custom comand with IR remote?
If I use GPIO reciever, I have to change the /etc/lirc/hardware/lirc_rpi.conf, right?
Now it looks like that
Terminal
xbian@xbian ~ $ cat /etc/lirc/hardware/lirc_rpi.conf
# /etc/lirc/hardware/lirc_rpi.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="-u"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
START_IREXEC=true

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"

# Default configuration files for your hardware if any
#LIRCD_CONF=""
#LIRCMD_CONF=""
Terminal
xbian@xbian ~ $ cat .lircrc
begin
prog = irexec
button = key_open/close
config = sudo /home/xbian/irrestart.sh &
end
Terminal
xbian@xbian ~ $ cat irrestart.sh
#!/bin/bash
service lirc stop
sleep 3
service lirc start

It works when I starts the irexec manually. But autostart doesnt work.
Find all posts by this user
Quote this message in a reply
9th Apr, 2013, 06:56 PM
Post: #6
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: How to run custom comand with IR remote?
It should work like this, can help you further, sorry.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
18th Apr, 2013, 03:16 PM
Post: #7
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
RE: How to run custom comand with IR remote?
Should I create a bugreport on the github page?
Find all posts by this user
Quote this message in a reply
18th Apr, 2013, 05:05 PM
Post: #8
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: How to run custom comand with IR remote?
No, because i got it working perfectly here. So it must be something in your config that we don't see.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
18th Apr, 2013, 05:54 PM
Post: #9
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
RE: How to run custom comand with IR remote?
Ok, then is somewhere any log that can show me what happens?
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  [SOLVED] some key not working on Custom remote lehulk 6 17,884 9th Jan, 2015 03:28 AM
Last Post: Groormat
  My custom remote.xml especially for your listening pleasure Gyuunduh 2 13,862 23rd Feb, 2013 03:43 AM
Last Post: Gyuunduh

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 22nd May, 2025, 07:23 AM Powered By MyBB, © 2002-2025 MyBB Group.