Hi!
I’m new here after having to switch away from NetIO. There, it was dead simple to set up a button that sends an HTTP request. I understand that HTTP Client has been deprecated and that I should be using the plugin architecture.
I’ve tried the HTTPExample, but am stuck (I think) on the device binding when attributing the ‘clicked’ trigger. I’ve watched several tutorials and looked at templates, and have tried some, but I still don’t get how to do this. Does anyone have a .hrp to share? A tutorial video?
Thanks!
I can upload my hrp if allowed.
Attached is an example showing how to send HTTP requests.
HTTPExample.hrp (7.9 KB)
This uses the sample code from here.
Here is another example of creating buttons:
In the Bills example Switch capability is used so values “On” and “Off” need to be checked. By using custom capability any value can be used.
Many thanks, Bill, for the prompt reply, I got my hrp working thanks to you. I’m now trying to address other issues, should rather be making a new post I guess.
Thanks VPow, the thread is insightful and the custom capability very helpful.
Hi Moarteen,
Welcome to the Home Remote. I used NetIO for a little while when moving from iRule. It was very limited so im sure you`ll enjoy the huge opportunities THR has
I didnt think irule could be replaced… I was wrong.
Hi John,
I have no doubt that THR is very powerful. Just have to adapt to the learning curve
Indeed it is, but while it’s lacking in documentation, this forum is very active and Bill answers most questions and provides examples. Start with the videos if you haven’t already and go from there.
If your thinking about plug-ins you need a little JavaScript which I learned from the freenodecamp videos on YouTube.
Hello guys,
I also come from iRule and NetIO and I am fed up with cloud based software.
John is still known to me from the iRule forum and if I remember correctly he was very active there.
My name is Kalle and I am trying to recreate my NetIO configuration with TheHomeRemote.
TheHomeRemote looks for me first more extensive than iRule or NetIO. It has infinite possibilities and I’m trying to find a start.
I use my own device for sending IR and RF commands, which I built myself based on an ESP chip.
The codes are sent with simple HTTP requests. Here is an example to turn on a RF switch:
http://192.168.68.208/sendRF?code=4117&bits=24&n=1
192.168.68.208 is my ESP device
/sendRF?code=4117&bits=24&n=1 is the RF code to switch on.
You can also send IR codes in iTach / Pronto and IR- Raw format or as short HEX codes - so many possibilities.
This works so far with the HTTP example plugin above.
But unfortunately I am not a programmer, but I would like to know how to define a device in TheHomeRemote (only with the IP-address), so that I can execute commands with the created buttons.
I hope I have described my problem reasonably well and would be happy if someone could give me an example.
I think once I have a start I will find my way around, but all beginnings are hard.
Kalle
Attached is another example I tailored for your use that should be a little easier to configure. All you need to do is update the commands
variable to include all of your requests. I’ve configured your PowerOn command so that should work. You can fill in the rest.
- The 1st column is the command name. This can be whatever you wish to call it.
- The 2nd column is the URL minus the http://192.168.68.208.
Here is the project:
Netio.hrp (105.0 KB)
Here is the plugin separately in case you wish to import it into an existing project
netio.plugin (1.3 KB)
Hi Bill,
big thanks for the quick help.
Kalle
Hi Bill,
your code above works fine with the simulator (when I press the button in the simulator, the light switches on and off), but it doesen’t work in my project on the iPad.
I have no idea what is wrong. The simulator has a log in which I can see that the commands are executed.
Did you have any idea?
Thanks,
Kalle
Sorry, it was my fault - I have solved it by my self.
The button was not in front and in this way not clickable.
Kalle
Hello Bill,
I am new to migrating from Imperihome to HR. I adapted this example to communicate with my Vera but it doesn’t work for me. I always receive an error message “No public methods with the specified arguments were found.”
This is the HTTP request I am making :
http.get(“http://MY_VERA_IP:3480/data_request?id=variableget&DeviceNum=227&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature”);
Device 227 is a TemperatureSensor1 device.
If I try this request in a web browser it’s OK but not in HR.
Could you tell me if my code is not correct or if I forgot something ?
Thanks.
I don’t think Bill is really active in this forum anymore.
You can use the Vera plugin from HR, which is much easier than http request via this plugin.
I agree that you should investigate using the Vera plugin, like KalleVC said.
However, if you want help with your code, you are going to have to tell us how it doesn’t work, and show us the relevant code.
Thank you for your responses.
In fact I have problems with the Vera plugin and not having found a solution on this side I tried using an HTTP request.
I explain this in the thread I just created.
However, I would need to understand why the HTTP request does not succeed because my home automation installation includes several connected objects which I access via HTTP requests to the integrated web servers.
About the code I took the HTTPExample example and I just modified the requests in the plugin. Here is the modified plugin
HTTPExample.plugin (1.6 KB)
Sorry my previous message does not correspond to this thread