-
Notifications
You must be signed in to change notification settings - Fork 1
Node-RED: MQTT tutorial #295
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
Conversation
|
Warning Rate limit exceeded@amotl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 49 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughAdds a new Node‑RED MQTT ingestion tutorial page and integrates it into the Node‑RED docs index by replacing an external tutorial URL with an internal reference and adding hidden toctree entries for the tutorial. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant NP as Node-RED Producer
participant MB as MQTT Broker
participant NC as Node-RED Consumer
participant CD as CrateDB
U->>NP: Trigger Inject (JSON payload)
NP-->>MB: Publish MQTT message
MB-->>NC: Deliver MQTT messages
NC->>NC: Batch messages (time/window)
NC->>NC: Function node: build multi-value INSERT tuples
NC->>CD: PostgreSQL node: INSERT INTO nodered_target (...)
CD-->>NC: ACK/Result
NC-->>U: Ingestion complete (verify via SELECT)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review and please convert all spots to active voice. |
|
@amotl I'll review the PR and focus on converting passive voice to active voice throughout the documentation. Based on my previous learnings about documentation reviews, I'll identify passive constructions and suggest active voice alternatives to make the content more direct and engaging. 🧠 Learnings used✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (6)
docs/integrate/node-red/mqtt-tutorial.md (6)
4-6: Rewrite intro in active voice and simplify phrasing.Apply this diff:
-[Node-RED](https://nodered.org/) is a workflow automation tool allowing to orchestrate message flows and transformations via a comfortable web interface. -In this article, we will demonstrate the usage of Node-RED with CrateDB at the example of reading messages from an MQTT broker and inserting them into CrateDB. +[Node-RED](https://nodered.org/) is a workflow automation tool that lets you orchestrate message flows and transformations through a web interface. +This tutorial shows how to read messages from an MQTT broker with Node-RED and insert them into CrateDB.
8-12: Tighten prerequisites and switch to active voice.-To follow this article, you will need: +You need: 1. A running [Node-RED installation](https://nodered.org/#get-started) -2. An installed [node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql) module -3. A running MQTT broker. We are using [HiveMQ Cloud](https://www.hivemq.com/) for this test setup. +2. The [node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql) module installed +3. A running MQTT broker. This tutorial uses [HiveMQ Cloud](https://www.hivemq.com/).
15-23: Make “Producing data” section active and clarify wording; format node name.-First, we will generate data that populates the MQTT topic using Node-RED. If you already have an MQTT topic with regular messages, you can skip this part. +First, generate data to populate the MQTT topic with Node-RED. If you already have an MQTT topic with regular messages, you can skip this part. @@ -The inject node is creating a JSON payload with three different attributes: +The `inject` node creates a JSON payload with three attributes: @@ -For the sake of this example, two of them are static and only the timestamp will change. -Here is the full workflow definition: [flows-producer.json](https://community.cratedb.com/uploads/short-url/eOvAk3XzDkRbNZjcZV0pZ0SnGu4.json) (1.3 KB) +In this example, two fields are static; only the timestamp changes. +Download the full workflow definition: [flows-producer.json](https://community.cratedb.com/uploads/short-url/eOvAk3XzDkRbNZjcZV0pZ0SnGu4.json) (1.3 KB)
34-34: Use active voice and point to “latest” docs for OBJECT type.-The payload makes use of CrateDB’s [OBJECT data type](https://crate.io/docs/crate/reference/en/4.6/general/ddl/data-types.html#object) that is a perfect fit for payloads with a schema that will likely evolve over time. For productive usage, [partitioning and sharding](https://community.cratedb.com/t/sharding-and-partitioning-guide-for-time-series-data/737) should be considered as well. +Store the payload as CrateDB’s [OBJECT data type](https://crate.io/docs/crate/reference/en/latest/general/ddl/data-types.html#object) to accommodate an evolving schema. For production, also consider [partitioning and sharding](https://community.cratedb.com/t/sharding-and-partitioning-guide-for-time-series-data/737).
48-49: Prefer active voice and reduce “Here is …”.-Here is the full workflow definition: [flows-consumer.json](https://community.cratedb.com/uploads/short-url/vWxIENgDPhYnoTZuQC7DKJoNdyY.json) (2.6 KB) +Download the full workflow definition: [flows-consumer.json](https://community.cratedb.com/uploads/short-url/vWxIENgDPhYnoTZuQC7DKJoNdyY.json) (2.6 KB)
50-58: Active voice in Testing; minor phrasing tweaks.-To test the workflow, you can click on the rectangle left to the timestamp node ({w=30px}) to inject a message. In the provided configuration, an INSERT statement will be triggered after two messages have been injected or ten seconds after the first message, if no second message follows. +To test the workflow, click the square to the left of the timestamp node ({w=30px}) to inject a message. In this configuration, an INSERT triggers after two messages or after ten seconds if a second message does not arrive. @@ -Run a SELECT statement on your CrateDB cluster to see the inserted rows: +Then run a SELECT statement on your CrateDB cluster to see the inserted rows:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/integrate/node-red/index.md(2 hunks)docs/integrate/node-red/mqtt-tutorial.md(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build docs
🔇 Additional comments (3)
docs/integrate/node-red/index.md (2)
59-63: Good change: use internal ref instead of external URL.Switching to
:link-type: refimproves maintainability and works with intersphinx builds.
78-83: Hidden toctree entry looks good.The page will be discoverable in builds without cluttering the sidebar. No action needed.
docs/integrate/node-red/mqtt-tutorial.md (1)
26-33: Active voice for table creation intro.
[raise_ninor_issue]-First of all, we create the target table in CrateDB: +First, create the target table in CrateDB:
ba7e8ab to
150590e
Compare
kneth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (but didn't test)
|
Thanks. We think all of the newly added tutorials should work reasonably, as they have been conceived by trustful authors, and also pretty recently. |
About
Continue adding tutorials from the community forum.
Preview
References