Hi, working on this project and need some advise and how to proceed from here.
I have a bootstrap web page which has buttons for different elements of a model house that im using. eg lights: on or off, front door: open or close etc. When you click these buttons it updates a database with json which contains the name of the device and current state.
I then also have the model house which has 3 imps in it controlling various elements eg lights, front door as well as some analog inputs like internal and external temperature. This all works when calling the agent url directly.
I now need to connect these 2 so I can control the house via my web app. Basically how do I connect the agent URL to the button click so it open/closes the door (without redirecting the page obviously) and same but for the analog_in so I can get the temperature reading displayed on the web page.
Not very complicated but struggling to find some basic examples of this and get my head around it.
Involving ajax, post, php?
Thanks in advance.