npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-odoo-jsonrpc

v1.0.0

Published

Modern Odoo connector for Node-RED. Supports JSON-RPC (Odoo 14-18) and JSON-2 API (Odoo 19+). Zero dependencies. Built for IoT and industrial automation.

Downloads

95

Readme

node-red-contrib-odoo-jsonrpc

npm version Node-RED License: MIT Odoo

Modern Odoo connector for Node-RED with dual API support. The only actively maintained Odoo integration for Node-RED that supports both legacy JSON-RPC (Odoo 14-18) and the new JSON-2 API (Odoo 19+).

Zero external dependencies. Uses only Node.js built-in http/https modules.

Built and maintained by TechTonga - Odoo & IoT integration specialists.


Why This Package?

All existing Node-RED Odoo connectors (node-red-contrib-odoo, node-red-contrib-odoo-xmlrpc, etc.) rely on the deprecated XML-RPC protocol and have been abandoned since 2022. None support Odoo 17+ or the new JSON-2 API introduced in Odoo 19.

| Feature | This package | node-red-contrib-odoo | node-red-contrib-odoo-xmlrpc | |---|:---:|:---:|:---:| | Last update | 2026 | 2022 | 2021 | | Odoo 19+ (JSON-2 API) | Yes | No | No | | Odoo 17/18 | Yes | Untested | Untested | | Protocol | JSON-RPC + JSON-2 | XML-RPC | XML-RPC | | API key auth | Yes | No | No | | IoT event bridge | Yes | No | No | | External dependencies | 0 | 1 (xmlrpc) | 1 (xmlrpc) | | Node.js 18+ | Yes | No | No |

Nodes

odoo-server (config)

Configuration node that stores connection details. Supports two authentication modes:

  • JSON-RPC (Odoo 14-18): Username + password via /jsonrpc endpoint
  • JSON-2 (Odoo 19+): API key via /json/2/ REST endpoint

Includes automatic session caching and re-authentication on session expiry.

odoo-api

Full CRUD operations on any Odoo model:

| Operation | Description | Input | |---|---|---| | search_read | Search and read records | msg.domain, msg.fields, msg.limit, msg.offset, msg.order | | read | Read specific records by ID | msg.ids, msg.fields | | search_count | Count matching records | msg.domain | | create | Create a new record | msg.payload (values object) | | write | Update existing records | msg.ids, msg.values | | unlink | Delete records | msg.ids | | execute_kw | Call any custom method | msg.method, msg.args, msg.kwargs | | call_button | Trigger an Odoo action/button | msg.ids, msg.button |

All parameters can be set in the node config or dynamically via msg properties.

odoo-event

MQTT-to-Odoo event bridge. Routes IoT events to Odoo methods based on MQTT topics:

| Topic pattern | Handler | Odoo method | |---|---|---| | .../events | Tool pickup/return, door events | model.handle_container_event() | | .../validate | QR code validation | model.validate_qr_code() | | .../status/heartbeat | Device heartbeat sync | model.write() (update timestamps) |

Designed for equipment rental and IoT scenarios, but the models are fully configurable.

Installation

cd ~/.node-red
npm install node-red-contrib-odoo-jsonrpc

Then restart Node-RED and look for the Odoo category in the palette.

Quick Start

1. Read partners from Odoo

[
    {
        "id": "inject1",
        "type": "inject",
        "name": "Get companies",
        "props": [
            { "p": "domain", "v": "[[\"is_company\",\"=\",true]]", "vt": "json" },
            { "p": "fields", "v": "[\"name\",\"email\",\"phone\"]", "vt": "json" },
            { "p": "limit", "v": "10", "vt": "num" }
        ],
        "wires": [["api1"]]
    },
    {
        "id": "api1",
        "type": "odoo-api",
        "name": "Read partners",
        "server": "server1",
        "operation": "search_read",
        "model": "res.partner",
        "wires": [["debug1"]]
    },
    {
        "id": "debug1",
        "type": "debug",
        "name": "Result",
        "active": true
    },
    {
        "id": "server1",
        "type": "odoo-server",
        "name": "My Odoo",
        "url": "http://localhost:8069",
        "database": "mydb",
        "apiVersion": "jsonrpc"
    }
]

2. Create a record

{
    "payload": {
        "name": "New Partner",
        "email": "[email protected]",
        "is_company": true
    },
    "model": "res.partner",
    "operation": "create"
}

3. IoT event bridge (MQTT to Odoo)

[MQTT In: devices/+/events] --> [odoo-event] --> [Debug]

Wire an MQTT subscriber to the odoo-event node. It automatically parses incoming IoT events and calls the appropriate Odoo methods.

Configuration

JSON-RPC (Odoo 14-18)

| Field | Description | |---|---| | URL | Full URL of the Odoo server (e.g., http://localhost:8069) | | Database | Odoo database name | | Username | Odoo user login | | Password | Odoo user password |

JSON-2 API (Odoo 19+)

| Field | Description | |---|---| | URL | Full URL of the Odoo server | | Database | Odoo database name | | API Key | Odoo API key (generate in Settings > Users > API Keys) |

Dynamic Parameters

All odoo-api parameters can be overridden at runtime via msg properties:

// In a function node before odoo-api:
msg.model = "sale.order";
msg.operation = "search_read";
msg.domain = [["state", "=", "sale"]];
msg.fields = ["name", "partner_id", "amount_total"];
msg.limit = 20;
msg.order = "date_order desc";
return msg;

Output

Every successful operation adds metadata to the message:

{
    "payload": [ ... ],
    "odoo": {
        "model": "res.partner",
        "operation": "search_read",
        "timestamp": "2026-02-14T10:30:00.000Z"
    }
}

Use Cases

  • IoT / Industrial: Bridge MQTT sensor data to Odoo Manufacturing, Maintenance, or Inventory
  • Equipment Rental: Automate rental lifecycle with smart locker/container events
  • E-commerce: Sync orders, stock levels, and customer data in real-time
  • Warehouse: Barcode/QR scanning workflows integrated with Odoo Inventory
  • Custom dashboards: Pull Odoo data into Node-RED Dashboard for real-time monitoring

Requirements

  • Node-RED >= 3.0.0
  • Node.js >= 18.0.0
  • Odoo 14, 15, 16, 17, 18, or 19+

License

MIT - see LICENSE

Contributing

Issues and pull requests are welcome on GitHub.

About TechTonga

TechTonga builds IoT-integrated business systems with Odoo. We specialize in:

  • Custom Odoo modules for rental, manufacturing, and logistics
  • IoT device integration (ESP32, industrial sensors, smart locks)
  • Node-RED automation flows for MQTT/Odoo bridges
  • End-to-end self-service and equipment rental platforms

Need Odoo + IoT integration? Get in touch