Thermostat w1209

Hello, my project is to control the heat of 5 rooms with my raspberry. in all rooms now i have temp sens ds18b20, what i want to know if i can replace temp sens ds18b20 with termostat digital w1209, and how?

Thanks

@remursus88 welcome to cayenne community.
the w1209 thermostat is pre-programmed embedded micrcontroller which allows you to trigger on/off switch depending on temperature(http://www.kelco.rs/katalog/images/17670.pdf). so i did a google search and dint found a way to connect to arduino so as to connect it to cayenne.
the same function you can achieve with raspberry pi and ds18b20 and connect it cayenne.

1 Like

Thanks for the answer. Want i’m trying to do is to atach a display to each temp sensor, to see the temperature not to verify every time the cayenne dashboard.

Thank you

Displays are currently not officially supported but you can certainly code your own scripts to use them. What kind of display are you using? Model?

Sounds like a really cool project. Keep us updated with your project!

~Benny

That’s the issue, i don’t know what kind a display i can atach.

have a look at this Double Temperature, rain, humidity on LCD with ESP8266

How much info are you looking to display? The main displays I use are 16x2 LCD, 20x4 LCD, or 128x64 OLED

only the temperature eg. 22,25 C

Any of those displays will work fine for you then.

Hi,
Picture and code I use for my temp sensors DS18B20 + OLED 128x64
ds18b20_Oled
Sorry for bad picture.

// Wemos D1 mini temp sensor in each room
// SCL pin = d1 SDA = d2
// OLED display 128x64

//#define CAYENNE_DEBUG
//#define CAYENNE_PRINT Serial
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <CayenneMQTTESP8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Adafruit_GFX.h>
#include <ESP_Adafruit_SSD1306.h>
#define ONE_WIRE_BUS D4  // DS18B20 pin

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature DS18B20(&oneWire);
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

char ssid[] = "";
char wifiPassword[] = "";

// Cayenne authentication info.
char username[] = "xxxxxxxxxxxxxxxx";
char password[]  = "xxxxxxxxxxxxxxxx";
char clientID[]    = "xxxxxxxxxxxxxxxxx";

unsigned long lastMillis = 0;

void setup()
{
  Serial.begin(115200);   
   // Initialise  display
  display.begin(SSD1306_SWITCHCAPVCC, 0x78>>1);
  //display.display();
  delay(500);
  display.clearDisplay();
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}

void displayTemp(float temp)
{ 
  display.setTextSize(1);
  display.setCursor(32,0);
  display.println("Temperature");
  display.setTextSize(3);
  display.setTextColor(WHITE);
  display.setCursor(20,20);
  display.print(temp);
  display.display();
  display.clearDisplay();
}

void loop()
{  
  Cayenne.loop();
  DS18B20.requestTemperatures();  
  float tmp;
  tmp = (DS18B20.getTempCByIndex(0));     
   
  if (millis() - lastMillis > 10000)
  {
    lastMillis = millis();
    Cayenne.virtualWrite(0, tmp);    
  }
  displayTemp(tmp); 
}

Salutations

2 Likes

nice @Bernard. if you can make a tutorial on this and add it in article section.

Hello @ shramiksalgaonka,
Very kind of you.
I thougt that could be usefull to @ remursus88
As you can read, my English is not famous so I dare not publish too much but I will try to make something readable.
I just added a new feature : a Cayenne input in order to drive a relay module or driving a thermostat … There are tons of possiblities …
Salutations

@Bernard if you make a article then it might help alot of users in community and you can give a try to make a article.