Got you covered
Unfortunately, except for some weird case scenario (when in Dance revolution mode ) bulbs don’t give you any feedback (state responses come from the EMH gateway if captured from other remotes and for commands sent they’re caught in software (i.e. the EMH gateway doesn’t send the package and then to be listening for reply from the bulbs).
You can pair each bulb/led controller with up to 4 different remote IDs (that is you can’t pair one bulb with two different IDs on the same remote; however, you can use group 0 of that remote to control all lights).
Also, you cannot add two state topics for the light. You could try to set automations that forward states back and forth between the two but it’s going to take a lot of effort to set it (and it won’t be right, either as I’ve tried some combinations until I got it).
Context: EMH has three different topics to work with:
- topic (which you need to set in HA to the command topic for the light);
- state (in HA set as the state/status topic for the light); this includes full state and HA can even be set without it (although it is recommended to keep);
- update (this doesn’t have a direct correspondent in HA but comes into play later); this is, in fact, what the bulb receives, individual changes (like change RGB, change saturation, turn on or turn off), not full state;
Set only one remote as the light in HA (for instance 5423). You don’t need the second remote to be set in HA if it will control the same bulb.
Then set an automation to forward MQTT messages on the update topic from the secondary remote (6743) to the command topic of the main remote (5423) (you need to also set the update topic in EMH - similarly to the ones for command and state)
- alias: MiLight Sync
initial_state: True
trigger:
platform: mqtt
topic: 'milight/update/0x6743/fut089/8'
action:
- service: mqtt.publish
data_template:
topic: 'milight/0x5423/fut089/1'
payload_template: >
{{ trigger.payload }}
Not very logical at first sight but after giving some thought it will be Lights won’t flicker, as the bulbs already have changed to the command provided by the secondary remote, but it will keep an updated state for the lights.
I have a wall remote that I have paired to all bulbs in the house in order to be able to control them at once. The automation above would include, in the action part, the command topic for all the lights. Remember: this is only to keep them in sync in HA as the physical state of the bulbs has already changed. Don’t think you’ll need that ibox (maybe another EMH as backup/increase coverage).
If you’re willing to follow I think I’ll be able to finish soon polishing (need to get some commenting job done ) a full package for seamless control of lights (keep sync with multiple remotes; turn lights on from PIR sensors with reset-able timers each time a new motion triggers it or from smart switches with different turn off time depending on what device turned on the lights; different color settings/brightness and timers based on time of day, set brightness to 1 before turning the bulbs off to prevent turning on at full brightness, etc.)