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

Add multiple GroupTopic<x> (x=1-4) (default disabled) #8014

Merged
merged 1 commit into from
Mar 28, 2020

Conversation

curzon01
Copy link
Contributor

@curzon01 curzon01 commented Mar 28, 2020

Description:

#define USE_GROUPTOPIC_SET enables multiple grouptopics (1-4) subscription even when USE_DEVICE_GROUPS is not used.

Usefull for controlling devices in overlapping groups having Device Group feature disabled (e.g. using this MQTT based only for commands not implemented in device group feature).

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

grouptopic (1-4) subscription even when USE_DEVICE_GROUPS
is not used.
@s-hadinger
Copy link
Collaborator

Nice. Why limit to 4 groups? Is it to limit to a single digit?

@curzon01
Copy link
Contributor Author

I had the idea independent of the group device implementation, during code view I saw that there were already 3 additonal GroupTopic strings defined (but only active if group device enabled and no subscription to it).
We could expand that, I just don't know where the limit for MQTT subscriber is without lib running out of memory (I think there would be a limitation, e.g. each subscribe needs an active socket etc...)

@s-hadinger
Copy link
Collaborator

Ok thanks. Let's start with 4.

@arendst arendst merged commit 962e22a into arendst:development Mar 28, 2020
@arendst
Copy link
Owner

arendst commented Mar 28, 2020

I'll make it permanent for 4 group topics which will need more integration. Pls do not extent on this commit.

arendst added a commit that referenced this pull request Mar 28, 2020
- Bump version to 8.2.0.2
- Add support for up to four MQTT GroupTopics using the same optional Device Group names (#8014)
IATkachenko pushed a commit to IATkachenko/Tasmota that referenced this pull request Mar 29, 2020
- Bump version to 8.2.0.2
- Add support for up to four MQTT GroupTopics using the same optional Device Group names (arendst#8014)
@pcdiem
Copy link
Contributor

pcdiem commented Apr 4, 2020

I'd like to propose adding settings text values specifically for Device Groups. I used the MQTT topic when I wrote device groups support because it was logical that the device group name would match the MQTT topic. However, when a device supports controlling devices in multiple device groups, there is no logical tie between multiple MQTT topics and multiple device group names.

This PR is a great addition for all devices, not just those that don't use device groups. In order to enable this PR to work with devices that support multiple device groups, I believe we should split the device group name(s) off into separate settings rather than continuing to use the MQTT topic(s).

This would also support and upcoming PR I plan to submit that implements the DevGroupSend command which allows sending updates to a device group via a command. This command will likely be used in rules to send updates to device groups other than the one the device is a member of. This will require defining the device group names of any devices the user plans to send updates to because we can only reliably send to known device groups (since we need to not just send a packet but make sure the packet is received and acknowledged by the known members of the group).

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.

4 participants