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

[MQTT Generic] update documentation #4766

Merged
merged 2 commits into from
Jan 31, 2019
Merged

[MQTT Generic] update documentation #4766

merged 2 commits into from
Jan 31, 2019

Conversation

crxporter
Copy link

Add example and clarify the differences when using a bridged setup for the MQTT broker or a non-bridge setup (broker as a stand alone Thing). I also fixed a missing " in the MQTT 1.x heat pump example...

Signed-off-by: Garrett Porter [email protected]

Add example and clarify the differences when using a bridged setup for the MQTT broker or a non-bridge setup (broker as a stand alone Thing). I also fixed a missing " in the MQTT 1.x heat pump example...

Signed-off-by: Garrett Porter [email protected]
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt-2-4-documentation/65916/15

@crxporter
Copy link
Author

Since the reaction to revert my pull request from yesterday was so quick - I figured I may as well learn a bit more and figure out the other configuration options. I was right in my guess that the differences show up between bridge/non-bridge broker connections in the things files.

@@ -258,16 +260,30 @@ Bridge mqtt:broker:myUnsecureBroker [ host="192.168.0.42", secure=false ]
}
```

demo.items:
demo.Things (using non-bridge setup):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the wording is strange. It is not a "non-bridge" setup. The bridge is just separately declared. This is true for all OH 2 bindings. I really don't understand why we need this to the detail in the MQTT documentation. Do people not read the official documentation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to keep parts of this PR. But could you please remove what is written in parentheses.

@crxporter
Copy link
Author

I wrote all of this before my comment I just added to the forums page. Leaving it here in case we continue having the .things and .items examples.

But the wording is strange

I agree, I was struggling with that wording but I didn’t think of a better way to describe it.

One configuration is to have the broker as a bridge (declared as “bridge” in the things file). In this setup the Generic MQTT things are listed inside of { } as a set of things that use this bridge.

The other option is to declare the broker as a thing then declare each MQTT thing as a thing - but not as a set. Obviously the openhab things file needs more information in this case so it knows which broker to use with those things - since it’s not a { } set of bridged items.

Do people not read the official documentation?

Is this not the official documentation? I’ve read through most of the docs about the openhab setup but when I want to set up a new binding I had straight for the instructions for that binding. I think it’s important to have clear examples in that case, as shown by how quickly the last changes I made were questioned (took less than 12 hours!)

It took me a couple of hours yesterday to go through the forums to find the examples and differences between separate things and {curly bracket} version. To me it would be nice to have that information here with the MQTT examples.

What should we call the different options? How are they referred to elsewhere?

@davidgraeff
Copy link
Member

Related issue: openhab/website#152

The suggestion there is to generate parts of the binding-docs automatically.

@Confectrician
Copy link
Contributor

I would vote against the textual bridge thing part within a binding documentation.

Yes, there was a problem, since textual bridge things were not covered yet, but openhab/openhab-docs#888 will close this gap.

Also we will find a conclusion for referencing tha bsaic articles within the addons section through openhab/website#152 sooner or further.

@hakan42
Copy link
Contributor

hakan42 commented Jan 31, 2019

I would vote against the textual bridge thing part within a binding documentation.

Then, we should at least have a link to that section. So we can save the reader a bit of hunting.

@Confectrician
Copy link
Contributor

That's why we are discussing a long term solution for this problem in openhab/website#152.

Writing down the same link in each and every binding readme.md (which we would have to do to be consequent), is not really efficient.
When we generate a link, sidebar, whatever solution will be found during the website build we have to adapt it only in one repo and not 300 markdown files, in case something changes.

@crxporter
Copy link
Author

For my case - I think I've learned what I came to learn. I'm not set on this PR, I was trying to help out by providing another example of a different way to configure the binding - but I think people will be better off using the bridged setup on the MQTT binding. That's my plan (unless I ultimately go with paper ui).

I'll leave this and keep watching. I'm happy to modify the examples and understand if we just close this one and focus on other stuff.

Thanks, all!

@@ -242,7 +242,9 @@ Have a look at the following textual examples.

### A broker Thing with a Generic MQTT Thing and a few channels

demo.Things:
Note: the [broker connection](https://www.openhab.org/addons/bindings/mqtt/) may be set up as a Bridge or as a stand-alone Thing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to keep parts of this PR. But could you remove this sentence. It might just confuse.

David - take a look. I'm happy to keep adjusting until we like it. I'm trying to group them a little so users can see that it's 2 different examples...

Signed-off-by: Garrett Porter [email protected]
@davidgraeff davidgraeff merged commit dffa2c6 into openhab:master Jan 31, 2019
@davidgraeff
Copy link
Member

Thanks

@wborn wborn added the mqtt label Feb 25, 2019
@wborn wborn added this to the 2.5 milestone Feb 28, 2019
Pshatsillo pushed a commit to Pshatsillo/openhab-addons that referenced this pull request Jun 19, 2019
Add example and clarify the differences when using a bridged setup for the MQTT broker or a non-bridge setup (broker as a stand alone Thing). I also fixed a missing " in the MQTT 1.x heat pump example...

Signed-off-by: Garrett Porter <[email protected]>
Signed-off-by: Pshatsillo <[email protected]>
ne0h pushed a commit to ne0h/openhab-addons that referenced this pull request Sep 15, 2019
Add example and clarify the differences when using a bridged setup for the MQTT broker or a non-bridge setup (broker as a stand alone Thing). I also fixed a missing " in the MQTT 1.x heat pump example...

Signed-off-by: Garrett Porter <[email protected]>
Signed-off-by: Maximilian Hess <[email protected]>
@wborn wborn removed this from the 2.5 milestone Dec 8, 2019
@wborn wborn added this to the 2.5 milestone Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants