Code: Select all
#! /bin/sh
### BEGIN INIT INFO
# Provides: lirc
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
Code: Select all
#! /bin/sh
#
# This is an init script for Debian 2.1 Slink distribution.
# Copy it to /etc/init.d/lirc and type
# > update-rc.d lirc defaults 20
#
test -f /usr/local/sbin/lircd || exit 0
test -f /usr/local/sbin/lircmd || exit 0
case "$1" in
start)
echo -n "Starting lirc daemon: lircd"
start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc
echo -n " lircmd"
start-stop-daemon --start --quiet --exec /usr/local/sbin/lircmd
echo "."
;;
stop)
echo -n "Stopping lirc daemon: lircmd"
start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircmd
echo -n " lircd"
start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd
echo "."
;;
reload|force-reload)
start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircd
start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircmd
;;
restart)
echo -n "Stopping lirc daemon: lircmd"
start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircmd
echo " lircd"
start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd
sleep 1
echo -n "Starting lirc daemon: lircd"
start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc
echo -n " lircmd"
start-stop-daemon --start --quiet --exec /usr/local/sbin/lircmd
echo "."
;;
*)
echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
exit 1
esac
exit 0
hey, MBAmba wrote:I don't think I can help you more than I already did. Either write your own raw command addition to lircd or look at the CCF patch from Bengt
Code: Select all
[b]typedef __u64 ir_code;[/b]
struct ir_ncode {
char *name;
[b]ir_code code[/b];
int length;
lirc_t *signals;
struct ir_code_node *next;
struct ir_code_node *current;
struct ir_code_node *transmit_state;
};
@nry I have a question for you. I just downloaded your source and compiled it. Things seem to be working but not the way I expected them to. Maybe I have done something wrong? Maybe I am just clueless.nry wrote:I managed to hack some additional renamed drivers into the kernel. Works perfectly well for the first 2 receivers/transmitters. Haven't tried the other two.
My git repo can be found here: https://github.com/phillipsnick/rpi-linux
If you look under drivers/staging/media/lirc/
There are three additional files lirc_rpib.c lirc_rpic.c lirc_rpid.c
Then I simply run separate LIRC instances.
Understand this is a dirty hack but gets the job done!
Code: Select all
sudo insmod lirc_rpib.ko gpio_in_pin=22 gpio_out_pin=0
Code: Select all
sudo /usr/sbin/lircd --driver=default --device=/dev/lirc1 --uinput --output=/var/run/lirc/lircd-lirc1 --pidfile=/var/run/lirc/lircd-lirc1.pid /etc/lirc/lircd.conf
Or I guess an alternate plan, if LIRC is able to handle command codes that are 64+ bits long, is to create (by recording) just a few 'commands' for the few things you might want to do remotely:rwcherry wrote:Earlier Post:
"by mba » Fri Oct 04, 2013 10:01 am
I am a bit unsure why you need to send the command in raw format every time and why its not possible to store the raw commands your AC knows in your lircd.conf? Or maybe I don't understand what you are actually trying to achieve altogether.
Could you try to explain your project in more general terms?"
I might be able to add some to this as I want to do exactly the same thing; except in my case it is a YMGI mini-split heat pump installed in my hangar 4 miles away. In these systems the IR remote is not the simple media type remote used by media devices where the code is fixed for each button. The IR remote here is actually the thermostat and contains some higher level of control. When ever any button on the remote is pressed the whole state of the heat pump as a result of that button press is sent and could be different for each press of the same button. So it is not a static key code. For example, say the heat pump is in the heat mode and the temperature set point is 20C. The user presses the '+' key and the remote will send the complete state of the heat pump with a new temperature set point of 21C. Press '+' again and the whole state of the heat pump will be sent with the set point of 22C.
So it cannot be a static key code in a config file somewhere. It has to be created on the fly, or in the 'raw' mode.
I am hoping there is a solution (not smart enough yet to create it myself) ad I want a web interface from home to turn on the heat 30 minutes before I head out & so forth.
bc
In looking at your data & spreadsheets, it would appear that Mitsubishi & YMGI heat pumps use the same controllers/protocol; so I am very interested in your status & progress. Last summer I did some reverse engineering and made some notes, attached as a .pdf here. (pdf not allowed?)AlmightyTech wrote:I cant attach whole file so..
download
http://www.ostan.cz/IR_protocol_analyzer/
and load the attached sample..