Sorry newbie here, I have been trying to get the rest API to work with Lirc Web, but to no avail. The switch doesn’t show up on my UI, and I get this in the info page “ERROR (MainThread) [homeassistant.components.switch.rest] Got non-ok response from resource: 404”.
Please help as I have been on this for over a week and I can’t seem to find a solution I understand in simple terms .
can you post the API call that you are making?
Many thanks sir for the quick response.
my configuration is as thus
I don’t know lirc_web, but a quick glance at their documentation says this should be a POST command.
- platform: rest
name: "Power up TV"
Thanks for the response, but its still the same thing. I have seen some threads like this one that talks about commenting out some lines in the rest.py file like this one https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/switch/rest.py#L66. I had done that, but it seems that still didn’t work. I really need this to work, as my system depends on it greatly.
again, i don’t know lire, but the documentation says you need a POST not a PUT.
POST is the method that I gave you.
Are you sure you have the LIRC server up and running?
What happens if you curl to it?
> curl -X POST http://192.168.0.31:3000/remotes/LG_TV/POWER_UP
I haven’t tried that, will do and get back to you. Yes my server works fine, as I can access it via a web browser.
Thanks and regards
Sorry for the late reply as I have been so busy of late. I finally got to test the URL using a Rest client I installed on my Chrome (as I know not how to use the “curl -x …” and it works fine.
Still haven’t gotten the rest api to work.
Thanks have been solved as I saw a solution on another thread. It has to do with commenting out a line as shared on the earlier thread.