Thermoduino Pro

Thermoduino Pro is the Pro version of my first android application "Thermoduino" and is used to control the temperature in your house from anywhere in the world. The new version comes with a new arduino sketch which can handle timers you can set in the app and show extra sensor info like humidity etc.
You need:
1 arduino Mega
1 W5100 ethernet shield
1 DHT 22
1 two channel relay card
some wiring
EEPROMEX Library
DHT Library
RTC Library

Android app
Arduino sketch


Very nice but since you don't share the code or even the app why are you here trying to sell your app?
This is a forum community not a store for you advertise your apps

HugoPT:
Very nice but since you don't share the code or even the app why are you here trying to sell your app?
This is a forum community not a store for you advertise your apps

Hi HugoPT,

Thanks for you feedback. All my Arduino code is available online and all Android apps are or will be available for free in Google Play. Since I began developing projects for Arduino I have spend about 400 hours work, 500 euro's on testing hardware and 100 euro on site fee's. People downloaded my app's and sketch more than 55.000 times and all I got for it 160 euro. Fine for me but I wont call it a store. The paid versions are only a way to support the development and wont get me rich.
I decided not to share my Android code yet, I hope you respect that.

I have added security to your code, so only configured ip adresses can acces the thermoduino, if you have the thermoduino connected to the internet like me, otherwise everybody can controll my home thermostat by executing http get commands

maybe you could add, that from your app, these allowed ip adresses are stored in EEPROM and can be added from your app?

these are the needed code changes:

// Voor toegang tot Thermoduino
IPAddress ipBuf;
// Geef vertrouwde IP adressen op vanaf waar je de thermoduino kunt bedienen
IPAddress Work (xxx,xxx,xxx,xxx); // <== INSTELLEN
IPAddress Allowed1 (xxx,xxx,xxx,xxx); // <== INSTELLEN
IPAddress Allowed2 (xxx,xxx,xxx,xxx); // <== INSTELLEN


void run_eth()
{
  EthernetClient client = server.available();           
  if (client)
  {
    // Mijn Code
    /********** Beveilig Toegang **********/
    
    ipBuf = client.remoteIP();
    // Stel thuis netwerk IP adres in dus bv 192.168.2 (alleen 1e 3 nummers: bv 192.168.2) en stel andere toegestane IP adressen in
    if (((ipBuf[0] == 192) && (ipBuf[1] == 168) && (ipBuf[2] == 2)) or (ipBuf == Work) or (ipBuf == Allowed1) or (ipBuf == Allowed2))
    {
      // Einde Mijn Code

it also needs a small modification of the original Arduino Ethernet library wich is explained here http://forum.arduino.cc/index.php/topic,135082.0.html

#define hyst2 0.4
if (((Td-hyst2) > Tc) && S && !ER && !H) //ON
if (((Td < Tc) || !S || ER) && H) //OFF

void calculate()
{
DateTime now = RTC.now();
if (T && N)
{
ER = false;
}
else
{
if (DEBUG3) Serial.println("Siete alebo teploty Chyba citania!");
ER = true;
}
if (S && networkonline && T && !ER){
digitalWrite(System, HIGH);
}
if (!S || ER) {
digitalWrite(System, LOW);
S = false;
}
if (((Td-hyst2) > Tc) && S && !ER && !H)
{
Voff = 0;
Von ++;
if (DEBUG3) Serial.print("Sekund pred zapnutim vyhrievania: ");
if (DEBUG3) Serial.println(HeaterStatusDelay - Von * interval1 );
if (Von == HeaterStatusDelay / interval1)
{
(H = true);
if (DEBUG3) Serial.println("zapnutie ohrievaca");
if ((Tc > 0) && (Tc < 40))
{
digitalWrite(Heater, HIGH);
// sendData();
}
else
{
(H = false);
if (DEBUG3) Serial.println("DHT chyba, vypnutie ohrievaca");
digitalWrite(Heater, LOW);
}
Von = 0;
}
}

else
{
(Von = 0);
}
if (((Td < Tc) || !S || ER) && H)
{
Von = 0;
Voff ++;
if (DEBUG3) Serial.print("Sekund pred vypnutim ohrievaca: ");
if (DEBUG3) Serial.println(HeaterStatusDelay - Voff * interval1);
if (Voff == HeaterStatusDelay / interval1)
{
(H = false);
if (DEBUG3) Serial.println("vypnutie ohrievaca");
digitalWrite(Heater, LOW);
Voff = 0;
if ((Tc > 7) && (Tc < 40)){
// sendData();
}
}
}
else (Voff = 0);

@ambroz666
meaning of this (hard to understand) code?

javascript:void(0);

thermoduino__hysterezaOK.ino (72.4 KB)

The code is not hard to understand, if compaired to the original code

it is a small code mod, if you ignore the slovakian serial.print changes lol

but some explaining would have been nice lol

I believe the point is:

Hysteresis - Wikipedia for a thermostat

achieved by:

adding:

#define hyst1 0.4

and changing

if ((Td > Tc) && S && !ER && !H)

to:

if (((Td-hyst1) > Tc) && S && !ER && !H) //hysterezy0,4celzia

I think that is what ambroz666 is trying to accomplish...

I did not yet have to turn on my heater this year, so I can not yet test it, but I will...

Winter is coming... (Game of Thrones anyone? :P)

please help:
//RTC_Millis RTC; //for software rtc
RTC_DS1307 RTC; //for hardware rtc

eror:
RTC.begin(DateTime(DATE, TIME));


/********************* RTC start ****************************************************************************/
void start_rtc()
{
Udp.begin(localPort);
Wire.begin();
RTC.begin(DateTime(DATE, TIME));
}


no matching function for call to RTC_DS1307::begin(DATA TIME)
sketch_oct06a.ino: In function 'void start_rtc()':
sketch_oct06a:362: error: no matching function for call to 'RTC_DS1307::begin(DateTime)'
C:\Program Files (x86)\Arduino\libraries\RTClib/RTClib.h:31: note: candidates are: static uint8_t RTC_DS1307::begin()

The error states you want to pass a parameter to the begin function, but the used library's begin() function does not accept parameters.
Open the .h file of the RTC library and look what it uses for parameters (or none).

how to make:
RTC_DS1307 RTC; //for hardware rtc
please file INO

The library you use has probably examples, please give then a test run and see how they solve it.

Hi,
when arduino and wifi lose power supply and after power supply is restored but internet doesn't working then application Thermoduino pro loses its meaning because it don't have RTC. Application is still searching for connection and for that thermostat lost its functionality. Do somebody know edit program so RTC run hardware pins SCL, SDA not from internet? What library I have to use? (any link???) I have I2C RTC DS1307 AT24C32 Real Time Clock Module for Arduino 51 AVR ARM PIC. http://www.aliexpress.com/item/Free-Shipping-I2C-RTC-DS1307-AT24C32-Real-Time-Clock-Module-for-Arduino-51-AVR-ARM-PIC/1786267095.html My program is in supplement.
email: ambroz666@gmail.com

Thermoduino_Pro.ino (72.4 KB)

hi, i saw in your scheme that you also included n lcd + keypad shield but in the sketch i don't find any trace of code regarding lcd: do you have another version which includes also the lcd display?