Pages: 1 [2]   Go Down
Author Topic: arduino web thermostat controlled with android phone  (Read 15369 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello

Thx Marque for very interesting project (Controler, Somfy, ...) many thx

All your project I easy install and use but with thermostat I have a problem with error look below.
Any idea for reason?
I use: Arduino uno R3, Ethernet Shield W5100, DFRobot LCD Keypad Shield,  DHT22 2x 2 channel 5v relay.
The library  EEPROMEx working if I use a sample.
First error in 142 lines:

 """"  Tw = EEPROM.readFloat(address);"""""

thermostat_marque_android.ino: In function 'void setup()':
thermostat_marque_android:142: error: 'EEPROM' was not declared in this scope
thermostat_marque_android.ino: In function 'void loop()':
thermostat_marque_android:281: error: 'EEPROM' was not declared in this scope
thermostat_marque_android.ino: In function 'void action(int, EthernetClient)':
thermostat_marque_android:423: error: 'EEPROM' was not declared in this scope
thermostat_marque_android:460: error: 'EEPROM' was not declared in this scope

thx Marque in advance.
br ale
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An idea for anyone building such a system in a region where temperatures go low enough to freeze pipes:

Make it fail-safe. What if your Ardu-stat turns the heat completely off, by malfunction?

Easy to do:

Keep your old thermostat in the circuit. Set it to turn the heading on at, say, 40 deg F.

Wire your Arduino circuits in parallel across your existing thermostat (assuming that your system turns the heat ON when a switch in the thermostat CLOSES).

Now your Arduino can ADD heat to your house, but even if the Arduino is never calling for heat, the old thermostat can step in, save the day, should the temperature fall to 39.

More on Fail Safe Design at...

http://sheepdogguides.com/des1.htm
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


First error in 142 lines:

 """"  Tw = EEPROM.readFloat(address);"""""

thermostat_marque_android.ino: In function 'void setup()':
thermostat_marque_android:142: error: 'EEPROM' was not declared in this scope
thermostat_marque_android.ino: In function 'void loop()':
thermostat_marque_android:281: error: 'EEPROM' was not declared in this scope
thermostat_marque_android.ino: In function 'void action(int, EthernetClient)':
thermostat_marque_android:423: error: 'EEPROM' was not declared in this scope
thermostat_marque_android:460: error: 'EEPROM' was not declared in this scope

thx Marque in advance.
br ale
same error with Arduino IDE 5.1
with the Arduino IDE 1.0.1 - no errors
Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

New beta version is online.
Find it here: http://forum.arduino.cc//index.php?topic=180344.msg1336692#msg1336692
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone!

I am completely new to this, and chose this as my first project.
Probably should have started with something more simple...

Anyway, this is a bit more that a project, is something that I realy need working...

I bought all the parts, download everything and know I am getting some errors when compiling the sketch.


Highlithed in yellow is the lines I am having problem with...
The first one says:
error: 'DHT22' was not declared in this scope - This should be only to identify the sensor type inside the DHT library.
                                                                                            However if I include the DHT22 library the error goes away.
 
Then the next one says:
error: expected primary-expression before ')' token - I don't have a clue how to solve this one...
 
There is some more, but one at the time... LOL

/*DHT.cpp has an default delay of 250. This makes the system realy slow and must be adjusted to 50 to react faster
  Hardware used:
  Arduino uno
  Ethernet Shield W5100
  DFRobot LCD Keypad Shield
  DHT22 Humidity and Temperature sensor
  2x 2 channel 5v relay
 
__________1___     Room Thermostat pin 2
Relay 1___2__/     Heater pin 2
__________3___     Relay 2
                                       
__________1___     Mot Connected
Relay 2___2__/     Relay 1
__________3___     Heater pin 1 and Room Thermostat pin 1
 
  */
#include <LiquidCrystal.h>
#include <Ethernet.h>
#include <HTTPClient.h>
#include <EEPROMEx.h>
#include <SPI.h>
#include <DHT.h>
 
#define DHTPIN1 (A0)                    // pin connected to temperature sensor
#define DHTPIN2 (A1)                    // optional second temperature sensor
#define DHTTYPE DHT22
 
DHT dht1(DHTPIN1, DHTTYPE);
DHT dht2(DHTPIN2, DHTTYPE);

const int System =  2;     // pin connected to relay 1
const int Heater =  3;     // pin connected to relay 2
const int Buzzer =  A5;     // pin connected to buzzer
float Tc;               // measured temperature
float Td;               // disired temperature
float h1;
float h2;
float t2;
float Tt;
int softwareversion = 1191;
int address = 0;            // eeprom address


If anyone can help will be much appreciated!
Thank you in advance!
Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone!

I am completely new to this, and chose this as my first project.
Probably should have started with something more simple...

Anyway, this is a bit more that a project, is something that I realy need working...

I bought all the parts, download everything and know I am getting some errors when compiling the sketch.


Highlithed in yellow is the lines I am having problem with...
The first one says:
error: 'DHT22' was not declared in this scope - This should be only to identify the sensor type inside the DHT library.
                                                                                            However if I include the DHT22 library the error goes away.
 
Then the next one says:
error: expected primary-expression before ')' token - I don't have a clue how to solve this one...
 
There is some more, but one at the time... LOL

/*DHT.cpp has an default delay of 250. This makes the system realy slow and must be adjusted to 50 to react faster
  Hardware used:
  Arduino uno
  Ethernet Shield W5100
  DFRobot LCD Keypad Shield
  DHT22 Humidity and Temperature sensor
  2x 2 channel 5v relay
 
__________1___     Room Thermostat pin 2
Relay 1___2__/     Heater pin 2
__________3___     Relay 2
                                       
__________1___     Mot Connected
Relay 2___2__/     Relay 1
__________3___     Heater pin 1 and Room Thermostat pin 1
 
  */
#include <LiquidCrystal.h>
#include <Ethernet.h>
#include <HTTPClient.h>
#include <EEPROMEx.h>
#include <SPI.h>
#include <DHT.h>
 
#define DHTPIN1 (A0)                    // pin connected to temperature sensor
#define DHTPIN2 (A1)                    // optional second temperature sensor
#define DHTTYPE DHT22
 
DHT dht1(DHTPIN1, DHTTYPE);
DHT dht2(DHTPIN2, DHTTYPE);

const int System =  2;     // pin connected to relay 1
const int Heater =  3;     // pin connected to relay 2
const int Buzzer =  A5;     // pin connected to buzzer
float Tc;               // measured temperature
float Td;               // disired temperature
float h1;
float h2;
float t2;
float Tt;
int softwareversion = 1191;
int address = 0;            // eeprom address


If anyone can help will be much appreciated!
Thank you in advance!
You need to download the LiquidCrystal and EEPROMEx library's. but i suggest you use the new beta version. it is easier to install and much more stable, I use it for more than a year now and never had problems.  It doesn't come with the LCD but that's what the phone is for smiley
Download it here:
http://forum.arduino.cc//index.php?topic=180344.msg1336692#msg1336692

Please let me know if you run into troubles.

Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

With the new one I get this:

Arduino: 1.5.4 (Windows XP), Board: "Arduino Uno"

ThermoduinoPro_beta_ino:24: error: 'A10' was not declared in this scope
ThermoduinoPro_beta_ino:24: error: 'DHT22' was not declared in this scope
ThermoduinoPro_beta_ino:31: error: 'A13' was not declared in this scope
ThermoduinoPro_beta_ino.ino: In function 'void setup()':
ThermoduinoPro_beta_ino:981: error: 'A8' was not declared in this scope
ThermoduinoPro_beta_ino:984: error: 'A12' was not declared in this scope
ThermoduinoPro_beta_ino:987: error: 'A14' was not declared in this scope
ThermoduinoPro_beta_ino:995: error: 'class DHT' has no member named 'begin'
ThermoduinoPro_beta_ino.ino: In function 'void loop()':
ThermoduinoPro_beta_ino:1030: error: 'class DHT' has no member named 'readHumidity'
ThermoduinoPro_beta_ino:1031: error: 'class DHT' has no member named 'readTemperature'


Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

With the new one I get this:

Arduino: 1.5.4 (Windows XP), Board: "Arduino Uno"

ThermoduinoPro_beta_ino:24: error: 'A10' was not declared in this scope
ThermoduinoPro_beta_ino:24: error: 'DHT22' was not declared in this scope
ThermoduinoPro_beta_ino:31: error: 'A13' was not declared in this scope
ThermoduinoPro_beta_ino.ino: In function 'void setup()':
ThermoduinoPro_beta_ino:981: error: 'A8' was not declared in this scope
ThermoduinoPro_beta_ino:984: error: 'A12' was not declared in this scope
ThermoduinoPro_beta_ino:987: error: 'A14' was not declared in this scope
ThermoduinoPro_beta_ino:995: error: 'class DHT' has no member named 'begin'
ThermoduinoPro_beta_ino.ino: In function 'void loop()':
ThermoduinoPro_beta_ino:1030: error: 'class DHT' has no member named 'readHumidity'
ThermoduinoPro_beta_ino:1031: error: 'class DHT' has no member named 'readTemperature'

The new version is only available for the Arduino mega because of the sketch size. Sorry for that smiley-confuse

And it looks like you don't have the DHT library installed.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok then

But can you help me with the other one!

And that is the thing, the library is installed...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Right, finally I have managed to get it working....
Although, your Thermoduino Pro it seems to suit my needs much better... as you can enable profiles and just control more than one system within the app,  just by toggle the tabs at the top! Great work marque...

So I bought 2 arduino mega, and another Ethernet shield...
To build two systems...
Basically I just want to incorporate my actual wireless thermostats(which one is actually faulty...) into my android control panels...
Photo attached...
Now, your Thermoduino Pro says it will expire in January next year... what that really means?


* 20130701_222850.jpg (1818.41 KB, 3264x2448 - viewed 187 times.)
« Last Edit: November 07, 2013, 07:03:00 pm by lmsvvavr » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some feedback about your Thermoduino Pro...
One of my "control panels" is running android 4.0.4... and the app just close down as if a fatal error is encountered...
On the other panel running 4.1.1 it runs just fine... my both phones with 4.1.2 no problem as well...



« Last Edit: November 08, 2013, 05:00:59 pm by lmsvvavr » Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some feedback about your Thermoduino Pro...
One of my "control panels" is running android 4.0.4... and the app just close down as if a fatal error is encountered...
On the other panel running 4.1.1 it runs just fine... my both phones with 4.1.2 no problem as well...

Good to hear you got it working.
These test version can be use for 3 months only but i will update them before they expire.
How did you connected the app with the arduino? search function, pair function or manually entered the IP?
Did you already used the timer function?
When does the forced close occurs on android 4.0.4? eg. on start up, on tab change, on enter settings?
Do you understand how you can send the extra info like humidity etc.?
Can you send me an screenshot of the working app?
Gr, Maque
« Last Edit: November 10, 2013, 05:16:13 am by marque » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Actually I still awaiting for some of the parts. ..
But I have installed the app...
On the tablet where the app is not working,  it does not even start... starts loading and then just says somthing like the app is not responding and it will close. ..
I will be setting the app manually. .. I use static ip on my network. .. so it will be easy do it manually.

I am not sure how to use the timers, nor how to set the extra info... a little help would be great...
I will indeed post the pictures of the app working... I should get the other bits soon, I will then set everything on the bench and will post the results.
Logged

Pages: 1 [2]   Go Up
Jump to: