– Where can I download the sketch for the Arduino Yun?
There is no need anymore to manually install the sketch in the Arduino Yun. The Android app will do it for you, and will not only install the sketch: the app will configure the whole Arduino Yun and install the needed scripts and tools.
– The relay is working opposite to expected. When I turn the heating on in the app, the boiler turns off. And if the arduino Yun is turned off, then the boiler starts working.
You have to check two points:
1.- Are the electrical connectors used the right ones?
Look carefully at the relay. It has three electrical contacts: NO1, COM1 y NC1. You have two wires which are connected to your boiler, and yo have to connect them to your thermostat through the relay. You have to connect one of the wires to the COM electrical connector. And the other, to the NO electrical connector, because we need the relay working in normally open mode. If you connect the wire to the NC electrical connector, then the relay, and the app, will work opposite as expected. You can see in the following videos, how the app works when the relay is working right (in normally open mode) and when the relay is connected wrong.
2.- Is your relay “High Level Triggered” or “Low Level Triggered”?
If your relay is a “High Level Triggered” relay, like this one (You can buy it at DealExtreme), then it will work correctly out of the box. But sometimes it is hard to know it the relay is one type or another. If you suspect that your relay is a “Low Level Triggered” relay, then you can adjust this setting in the app. In the “Configuration menu-> High level Relay Type”, leave the checkbox unchecked if your relay is a “Low Level relay”. This setting is available since version 1.3.7.