Salve a tutti ragazzi. Sto impazzendo : smiley-confuse:
Voglio creare una casa domotica. Per ora solo con il controllo luci.
Fino ad ora sono riuscito a farlo solo con il bridge però non è dinamica. Salta alla pagina e poi bisogna tornare indietro manualmente.
Io vorrei che torna automaticamente alla pagina iniziale e a quel punto cambia l'immagine da off a on.
Qualcuno può aiutarmi ? Non so come fare : smiley-confuse: : smiley grido:
For the sake of others, here's the Google automated translation:
Hello guys. I'm going crazy
I want to create an automated home. For now only with the lighting control.
Until now I could only do that with the bridge, however, it is not dynamic. Skip to the page and then have to go back manually.
I would that automatically returns to the home page and then change the image from off to on.
Can someone please help me ? I do not know how to do
This sounds like a web programming issue, not specifically a Yun or Bridge issue. (Web programming is not my strength.)
It sounds like you are currently clicking a button on a page, which links to a URL that puts the data on the bridge. What you need to do instead is have the button run some JavaScript that makes a request in the background, and then updates the current page.
Hopefully someone who knows something about web programming will be by to make some suggestions?
ShapeShifter:
For the sake of others, here's the Google automated translation:This sounds like a web programming issue, not specifically a Yun or Bridge issue. (Web programming is not my strength.)
It sounds like you are currently clicking a button on a page, which links to a URL that puts the data on the bridge. What you need to do instead is have the button run some JavaScript that makes a request in the background, and then updates the current page.
Hopefully someone who knows something about web programming will be by to make some suggestions?
@Shapeshifter,
Yep. Got it. thanks for the help,
You want to learn about Zepto.js (which is a clone of JQuery, but better for Yun) and about the REST API.
You will control the Atmel ATmega32u4 (Arduino) from the web. The network is controlled via Linux on the Yun. You should know that Yun has two (2) controllers. If not, read this - Arduino Yun
Learn:
Your code will look like this:
$('button').click(function() {
$ajax('http://myArduinoYun.local/arduino/digital/13/1');
});
The button will turn on the lights.
The button will NOT change the page.
You can put many buttons on one page; the page will not change.
Buena Suerte/Good Luck
Jesse