Closed zycker closed 10 years ago
Hi @zycker - were you able to get this resolved? Everything is working on my end.
Hi, Yes, sorry for that but I did solve this by fully erasing the previous version. It works just fine now. Maybe you could help me with another thing, I've planned to use the API in my own UI, I've see the endpoints on github but I absolutelty don't know what to do with that, I'm a totatlly beginner in web programming. I've just made my gui with appery.io, do you just have a link to a tutorial that show how to use these endpoints or just GET and POST globally ?
Happy Christmas.
Le 23/12/2013 23:28, Alex Bain a écrit :
Hi @zycker https://github.com/zycker - were you able to get this resolved? Everything is working on my end.
— Reply to this email directly or view it on GitHub https://github.com/alexbain/lirc_web/issues/4#issuecomment-31147694.
Hi,
No worries. I don't have a formal tutorial written up, but the POST endpoints work like this:
http://url_to_lirc_web/remotes/$remote/$command
So if you had a remote in LIRC called "Sony_TV" and a command called "Power" this would mean that lirc_web would respond to a URL that looks like this:
http://url_to_lirc_web/remotes/Sony_TV/Power
All of the remotes/$remote/$command
endpoints respond to POST requests. You could certainly hit endpoints with a POST request from an app built with appery.io, as long as your app was on the same network as your lirc_web server.
In addition, if you wanted to build your UI in appery.io - you may find yourself wanting to get a listing of all the remotes and all of the commands for those remotes. There is also a basic JSON endpoint to do that:
http://url_to_lirc_web/remotes.json
Hope that helps, let me know via email (available on my profile) if you have additional questions.
Hi, I was using your great Lirc_web since a few month and it works just fine but today I've tried to update it and now when I try to access my Rpi at port 3000 I've got this :
Error: ENOENT, no such file or directory '/var/www/lirc_web/templates/index.swig' at Object.fs.openSync (fs.js:427:18) at Object.fs.readFileSync (fs.js:284:15) at getSingle (/var/www/lirc_web/node_modules/swig/lib/swig.js:152:19) at get (/var/www/lirc_web/node_modules/swig/lib/swig.js:159:7) at Object.exports.compileFile (/var/www/lirc_web/node_modules/swig/lib/swig.js:177:7) at Object. (/var/www/lirc_web/app.js:25:17) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
Index.swig is present in template folder. I've just followed the instructions on your README, with sudo. Do you have a clue ?