-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Seeed multi channel relay control documentation #2840
Closed
Closed
Changes from 29 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ac3d74f
created initial version of documentation
KoenBreeman c48b0bc
added image
KoenBreeman 347cc7f
reduced the image size to 300x300
KoenBreeman d4a23c9
updated information
KoenBreeman 955eafd
Title underline was too short :-S
KoenBreeman 1c72109
Updated reference to GPIO switch
KoenBreeman 6e31203
Merge branch 'next' into current
KoenBreeman c0f22c8
Updated Seeed description
KoenBreeman 61e7d11
...
KoenBreeman cbd5cab
updated seeed documentation
KoenBreeman a80cbe0
....
KoenBreeman 7aaf4c2
Merge branch 'esphome:current' into Seeed_documentation
KoenBreeman f192f06
....
KoenBreeman 591e7c6
Merge branch 'Seeed_documentation' of https://github.com/KoenBreeman/…
KoenBreeman 5a16bf7
updated seeed control text
KoenBreeman 81ae4dd
changed to utf8 text
KoenBreeman 27f3b47
fix build errors
KoenBreeman 9bdfccb
...
KoenBreeman 0bb5aa9
Update seeedmultichannelrelay.rst
KoenBreeman b2cb09e
updated to fix build errors
KoenBreeman 4457036
Merge branch 'Seeed_documentation' of https://github.com/KoenBreeman/…
KoenBreeman 1e0ddd3
updated documentation to reflect changes in channel from string to in…
KoenBreeman 47551d5
Changed control address to change_address_to
KoenBreeman bf82913
Added default addresses
KoenBreeman c7c66fe
merged from other updates
KoenBreeman c688300
Revert "Added default addresses"
KoenBreeman 9cb1001
changed branch
KoenBreeman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ venv | |
.vscode | ||
*.DS_Store | ||
/.idea/ | ||
/.vs/m5stackrelaydoc/v16 | ||
/.vs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. _m5stack4relay_switch: | ||
|
||
M5Stack 4 Relay Switch Component | ||
================================ | ||
|
||
.. seo:: | ||
:description: Instructions for setting up m5stack4relay Switch. | ||
:image: m5stack4relay.jpg | ||
|
||
The ``m5stack4relay`` switch platform supports the 4 channels of the relay unit. | ||
The relays can be used to switch up to AC-230V or DC-28V. For more information: https://docs.m5stack.com/en/unit/4relay | ||
|
||
.. figure:: images/m5stack4relay.png | ||
:align: center | ||
:width: 80.0% | ||
|
||
.. code-block:: yaml | ||
|
||
# Example configuration entry | ||
m5stack4relay: | ||
id: M5stackrelay_ID1 | ||
# ... | ||
|
||
switch: | ||
- platform: m5stack4relay | ||
id: relay_1 | ||
name: relay1 | ||
channel: 1 | ||
m5stack4relay_id: M5stackrelay_ID1 | ||
|
||
Configuration variables: | ||
------------------------ | ||
|
||
- **channel** (*Required*, string): The channel number to switch, options are 1, 2, 3 or 4. | ||
- **m5stack4relay_id** (*Optional*, :ref:`config-id`): The ID of the M5Stack 4 relay. | ||
- **interlock** (*Optional*, list): A list of other switches in an interlock group. See | ||
:ref:`switch-gpio-interlocking`. | ||
- **interlock_wait_time** (*Optional*, :ref:`config-time`): For interlocking mode, set how long | ||
to wait after other items in an interlock group have been disabled before re-activating. | ||
Useful for motors where immediately turning on in the other direction could cause problems. | ||
|
||
- All other options from :ref:`Switch <config-switch>`. | ||
|
||
This switch supports the same interlocking as the GPIO switch. | ||
|
||
See Also | ||
-------- | ||
|
||
- :doc:`index` | ||
- :apiref:`m5stack4relay/switch/m5stack4relay_switch.h` | ||
- :apiref:`gpio/switch/gpio_switch.h` | ||
- :ghedit:`Edit` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.. _seeedmultichannelrelay_switch: | ||
|
||
Seeed Multi Channel Relay Switch Component | ||
========================================== | ||
|
||
.. seo:: | ||
:description: Instructions for setting up seeedmultichannelrelay Switch. | ||
:image: seeedmultichannelrelay.jpg | ||
|
||
The ``seeedmultichannelrelay`` switch platform supports the 8 channels of the relay unit. There are multi relays which are supported. | ||
The relays can be used to switch up to AC-250V or DC-110V. For more information: | ||
|
||
Below are several links to supported relays | ||
https://wiki.seeedstudio.com/Grove-4-Channel_SPDT_Relay/ | ||
https://wiki.seeedstudio.com/Grove-8-Channel_Solid_State_Relay/ | ||
|
||
.. figure:: images/Seeed-4-Channel-SPDT-Relay.png | ||
:align: center | ||
:width: 80.0% | ||
|
||
.. figure:: images/Seeed-8-Channel-Solid-State-Relay.png | ||
:align: center | ||
:width: 80.0% | ||
|
||
.. code-block:: yaml | ||
|
||
# Example configuration entry | ||
seeedmultichannelrelay: | ||
id: SeeedMultiChannelRelay_ID | ||
address: 0x11 # changes the address of the seeedmultichannelrelay only runs this once | ||
# ... | ||
|
||
switch: | ||
- platform: seeedmultichannelrelay | ||
id: relay_1 | ||
name: relay1 | ||
channel: 1 | ||
seeedmultichannelrelay_id: SeeedMultiChannelRelay_ID | ||
|
||
Configuration variables: | ||
------------------------ | ||
**Control** | ||
|
||
- **addres** (*Optional*, hex-address): This should only be added to change the i2c address | ||
on the EPROM of the relay. Afterwards the address will be permanently changed. | ||
|
||
- All other options from I2C devices. | ||
|
||
**Switch** | ||
|
||
- **channel** (*Required*, string): The channel number to switch, options are 1 to 8 (depending on the relay switch design). | ||
- **seeedmultichannelrelay_id** (*Optional*, :ref:`config-id`): The ID of the Seed relay. | ||
- **interlock** (*Optional*, list): A list of other switches in an interlock group. See | ||
:ref:`switch-gpio-interlocking`. | ||
- **interlock_wait_time** (*Optional*, :ref:`config-time`): For interlocking mode, set how long | ||
to wait after other items in an interlock group have been disabled before re-activating. | ||
Useful for motors where immediately turning on in the other direction could cause problems. | ||
|
||
- All other options from :ref:`Switch <config-switch>`. | ||
|
||
This switch supports the same interlocking as the GPIO switch. | ||
|
||
See Also | ||
-------- | ||
|
||
- :doc:`index` | ||
- :apiref:`seeedmultichannelrelay/switch/seeedmultichannelrelay_switch.h` | ||
- :apiref:`gpio/switch/gpio_switch.h` | ||
- :ghedit:`Edit` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this is not intuitive.
How about to rename it to
change_address_to
and run it always? So it will change address only when intended.Or better create action for changing address? User can run it on startup or on button click.
Or be more verbose in docs what it exactly does and when it changes address.
I also miss info about the default address. This is from product page:
Default I2C Address: 0x11 or 0x12
Available I2C Address: 0x00 ~ 0x7F
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 the default addresses and changed the name to change_address_to