-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Room thermostat values not available #37
Comments
Hi @CurlyMoo , |
This is what i've tried, but the only response i get is:
/*
OpenTherm Slave Example
By: Ihor Melnyk
Date: May 1st, 2019
http://ihormelnyk.com
*/
#include <Arduino.h>
#include <OpenTherm.h>
const int inPin = 12; //for Arduino, 12 for ESP8266 (D6), 19 for ESP32
const int outPin = 13; //for Arduino, 13 for ESP8266 (D7), 23 for ESP32
OpenTherm ot(inPin, outPin, true);
void ICACHE_RAM_ATTR handleInterrupt() {
ot.handleInterrupt();
}
void processResponse(unsigned long response, OpenThermResponseStatus status) {
if (status == OpenThermResponseStatus::SUCCESS) {
Serial.println(String(response, HEX));
}
}
void setup()
{
Serial.begin(9600);
Serial.println("Start");
ot.begin(handleInterrupt, processResponse);
}
void loop()
{
bool isReady = ot.isReady();
if(isReady) {
unsigned int data = 0xFFFF;
unsigned long request = ot.buildRequest(OpenThermRequestType::READ, OpenThermMessageID::Tr, data);
unsigned long response = ot.sendRequestAync(request);
}
ot.process();
} |
Hi @CurlyMoo, If you are using master shiled Slave-to-Master Messages try to send a valid float temperature |
I'm using the slave shield trying to listen to the thermostat values, however, not much showing up using the sample sketch. |
recheck headers soldering, connections, slave cketch pins configuration, voltage levels on OT wires |
The thermostat boots fine so powering should not be the issue and i believe that with bad soldering there wouldn't be any response at all. The response i do get is just an endless stream of:
|
So thermostat sends status command with CH and DHW flags enabled and sample sketch just respond with UNKNOWN-DATAID. That is why thermostat just repeats the same command. |
And where in the documentation of the library can i get a clue how that works? |
Check my first response |
I did, but the example doesn't fully work due to the absence of functions like the: I changed the code to: void processRequest(unsigned long request, OpenThermResponseStatus status) {
Serial.print(ot.getDataID(request));
Serial.print(" ");
Serial.println("T" + String(request, HEX)); //master/thermostat request
unsigned long response = ot.setBoilerStatus(true, false, true);
Serial.println("B" + String(response, HEX)); //slave/boiler response
} Which results in:
If i do this: void processRequest(unsigned long request, OpenThermResponseStatus status) {
Serial.print(ot.getDataID(request));
Serial.print(" ");
Serial.println("T" + String(request, HEX)); //master/thermostat request
unsigned long response = ot.buildResponse(OpenThermMessageType::READ_ACK, ot.getDataID(request), 0);
//send response
ot.sendResponse(response);
Serial.println("B" + String(response, HEX)); //slave/boiler response
} I get this:
The f changed to c as the initial byte. |
Looking at the Tasmota implementation i seem to understand that the library expects me to implement a full handshake and communication strategie. Maybe i was too naive, but i expected it to do that for me... |
Let me step in. Trying to understand also while learning. The thermostat requests MsgID3, that is 'slave, give me your config'. So you need to respond with a write_ack (see specifications) and set the bits in the answer for which functions your slave supports. And yes, the library is only support the basic communications as it seems. |
Which should be the command: unsigned long response = ot.setBoilerStatus(enableCentralHeating, enableHotWater, enableCooling); |
So if you change your last config in: |
That gives me: |
. You just need to send
Library allows you to send any OT command, you just need to build response with type, id and data for concrete command. |
That's the issue. For what is simple for you, isn't for developers unknown to OpenTherm. So a basic guideline in the documentation on how a basic handshake + request works (in both slave and master mode) would be much better. The example you're referring to is sadly broken. As in, just a small heads-up instead of directly referring to the protocol description itself... |
So you now receive a new READ for msgid 49 I believe. And that should be a request for the boiler/slave to responds the upper and lower bounds for the CHsetpoint. Again, you need to respond with write_ack on this msgid and the proper upper and lower bounds. |
As described in chapter 5.2, i would have expected some more handshake items, but nope. |
There is no handshake, just request - response for the concrete command. |
It is, because the function |
Sample sketches in the library are valid, the article need to be updated in order to be compatible with latest version of OT library. |
In general, you can use any OT library you find or you are always welcome to join the contributors of this library and improve it. |
So after discussing this offline with @CurlyMoo I believe I know what is going wrong. |
I received the slave shield today, but i noticed the API doesn't support retrieving the following values from my thermostat:
I would like to use my thermostat as a simple temperature GUI to control my domotica.
Additionally, does OpenTherm implement a signal that tells me to start heating or start cooling? I also can find the implementation for that.
The text was updated successfully, but these errors were encountered: