Closed computerfreek274 closed 4 years ago
it's available in the dev branch at the moment https://github.com/sinricpro/esp8266-esp32-sdk/tree/dev-2.3.0/examples
it's available in the dev branch at the moment https://github.com/sinricpro/esp8266-esp32-sdk/tree/dev-2.3.0/examples
So this example is not setup yet to controll a relay/pin as of yet ? Unless I missed it in the code. I like to control a relay and pun like with the old sinric. Just need one pin like d4 on and off after having Alexa set the temp. I am not very good at programing just really good a building stuff. Great work so far on v2 of sinric I paid for 3 units but plan on setting up 16 in total. Thanks again hope I can get thermostat working this week.
You have to add a SinricProSwitch device too... you need 2 different devices here (wich can run on the same ESP). Usually a thermostat dont have capabilities to control 8 relays. So you need to implement on one ESP
You have to add a SinricProSwitch device too... you need 2 different devices here (wich can run on the same ESP). Usually a thermostat dont have capabilities to control 8 relays. So you need to implement on one ESP
- SinricProThermostat
- SinricProSwitch
Yeah just need one relay on and off for a fan setup based on temperature. Was hoping that could be done with just the thermostat example on like pin d4. I will have to explore and see what I can figure out. So what you are saying I need two esp's one switch/relay and one esp for thermostat code ?
No, you can have it all in one ESP. But you have to setup 2 SinricPro devices here
OH wait Please tell me what you want to achive. Do you want to control the fan via alexa, or just via your thermostat (dependent on the temperature)?
OH wait Please tell me what you want to achive. Do you want to control the fan via alexa, or just via your thermostat (dependent on the temperature)?
dependent on the temperature and the ability to have Alexa set the temperature. Esp+dht22+relay out to a fan based on temperature. This setup will be used for a greenhouse to turn on and off fan based on temperature so if I tell Alexa set temperature to 68 the esp should try to keep it there.
Ok, then for the relay, you don't need an SinricPro device. Just turn on / off the pin your relay is connected to in dependencie of measured temperature.
Ok, then for the relay, you don't need an SinricPro device. Just turn on / off the pin your relay is connected to in dependencie of measured temperature.
Yes that sounds about right. I will play around with it tommorow. I got temperature units setup today to just read temperature and feed it back to sinric works great. I plan on setting up a crap load of them used in our greenhouse and was hoping to be able to just flash a thermostat code to controll a relay on one of the output pins.
Good news, we have been testing the temperature chart last couple of days in the test server. I believe it's ready to be pushed to the production server now. here is a sneak peek
Good news, we have been testing the temperature chart last couple of days in the test server. I believe it's ready to be pushed to the production server now. here is a sneak peek
Very nice work this looks great!
Ok, then for the relay, you don't need an SinricPro device. Just turn on / off the pin your relay is connected to in dependencie of measured temperature.
This is what i am looking for to do something like this but with sinric pro. https://github.com/dmainmon/ESP8266-12E-DHT-Thermostat/blob/master/ESP8266-DHT.ino
What does it do?
What does it do?
Sorry that was the wrong link look at this one https://github.com/dmainmon/ESP8266-12E-DHT-Thermostat/blob/master/ESP8266-DHT.ino
now if we can do this with sinric and tell alexa at what temp to set it at.
I remember with the ver 1 of sinric someone had a way to control an A/C unit off of a relay. i can not find that ino.
Sorry, i dont have the time to read an analyze all that code. Maybe you can explain what it does and what the issue is?
Thermostat example is now available in master branch (Version 2.3.0)
Sorry, i dont have the time to read an analyze all that code. Maybe you can explain what it does and what the issue is?
Sorry esp8266 + dht22 + relay = fan on and off based on temp. controller Basically the same as a house theromostat to control heat or A/C.
Thanks Guys everything is looking good on the site the temperature logging is working great! Keep up the great work.
is sinric pro supported on Ifttt yet ?
So, your issue is solved now?
So, your issue is solved now?
No still looking to setup the thermostat on a relay or Swtich.
With the Thermostat example is now available in master branch (Version 2.3.0) Where do I hook the DHT22 too What pin ? Or is that something I need to know how to code in ?
If I can get the DHT setup on the Thermostat example say on D2 and a relay on D4 I would be all set.
Then it would act just as a smart thermostat.
Hooking up the DHT belongs to you. This is not related to SinricPro. SinricPro and the library is only for communication between your device (ESP) and Alexa/GoogleHome via SinricPro Server.
So your task is to hook up the DHT to pin you want and program the control logic you want to achieve.
Hooking up the DHT belongs to you. This is not related to SinricPro. SinricPro and the library is only for communication between your device (ESP) and Alexa/GoogleHome via SinricPro Server.
So your task is to hook up the DHT to pin you want and program the control logic you want to achieve.
Ok Thank you.
Can you just tell me how to change and where the Thermostat to Fahrenheit temperature. i looked around SinricProThermostat.h for a clue but did not find it.
Thanks again for all your help.
Change the temeprature unit in portal.sinric.pro in your account settings. Keep in mind that DHT22 may only return Celsius. For conversion see our Temperaturesensor Example <- This is a direct link to requested line of code!
Change the temeprature unit in portal.sinric.pro in your account settings. Keep in mind that DHT22 may only return Celsius. For conversion see our Temperaturesensor Example <- This is a direct link to requested line of code!
Thank you. I am going to close this out then I need to find someone who can help me Code this up.
Are you guys planing on support for IFTTT ten we can just ling thermostat or a switch, light and so on. Thanks again have a great day.
Good news, we have been testing the temperature chart last couple of days in the test server. I believe it's ready to be pushed to the production server now. here is a sneak peek
Is it possible a custom scale, due now is not precise enough
Good news, we have been testing the temperature chart last couple of days in the test server. I believe it's ready to be pushed to the production server now. here is a sneak peek
Is it possible a custom scale, due now is not precise enough
Temperature chart working great and looking good On my temperature devices. Just hoping to get thermostat working with a dht22 and a relay. Been trying but getting lots of errors in my code. i will get there over time. Hopefully that someone will make one on github as my coding is a mess.
Really great job on the temperature chart
Done via e-mail support
hello everyone, I can't read the temperature of my sinricpro device, I used this code
#define DEBUG_ESP_PORT Serial
#define NODEBUG_WEBSOCKETS
#define NDEBUG
#include <ESP8266WiFi.h>
#include <WiFi.h>
#define THERMOSTAT_PIN 17
float globalTemperature; bool globalPowerState;
bool onPowerState(const String &deviceId, bool &state) { Serial.printf("Thermostat %s turned %s\r\n", deviceId.c_str(), state?"on":"off"); globalPowerState = state; return true; // request handled properly }
bool onTargetTemperature(const String &deviceId, float &temperature) { Serial.printf("Thermostat %s set temperature to %f\r\n", deviceId.c_str(), temperature); globalTemperature = temperature; return true; }
bool onAdjustTargetTemperature(const String & deviceId, float &temperatureDelta) { globalTemperature += temperatureDelta; // calculate absolut temperature Serial.printf("Thermostat %s changed temperature about %f to %f", deviceId.c_str(), temperatureDelta, globalTemperature); temperatureDelta = globalTemperature; // return absolut temperature return true; }
bool onThermostatMode(const String &deviceId, String &mode) { Serial.printf("Thermostat %s set to mode %s\r\n", deviceId.c_str(), mode.c_str()); return true; }
void setupWiFi() { Serial.printf("\r\n[Wifi]: Connecting"); WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) { Serial.printf("."); delay(250); } IPAddress localIP = WiFi.localIP(); Serial.printf("connected!\r\n[WiFi]: IP-Address is %d.%d.%d.%d\r\n", localIP[0], localIP[1], localIP[2], localIP[3]); }
void setupSinricPro() { SinricProThermostat &myThermostat = SinricPro[THERMOSTAT_ID]; myThermostat.onPowerState(onPowerState); myThermostat.onTargetTemperature(onTargetTemperature); myThermostat.onAdjustTargetTemperature(onAdjustTargetTemperature); myThermostat.onThermostatMode(onThermostatMode);
// setup SinricPro SinricPro.onConnected([](){ Serial.printf("Connected to SinricPro\r\n"); }); SinricPro.onDisconnected([](){ Serial.printf("Disconnected from SinricPro\r\n"); }); SinricPro.begin(APP_KEY, APP_SECRET); }
void setup() { Serial.begin(BAUD_RATE); Serial.printf("\r\n\r\n"); pinMode(THERMOSTAT_PIN, INPUT); setupWiFi(); setupSinricPro(); }
void loop() { SinricPro.handle(); }
@antoniomorsello Please follow some rules: 1) This issue is closed. Please open a new one. 2) Just saying that it does not work does not help to make an exact analysis! Please provide more details about what is not working.
https://help.sinric.pro/pages/devices/thermostat.html on this page is a link
"Sinric Pro C++ SDK:" "Complete Arduino/ESP8266/ESP32 example is available here"
If you click that "here" just loops back to the same page.
Do any of you have a copy of the Pro ver Thermostat example?