Skip to content
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

Closed
wants to merge 5 commits into from
Closed

HW-655 Adding support for ESP8266 HW-655 Relay board #1910

wants to merge 5 commits into from

Conversation

daniftodi
Copy link

Adding support for Esp8266 HW-655 board.

hw-655

daniftodi and others added 4 commits September 15, 2019 10:54
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
Copy link
Author

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?

Copy link
Collaborator

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();
Copy link
Author

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

Copy link
Collaborator

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)
Copy link
Author

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)

Copy link
Collaborator

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)

Copy link
Author

@daniftodi daniftodi left a 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

@daniftodi
Copy link
Author

@xoseperez could you please review this?

@mcspr
Copy link
Collaborator

mcspr commented Oct 1, 2019

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
#1130 (comment)

@daniftodi
Copy link
Author

It works with this STM commands, probably it is another one. not sure.

@mcspr
Copy link
Collaborator

mcspr commented Oct 5, 2019

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
...

@daniftodi daniftodi closed this Nov 11, 2019
@mcspr
Copy link
Collaborator

mcspr commented Nov 11, 2019

not sure.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants