Adding Suport to send topic messages for all devices on network #111
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.
When using the option multiple-lookup on the configuration file mqtt.conf, we have the hability to specify which broadlink to submit the message. But, if we want the old behaviour, we need to modify the configuration file everytime.
To avoid that, implement a broadcast address, which allows sending a command to all broadlinks on the network.
This allow a project to have
device_type = multiple-lookup
option, and send a command to a specific device, or just send to the broadcast address in case it doesn't know the address of the device (if there is only one device present) or if doesn't care to send the command to all devices on the network.For the user to not need to write MAC Address or edit mqtt.conf if they have just one broadlink,They can send the MAC Broadcast on topic and all devices on network (sometimes the user has just one), will be activated.
If The user has more broadlinks, they just write broadlink MAC Address on topic. So they doesn't need to change mqtt.conf all times.
broadlink broadcast is "FF:FF:FF:FF:FF:FF" and in the topic it is "ff_ff_ff_ff_ff_ff".