-
Notifications
You must be signed in to change notification settings - Fork 639
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
HW-655 Adding support for ESP8266 HW-655 Relay board #1910
Conversation
removed some unrelated changes
remove some unrelated changes 2
removed unnecessary debug message
// Relays | ||
#define DUMMY_RELAY_COUNT 1 | ||
#define RELAY1_DELAY_ON 0 | ||
#define RELAY1_DELAY_OFF 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
observed they are defined for other relay board, are they necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other one? 0 is the default delay, so this does nothing
Serial.write(0x01); | ||
Serial.write(status); | ||
Serial.write(0xA1 + status); | ||
Serial.flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A0 A1 00 A1 - close
A0 A1 01 A2 - open
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STM relay protocol strikes again... slightly different each time
@@ -243,7 +243,7 @@ void _systemSetupSpecificHardware() { | |||
|
|||
// These devices use the hardware UART | |||
// to communicate to secondary microcontrollers | |||
#if (RF_SUPPORT && !RFB_DIRECT) || (RELAY_PROVIDER == RELAY_PROVIDER_DUAL) || (RELAY_PROVIDER == RELAY_PROVIDER_STM) | |||
#if (RF_SUPPORT && !RFB_DIRECT) || (RELAY_PROVIDER == RELAY_PROVIDER_DUAL) || (RELAY_PROVIDER == RELAY_PROVIDER_STM) || (RELAY_PROVIDER == RELAY_PROVIDER_HW655) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need Serial communication initialized (control of HW-655 relays is done through serial port)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should probably be a runtime flag, but we never got around managing debugging like that bc that depends on serial begin too (and reverse-depends on this condition)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some comments on code, it should be easier to review with them
@xoseperez could you please review this? |
if merged, should depend on #713 just to be clear, this is not the same as STM relay protocol? i do remember another issue dealing with a similar board, but was resolved as an user error |
It works with this STM commands, probably it is another one. not sure. |
Can you please try? Based on the referenced issue, it should be something like this: ...
#elif defined(GENERIC_HW_655)
#define MANUFACTURER "GENERIC"
#define DEVICE "HW_655"
#define DUMMY_RELAY_COUNT 1
#define RELAY_PROVIDER RELAY_PROVIDER_STM
#define DEBUG_SERIAL_SUPPORT 0
#define SERIAL_BAUDRATE 9600
... |
? |
Adding support for Esp8266 HW-655 board.