alexbain / lirc_web

Control LIRC from the web using NodeJS and lirc_node
125 stars 60 forks source link

Create buttons to execute shell commands. #52

Open jwhaddad opened 8 years ago

jwhaddad commented 8 years ago

Great work. I've currently got this working and trying to configure for a disabled friend. Also have ha-bridge running and activating the pages to send IR commands by saying things to my Amazon echo like "Alexa turn on the TV". I would like to be able to create extra buttons in the UI that would activate shell scripts stored on the PI. This way I can run custom scripts that control the gpio's and run custom scripts to copy config files and reboot system. Over the last week I have installed and reinstalled many times to get this far. I'm not a programmer but have had a few classes in c++, and understand enough to make basic code changes. I followed your install guides the first time. On more recent installs I used someone else's guide to install node, using his guide it did not take 2 hours for node to install. Also he started out by installing Remote Desktop, setting the servers name and setting up a shared samba file. Then I followed your guide to setup lirc and_ lirc web.

I have many shell scripts saved in the share file that I use to control individual remotes hooked to gpio's, and run commands to reboot and/or copy my custom configs from the share file to the correct places in the the lirc file system. These files can be edited in the share file from any network connected computer, but I must RDC into the machine to run them. I would like to be able to create extra remotes and buttons to run these from the web GUI.

I have spent a few days now trying different ways to get this to work but have had no luck.

I noticed there is an open issue with the ability to use the irsend SIMULATE. If we can get that to work I believe I can get this part working, I can currently use irsend SIMULATE through command line to execute the .sh files in my shared folder. not sure if that would be the best solution though.

Is there currently a way to do this?

SLiX69 commented 8 years ago

Did you had a look into home automation software? Maybe this would be a better way, since you have there lot more opportunities. I use pimatic over a year now and I love it. Great community! For pimatic there is an execute-plugin, which let's you execute cmd commands. These can get triggered by an API

Maybe it is worth trying!

jwhaddad commented 8 years ago

SLiX69, I have tried a few different automation servers already. looks like pimatic might do what i want it to do, and not to difficult to configure. I was playing with Home-Assistant, but its a little difficult to configure and wont do exactly what i want it to do; only has the option for switches not push buttons from what i can tell. i will give pimatic a try in a few days.

SLiX69 commented 8 years ago

Nice to hear that, if you have any questions, feel free to open a thread in pimatic forum, or send me a pm (username: slix)