今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

标签:#automation

找到 230 篇相关文章

AI 资讯

Stop Manually Booking Appointments: Building an Autonomous AI Health Agent with Playwright and GPT-4o

We’ve all been there. You get a notification from your smartwatch saying your heart rate has been a bit funky, or your blood oxygen is dipping. Usually, we ignore it until it becomes a problem. But what if your personal AI was looking out for you? 🤖 In this tutorial, we are building an Autonomous Health Agent . This isn't just a notification bot; it's a proactive system that uses Playwright browser automation , OpenAI Function Calling , and Python to monitor your health trends and—if things look suspicious for three days straight—literally opens a browser and books a doctor's appointment for you. By leveraging Autonomous AI Agents and Playwright automation , we are moving from "Passive Monitoring" to "Active Intervention." This is the future of Health Tech Automation . 🏗 The Architecture Before we dive into the code, let's look at how the data flows from a "scary heart rate" to a "confirmed appointment." graph TD A[Wearable Data/Health Logs] --> B{3-Day Anomaly Check} B -- Normal --> C[Stay Healthy! 🟢] B -- Abnormal --> D[Trigger AI Agent 🤖] D --> E[OpenAI Function Calling] E --> F[Playwright Browser Automation] F --> G[Hospital Booking Platform] G --> H[Appointment Confirmation 🏥] H --> I[Notify User via SMS/Email] 🛠 Prerequisites To follow along, you’ll need: Python 3.10+ Playwright : The king of modern browser automation. OpenAI API Key : For the "brain" of our agent. A healthy dose of curiosity! 🥑 pip install playwright openai pydantic playwright install chromium 👨‍💻 Step 1: Defining the "Brain" (OpenAI Function Calling) We don't want the LLM to just "talk" about booking an appointment; we want it to actually execute the action. We'll use OpenAI's Function Calling to bridge the gap between text and code. import json from openai import OpenAI client = OpenAI () # Define the tool our agent can use tools = [ { " type " : " function " , " function " : { " name " : " book_doctor_appointment " , " description " : " Books a medical appointment based on department and s

2026-07-02 原文 →
AI 资讯

Pushing My Own Boundaries: Using AI to Start the Day Already Briefed

The goal is to start the day already briefed — not to spend the first hour becoming briefed. What follows isn't groundbreaking. It's just what pushing my own boundaries looks like in practice. The problem As a Tech Lead of a larger team, my mornings used to look something like this: open email, skim through multiple newsletters I subscribed to for staying current on AI and dev topics, switch to Slack, scroll through everything I missed, try to figure out what actually needs my attention, then check what code went into the repo in the last 24 hours. By the time I was done "catching up," a good chunk of the morning was gone. I knew there had to be a better way. Starting with Claude Cowork Claude's desktop app has a feature called Cowork, and within that, you can set up Scheduled tasks — automated tasks that run on a schedule. I set up two that run every morning: Newsletter digest: This one pulls in all the newsletters I received the day before and summarizes them for me, grouped by topic — AI-related first, then dev, then everything else. Instead of opening each email and scanning for what's relevant, I get a curated briefing in seconds. Slack summary: This gives me a full summary of yesterday's Slack conversations across channels, and more importantly, flags what actually needs my attention. No more scrolling through hundreds of messages trying to separate signal from noise. The only downside? The Claude desktop app needs to be open and running for these to kick in. It's not a dealbreaker, but worth knowing. I'll be honest — the idea wasn't entirely mine. When you set up a new Scheduled task in Cowork, a Daily Brief is literally the example they suggest. I just happened to already be poking around with something similar. A lucky coincidence. Taking it a step further with Claude Code One of the hardest parts of leading a larger team is keeping tabs on everything that changes in code. PRs get merged, features get shipped, bugs get fixed — and it's nearly impossible to

2026-07-01 原文 →
AI 资讯

we built a 'failed' column on purpose, then caught our own agent triggering it

most auto-apply tools have a dirty secret: they only autofill the form. they drop your details in and stop. some press submit. almost none read the confirmation the applicant tracking system sends back afterward, which means they cannot actually tell a click from a landed application. so they show you "applied" and hope. we read that confirmation. it is the whole point of what we build. and the side effect of reading it is that we have a status most tools do not: failed . a column that says, out loud, this one did not go through. having that column means we can be wrong out loud too. today we were. our apply agent clicked submit on a real Greenhouse form. the form went through. then, about half a second later, a downstream network blip threw an error, and the old code took that to mean the whole run had failed. it stamped a real, registered application as failed . a false negative on the one signal that matters most. the fix (in submitter.ts ) is a gate we now call submitClickIssued . once the agent has actually clicked submit, a later transport error can no longer produce a hard failed . it resolves to requires_human_review with a "likely landed, confirm this one" disposition instead. a blip after the click can no longer fake a failure. worst case, we ask you to double-check one, instead of lying to you in either direction. it is not a glamorous ship. no new feature, no screenshot. but a tool that never fails is a tool that never tells you, and the boring reliability days are the actual product. building this in public. no fabricated numbers, just the log.

2026-07-01 原文 →
AI 资讯

4-Phase Orchestration: 5 Universal Agent Skills with YAML-Driven Rules, Composable Components, and Graceful Degradation

4-Phase Orchestration: How 5 Universal Agent Skills Achieve YAML-Driven Rules + Composable Components + Graceful Degradation When you're hard-coding your 3rd scoring if-else, maybe it's time to ask: can I move the rules into YAML and let the business change config instead of code? The Problem: Why Do Agent Skills Keep Reinventing the Wheel? Every Agent developer faces the same dilemma — every business scenario rewrites a similar pipeline : Scoring: Extract features → Match rules → Calculate score → Generate report Complaints: Extract ticket → Cross-validate → Pinpoint root cause → Archive Querying: Understand intent → Build SQL → Execute query → Render chart The skeleton is identical. What changes is only the "content" at each step. Yet every team builds pipelines from scratch. teleagent-skills offers an answer: freeze the skeleton into 5 universal Skills with 4-Phase orchestration, and let business changes live in YAML config only . Architecture Overview: 4-Phase Pipeline + 5 Universal Skills 2.1 4-Phase Orchestration Diagram ┌─────────────────────────────────────────────────────────────┐ │ Upper Business Skill │ │ (Scoring Engine / Evidence Chain / Data Aggregator / ...) │ └──────────┬──────────┬──────────┬──────────┬────────────────┘ │ │ │ │ ▼ ▼ ▼ ▼ ┌──────────┐┌──────────┐┌──────────┐┌──────────┐ │ Phase 1 ││ Phase 2 ││ Phase 3 ││ Phase 4 │ │ Extract ││ Analyze ││ Generate ││ Archive │ │ ││ ││ ││ │ │Info- ││Data- ││Report- ││Archive- │ │Extractor ││Analyst ││Generator ││Manager │ └────┬─────┘└────┬─────┘└────┬─────┘└────┬─────┘ │ │ │ │ ▼ ▼ ▼ ▼ ┌─────────────────────────────────────────────────┐ │ JSON Contract (Structured Data Contract) │ │ phase1_output.json → phase2_input.json → ... │ └─────────────────────────────────────────────────┘ Core idea: each Phase is an independent component, and Phases pass data only through JSON contracts . Any Phase can be replaced (want a more powerful Analyzer? Swap it out) Any Phase can be skipped (degradation mode) Any Phase c

2026-07-01 原文 →
AI 资讯

Python Selenium Architecture

**Python Selenium Architecture** Introduction: Selenium automates web browsers. The Python Selenium architecture consists of four main components that work together to control a browser. 1.Selenium Client Library (Python Language Binding) Python developers write automation scripts using the standard Selenium API. This library converts your Python code into a standardized format. It sends these commands as programmatic requests to the browser driver. 2.W3C WebDriver Protocol/JSON Wire Protocol This is the communication channel between the code and the driver. Historically, Selenium used the JSON Wire Protocol over HTTP. Modern Selenium (Version 4+) uses the standardized W3CWebDriver Protocol. Commands and responses are transferred directly without any middle translation. 3.Browser Drivers Every web browser has its own specific executable driver. Examples include ChromeDriver for Chrome and GeckoDriver for Firefox. The driver acts as a secure HTTP server that receives commands. It passes these requests directly to the browser and returns results. 4.Web Browsers This is the final layer where execution happens physically. Supported browsers include Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari. The browser receives commands through its native OS-level API. It executes actions like clicking, typing, or fetching text. Significance of Python Virtual Environments: A Python Virtual Environment is an isolated directory containing its own Python installation and independent packages. It prevents dependency conflicts across different software projects. Conclusion: Why It Matters? Avoids Dependency Hell: Different projects can use different versions of the same library. Protects System Python: Prevents breaking system-wide packages required by your operating system. Ensures Reproducibility: Allows developers to easily recreate the exact environment on other machines. No Admin Privileges Needed: Allows installing packages without sudo or administrator rights. Real-Wo

2026-07-01 原文 →
开发者

Building Editorial Control Into a 3 Platform Content Engine

3 platforms, one queue, zero editorial control. That was the state of my content automation before I sat down to spec the dashboard. LinkedIn, X, and Threads each had their own generator, their own state files, their own publishing loop. Drafts got generated, passed a quality gate, and fired into the void. If the draft was mediocre or the timing was wrong, I found out after the fact. The problem is not the automation. Automation is why I can run three platform engines without spending two hours a day managing content. The problem is that zero editorial visibility means you cannot catch the bad ones before they post. What I wanted: see every draft before it goes out. Edit inline if needed. Post immediately or schedule for the next slot. Compose something manually when I have a specific take to push. Keep the comment automation untouched because that runs high frequency, low stakes, and babysitting individual replies defeats the point. The spec came out to three core flows. Review queue. Every pregenerated draft surfaces here with full context: platform, topic, generation timestamp, quality score. One click to edit inline, one to approve for the next slot, one to post immediately. The goal is a 30 second review per draft, not a full editing session. Manual compose. Sometimes I know exactly what I want to say. A text area, platform selector, and post button. No generation, no queue, just publish. This is the escape hatch for when something is happening in real time and the pregenerated queue is irrelevant. Schedule view. A simple calendar showing what is queued for which slot across all three platforms. The generator already handles slot logic and quiet hours. The dashboard just needs to surface the state so I can see gaps and move things around without touching JSON files directly. What I deliberately left out: comment automation. That pipeline runs separately, fires frequently, and does not benefit from human review on every reply. Adding it to the dashboard would cr

2026-07-01 原文 →
AI 资讯

How to Automate the ChatGPT & Gemini Web UIs Without an API Key

You've got a folder of a few hundred screenshots and you want the text out of each one. Or you want to generate a batch of images for a side project. Or you just want to drop a single "summarize this" call into a script you're writing on a Sunday afternoon. So you open the pricing page for the official API, do the math on per-token billing plus setting up keys and a payment method, and it's hard to justify, because the exact same model will do the exact same thing for free in a browser tab. There are really two ways to get a model like ChatGPT or Gemini to do work for you. The web UI is free, or already covered by a subscription you're paying for anyway, but you drive it by hand. The API is scriptable, but you pay by the token. Most of the time that trade-off is fine. But for a whole category of work like hobby projects, throwaway scripts, research, or anything that doesn't need production-grade reliability, you're stuck picking between "free but manual" and "automated but paid." Which raises the obvious question: why not automate the free web UI? It's just a webpage. You open it, type in the box, click send. It turns out that hides a few fiddly problems, which I ran into enough times that I eventually built a small library for them. In this article we'll work through what it takes to automate these UIs, and at the end I'll show how little code it comes down to. 1. What it takes to drive a chat UI A single round trip with ChatGPT or Gemini breaks down into four jobs: Get your text into the input box Optionally attach a file Wait for the model to finish answering And read the answer back out. Every one of these is harder than it sounds, because the page is a modern single-page app that was never built to be driven by a script. We'll use Selenium with undetected-chromedriver, and for now assume the browser is already open (we'll get to launching it in the next section). To keep the code readable I'll show whichever of the two platforms makes each problem clearest, and

2026-06-30 原文 →
AI 资讯

Beyond ChatGPT: Understanding the Core Building Blocks of Generative AI

Most developers have experimented with ChatGPT or GitHub Copilot. But when it comes to building AI-powered applications, simply calling an LLM API isn't enough. Understanding what's happening behind the scenes helps you design systems that are scalable, reliable, and cost-effective. In this article, we'll explore four concepts every software engineer should know: tokens, embeddings, transformers, and Retrieval-Augmented Generation (RAG). 1. LLMs Think in Tokens, Not Words One of the biggest misconceptions about Large Language Models (LLMs) is that they understand words like humans do. In reality, they process tokens, which are smaller units of text. For example: Prompt: Explain dependency injection in Spring Boot. is first converted into a sequence of tokens before the model processes it. Why does this matter? API pricing is based on the number of input and output tokens. Longer prompts increase latency and cost. Every model has a maximum context window measured in tokens. When building AI applications, prompt design isn't just about getting better answers—it's also about optimizing performance and cost. 2. Transformers: The Breakthrough Behind Modern AI Before 2017, language models processed text one word at a time using architectures like RNNs and LSTMs. They struggled with long conversations because earlier context was gradually forgotten. The introduction of the Transformer architecture changed this with a mechanism called self-attention. Instead of reading text sequentially, transformers analyze the relationships between all tokens in a sentence simultaneously. Consider this sentence: "The server restarted because it ran out of memory." The model understands that "it" refers to "the server", not "memory", by assigning attention to the relevant words. This ability to capture context efficiently is what powers modern LLMs like GPT, Gemini, Claude, and Llama. 3. Embeddings Enable Semantic Search Suppose a customer searches: "How can I get my money back?" But your

2026-06-30 原文 →
AI 资讯

Testing Management Tools Compared: Real-World Developer Examples

Choosing a test management tool is rarely just a QA decision. Developers feel the consequences every day: how hard it is to publish automated results, how much context a failed test carries, whether CI artifacts are traceable, and whether test case IDs become useful metadata or bureaucratic friction. This article compares five widely used testing management tools from a developer's point of view: TestRail Xray Zephyr Scale Azure Test Plans qTest The companion repository is public and runnable: https://github.com/andre-carbajal/testing-management-tools-comparison It includes a TypeScript + Playwright project that runs real tests, emits JUnit/JSON/HTML reports, converts Playwright output into a neutral TestRun schema, and generates local dry-run payloads for each tool. No vendor credentials are required. Why test management tools still matter in CI/CD Modern teams already have automated tests, pull requests, CI dashboards, and observability. So why add a test management layer? Because CI answers what happened in this build , while test management answers broader questions: Which requirements or Jira issues are covered by automated tests? Which manual and automated checks belong to a release gate? Which failures are new, repeated, waived, or blocked? Which test cases are business-critical enough to audit? Which teams own gaps in coverage? The developer pain starts when the tool requires fragile scripts, manual exports, or hard-coded IDs scattered through test code. A good integration keeps automation-first workflows intact: tests run in CI, reports are archived, and the management tool receives only the metadata it needs. Comparison table Tool Best fit Developer integration model Strengths Tradeoffs TestRail Teams that want a standalone QA test repository REST API result publishing, usually from CI Clear test case/run model, mature reporting, easy to understand Requires mapping automation IDs to TestRail case IDs; separate from issue trackers unless integrated Xray Jir

2026-06-30 原文 →
AI 资讯

Understanding the Difference between Agents vs Automation

Artificial Intelligence has brought the term "AI Agent" into almost every technology conversation. As a result, many people now use the words agent and automation interchangeably. While both are designed to reduce manual work and improve efficiency, they solve problems in fundamentally different ways. Understanding this distinction is essential if you're building software, automating business processes, or deciding where AI fits into your organization. What Is Automation? Automation is designed to execute predefined instructions. You tell the system exactly what to do, in what order, and under what conditions. Every time those conditions are met, it performs the same sequence of actions. For example: A customer submits a form. An email is automatically sent. A record is created in the database. A notification is sent to the sales team. Every step is predetermined. If the process changes, the workflow must be updated. Automation excels at repetitive, predictable tasks where consistency is more important than decision-making. What Is an AI Agent? An AI agent is not focused on following instructions. It is focused on achieving a goal. Instead of executing a rigid sequence of steps, an agent observes its environment, evaluates available information, makes decisions, and adjusts its actions as circumstances change. If one approach fails, it can try another. If new information becomes available, it can revise its strategy without requiring a developer to define every possible scenario in advance. In simple terms: Automation asks: "What steps should I execute?" An agent asks: "What is the best way to accomplish this objective?" This ability to reason and adapt is what makes agents fundamentally different from traditional automation. A Simple Example Imagine you're booking a business trip. An automated workflow might: Book the airline you specified. Reserve the hotel you selected. Email you the itinerary. It completes exactly what it was programmed to do. An AI agent, howev

2026-06-29 原文 →
AI 资讯

How to Set Up Claude So You Never Write the Same Prompt Twice (Full Course)

There is a habit that wastes more time than anything else when using Claude. Save this :) Writing the same instructions over and over again. Every session, you re-explain your role. You re-describe your writing style. You re-state your formatting preferences. You re-paste your company context. You re-specify what you want the output to look like. Then you do it again tomorrow. And the day after that. And the day after that. Over a month, you waste hours on instructions you have already written. Not new thinking. Not new requests. Just the same setup, repeated endlessly. Claude Projects and Skills fix this completely. Projects let you save context once and have it applied to every conversation automatically. Skills let you save entire workflows as reusable commands that you can trigger with a single sentence. Together, they turn Claude from "a tool you use from scratch every time" into "a system that already knows everything and just needs your specific request." Here is how to set them up from zero. What Are Claude Projects A Claude Project is a container for conversations that share the same context. When you create a Project, you upload knowledge files and write a system prompt. Every conversation inside that Project automatically has access to those files and follows those instructions. No re-explaining. No re-pasting. No re-describing. The context is always there. Example: you create a Project called "Content Marketing." You upload your brand guidelines, your editorial calendar, your top-performing articles, and your audience personas. You write a system prompt: "You are my content strategist. You know our brand voice, our audience, and our content strategy. Every piece of content should match our guidelines and target our defined personas." Now every conversation in that Project - brainstorming headlines, drafting articles, analyzing competitors - starts with full context. Claude already knows your voice, your audience, and your standards. One setup. Unlimited

2026-06-29 原文 →
AI 资讯

hermes-memory-installer: System Metrics, Auto-Archive, Token Rotation, Dead-Letter Replay, and Prof

The latest update to hermes-memory-installer introduces a focused set of features that directly address production-level concerns: observability, storage management, security, fault tolerance, and performance introspection. If you maintain a message-processing pipeline or job queue, these are the components that often decide whether your system survives peak loads or security audits without manual heroics. Let's break down each addition and how you can integrate them into your workflow. System Metrics Exposing runtime health is no longer an afterthought. The new metrics module taps into the core processing loop and emits standard Prometheus-formatted data: message throughput (count and rate), latency percentiles, queue depths, and goroutine or thread pool utilization. This isn't a simple "up/down" gauge—you get histograms for processing duration and derived metrics like consumer lag. For example, if you run multiple worker instances, you can now directly compare their processing speeds via a Grafana dashboard. The endpoint is configurable, so you can keep it behind a reverse proxy or internal load balancer. Memory pressure triggers a separate gauge for heap usage per queue, which helps with capacity planning before it becomes a midnight incident. Auto-Archive Without auto-archive, old messages accumulate in memory or primary storage, driving up costs and slowing down scans. This feature moves processed or expired messages to a cheaper tier (S3, GCS, or local file system) based on age or queue size. The archive process is a background task that runs on a cron-like schedule; you can define how many messages to retain per queue before archiving kicks in. The compression is transparent—gzip by default, but you can switch to snappy or zstd. A key detail: archived messages retain their metadata and can be restored if needed, though the replay path skips them automatically unless explicitly requested. This is useful for audit trails or multi-region cold replicas. Token Rot

2026-06-29 原文 →
AI 资讯

The n8n bug that took three tries to find (and the free workflow it broke)

I built a free n8n workflow that writes your launch content for you. It broke three times before it worked, and the third break is the only part of this post worth reading. The problem Every time I ship a new digital product, I write the same five things: a short blog intro, a LinkedIn post, an X post, an Instagram caption, and a launch email. Same structure every time, different product. The kind of task that's boring enough to automate but annoying enough that I kept putting it off. So I built Launch Content Pack : an n8n workflow that takes one product description and generates all five, using an LLM node wired up with Claude Code on the customization side. It's free, it's on Gumroad, and the JSON is the whole product — open it, see every node. Why bother when there are 9,000+ free n8n templates already There are. I checked before building this, because there's no point shipping a workflow that already exists for free somewhere else. What's actually missing from most of those templates: nobody validates the nodes. A huge chunk of free n8n templates floating around were generated by someone (often an LLM) guessing at node types and parameters, and they quietly break the moment n8n ships a version update. I used n8n-mcp , a free MCP server, to confirm every single node type, version, and parameter against n8n's actual schema before writing any JSON. No guessing. That sounds like a small difference. It's the reason this post exists. The bug that actually mattered I tested the workflow in n8n Cloud. Two nodes ran clean — green checkmarks, no errors. Then the Code node that's supposed to take the LLM's output and split it into five labeled fields threw: Cannot read property 'text' of undefined My first guess was wrong. I assumed the LLM node's output field was named something other than text — output , maybe, or response — and that I just had the wrong field name in the Code node. Reasonable guess. Also not the actual bug. Here's what was really happening. The OpenAI

2026-06-28 原文 →
AI 资讯

CDP Browser Control: Driving Real Chromium from Python

Playwright and Selenium are great until you hit bot detection. Google OAuth, Cloudflare, and Vercel checkpoints all flag headless browsers. Here's how to control a real Chromium instance via CDP using Python and websockets. Why Not Playwright? Playwright launches a headless browser with automation flags. Even in headed mode with Xvfb, Google detects it. The CDP Approach Launch Chromium with remote debugging: chromium-browser --user-data-dir = /path/to/profile --remote-debugging-port = 9222 --no-first-run Connect via WebSocket in Python: import asyncio , json , websockets , urllib . request async def get_page_ws (): resp = urllib . request . urlopen ( ' http://localhost:9222/json ' ) targets = json . loads ( resp . read ()) for t in targets : if t [ ' type ' ] == ' page ' : return t [ ' webSocketDebuggerUrl ' ] async def cdp_call ( ws , method , params = None ): msg_id = cdp_call . id = getattr ( cdp_call , ' id ' , 0 ) + 1 msg = { ' id ' : msg_id , ' method ' : method } if params : msg [ ' params ' ] = params await ws . send ( json . dumps ( msg )) while True : resp = json . loads ( await ws . recv ()) if resp . get ( ' id ' ) == msg_id : return resp Key Advantages Real browser fingerprint, no automation flags Persistent sessions, cookies survive across runs Google OAuth works, existing sessions carry over No bot detection, it IS a real browser Follow for more tutorials on browser automation and AI agent architecture.

2026-06-28 原文 →
AI 资讯

AI Automations for Local Service Businesses: What Actually Works

Everyone is selling AI to small businesses right now. Most of it is hype. But some of it is genuinely useful — and knowing the difference can save you thousands in wasted tooling. I run a small agency in Stuttgart that builds websites and automations for local service businesses: coaches, doctors, beauty studios, consultants. Here's what actually moves the needle for them in 2025. What "AI Automation" Actually Means for Small Businesses Forget the generic pitch. For a local service business, AI automation is useful in exactly three places: Client communication at scale — responding to inquiries 24/7 without hiring a receptionist Reducing admin time — intake forms, follow-ups, reminders, invoicing triggers Content creation — but only as a speed boost, not a replacement for your voice Anything beyond that is usually overkill for a business under 10 employees. The One Automation Every Service Business Should Have Automated follow-up after initial contact. Here's the typical flow without automation: Client fills out contact form You see it 4 hours later You write a reply If you're busy, it takes a day Client has already booked elsewhere With automation: Client fills out form Immediate confirmation email ("Got your message, here's how to book a slot") Link to booking calendar You're notified. If they don't book in 48h, a follow-up email goes out automatically This alone converts 20-40% more inquiries into booked clients. No AI model needed — just a simple workflow in n8n, Make, or Zapier. Where LLMs Actually Help Language models (ChatGPT, Claude, etc.) are genuinely useful for small businesses in these areas: Intake Forms → Personalized Responses A coaching client fills out a detailed intake form. Normally, you'd spend 20 minutes reading it and writing a personalized welcome email. With a simple LLM integration: Intake form submitted Webhook fires to n8n LLM reads the form, generates a personalized summary + welcome You review it in 30 seconds and hit send Same personal

2026-06-27 原文 →
开发者

MQTT to ThingsBoard Setting Up Device Telemetry from Scratch

ThingsBoard is one of the most capable open-source IoT platforms out there. But the first time you try to get a device publishing telemetry over MQTT, the documentation sends you in three different directions of device profiles, transport configurations, topic formats, and credential types. There are a lot of setups before you see a single data point on a dashboard. This post cuts through that. By the end, you will have a device sending live sensor data to ThingsBoard over MQTT and seeing it in the Latest Telemetry tab. No fluff, just working code. What You Need Before Starting A running ThingsBoard instance, Community Edition, is fine. You can use the live demo for a quick look, though a local Docker setup is more reliable for following along since the demo instance has usage limits. You also need mosquitto-clients installed for quick command-line testing and Python 3 with paho-mqtt for the scripting part. # Install mosquitto client tools sudo apt install mosquitto-clients # Install Python MQTT client pip install paho-mqtt Step 1: Create a Device and Grab the Access Token In the ThingsBoard UI, go to Entities → Devices and click the + button to add a new device. Name it something like sensor-01. Once created, click on the device and copy the access token from the credentials tab. This token is your MQTT username. No password needed. ThingsBoard uses it to identify which device is sending data. Step 2: Send Your First Telemetry via Command Line Before writing any code, test the connection with mosquitto_pub. This tells you immediately whether the setup works. mosquitto_pub -d -q 1 \ -h "YOUR_THINGSBOARD_HOST" \ -p 1883 \ -t "v1/devices/me/telemetry" \ -u "YOUR_ACCESS_TOKEN" \ -m '{"temperature": 25.4, "humidity": 62}' If you are running ThingsBoard 3.5 or later, you can use the shorter topic format: mosquitto_pub -d -q 1 \ -h "YOUR_THINGSBOARD_HOST" \ -p 1883 \ -t "v2/t" \ -u "YOUR_ACCESS_TOKEN" \ -m '{"temperature": 25.4, "humidity": 62}' Both do the same thing. v2

2026-06-26 原文 →