pgershon wrote:Apologize in advance for being inept...
I have loaded the MQTT Broker and I think its correct. And I created the trigger following the instructions on Aaron's Wiki. But I get stuck on the step in creating devices #4 "Click the "Discovered Devices" dropdown to see if your new device has already been discovered by the plugin. Selecting a device in this list will populate data for the Broker device and MQTT Topic Root that is outline in steps 5 and 6. Steps 5 and 6 can be skipped after selecting a device from this list."
What or where is the Discovered Devices" dropdown? I cannot find it. I have 6 active Shelly Plus One devices and I dont see any of them. Either I am looking in the wrong place, or I missed a step in trying to establish the broker.
Sorry for the lack of guidance on setting up the new shelly devices.
1. The first thing to do is configure your shelly device to connect to your broker. This is done by going into the Network settings of the device though the web interface. Here is an example of how one of my devices is configured.
Note that I modified my MQTT Prefix field to be "shellies-ng/shellypro1-30c6f7847b68". It was "shellypro1-30c6f7847b68" by default, but I prepended the "shellies-ng/" to ALL of my new shelly devices. This makes the trigger creation easier.
- Screen Shot 2022-06-30 at 9.10.18 PM.png (523.46 KiB) Viewed 2529 times
2. Confirm the device is publishing information over MQTT using one of the MQTT applications mention in other posts. MQTT Explorer seems to be pretty popular. You can proceed if you have confirmed the device and brokerage communicating successfully.
3. Now you need to connect Indigo to the broker. This is done using FlyingDiver's MQTT Connector plugin (
https://www.indigodomo.com/pluginstore/211/). Create a new MQTT Broker device in Indigo and fill in your connection details. You should see the status bulb go green to indicate that communication has been established.
- Screen Shot 2022-06-30 at 9.18.44 PM.png (124.64 KiB) Viewed 2529 times
4. Now we will subscribe Indigo to the topics that your devices will communicate on. I prepended my MQTT prefix with "shellies-ng/", back in step 1, and this comes into play. This allows us to create a single MQTT subscription using wildcards. It will be "shellies-ng/#", and this will subscribe to any topic beginning with "shellies-ng". The # symbol is a multi-level wildcard, so it captures topics that are multiple levels deep, such as "shellies-ng/shellypro1-30c6f7847b68/relay/0".
In the broker device you should have created previously in Indigo, go to the "Topic Subscriptions" config section. Enter "shellies-ng/#" into the "Topic to subscribe" field with a QoS level of 0. Click "Add Topic", and you should see the topic subscribed in the list at the bottom.
- topic subscriptions
- Screen Shot 2022-06-30 at 9.24.45 PM.png (113.25 KiB) Viewed 2529 times
5. The next step is to create a trigger that will send the topic payloads to my plugin. Create a new trigger of type "MQTT Connector Event" with event "Topic Component Match". Select your broker device from the broker drop-down.
a. From the match type menu, choose "Match". Then type "shellies-ng" in the Match String text field below it.
Click the Add Match button. b. From the match type menu, choose "Any (wildcard)". Ensure the Match String field is empty.
Click the Add Match button.Check the "Queue message" check box near the bottom. Enter "shellies-ng" in the Message Type field at the bottom.
- trigger config
- Screen Shot 2022-06-30 at 9.31.09 PM.png (169.89 KiB) Viewed 2529 times
You do not need to specify anything else in the Condition or Actions tabs of the trigger. I do suggest checking "Hide trigger executions in Event log" as the shelly devices will be very chatty and will clutter the log.
Everything you just did was a one-time thing. None of that needs to be repeated when adding new devices.6. Create a new device with type "ShellyNGMQTT". A popup will appear where you can select the Shelly Model, MQTT Broker, Base MQTT Topic, and Message type. Select the model of the device you have and choose your broker from the broker menu. The Base MQTT topic is the MQTT prefix you entered in the device web interface. Message Type will be "shellies-ng" because all our MQTT traffic will come from the trigger we previously created.
- example device config
- Screen Shot 2022-06-30 at 9.37.16 PM.png (94.55 KiB) Viewed 2529 times
A handful of Indigo devices will be created that represent the different components of the Shelly device (multiple inputs/outputs). The plugin currently creates devices for ALL components, but this will be configurable in the future if you do not need all components represented in Indigo.
You may have completed some of these steps already, but I figured it might help to explain the entire process.