Odoo remote agent

by
Odoo          
v 12.0 Third Party 49
Download for 12.0 series Deploy on Odoo.sh
You bought this module and need support ? Click here !
Technical name remote_agent
LicenseLGPL-3
Websitehttp://github.com/litnimax/remote_agent
Read description for v 11.0 v 10.0 v 9.0 v 8.0
Technical name remote_agent
LicenseLGPL-3
Websitehttp://github.com/litnimax/remote_agent
Read description for v 11.0 v 10.0 v 9.0 v 8.0

Remote Agent

Connect to remote systems from Odoo (IoT, etc)

Features:

  • Ready to use framework for interconnecting with remote systems.
  • Uses Odoo bus as a PUB/SUB subsystem.
  • JSON-RPC over bus.
  • Remote agents monitoring and statistics.
  • Alarms (agent can fire an alarm and it will show it red in the list)

Roadamp

  • Agent auto registration by secure token.
  • Asyncio version of agent (currenly gevent is used).
  • Agent events (different events happening on remote side).
  • Agent log file transmition.

Support

Bugs, feature requests

For bugs and feature requests please send email to odooist@gmail.com.

Development

Join and contribute!

 The source code repository is located here.

 Read the project wiki for more information.

Odoo Remote Agent communication framework

Concept

Existing Odoo clients can only call Odoo methods. This solutions uses odoorpc library for this.

This solution also gives the ability to call remote client from Odoo using 2 ways of communication:

  • JSON-RPC over Odoo bus (PUB/SUB via long polling).
  • JSON-RPC via HTTPS.
https://raw.githubusercontent.com/litnimax/remote_agent/12.0/static/description/img/concept.png

Features

  • Odoo connection watcher (auto re-connect after disconnect).
  • Two alternative communication channels: bus and https.
  • Connection monitor ans statistics (via cron job).
  • Agent remote restart (restart agent process from Odoo).

Development documentation

See Wiki for more documentation:

Installation

  • Install Odoo module.
  • Install external (optional) libraries and modules.
  • Run agent somewhere.

Install Odoo module

Copy remote_agent package to /mnt/external-addons or another directory where Odoo modules are located.

Install external libs and modules

Install TinyRPC library:

` pip3 install TinyRPC `

The following dependencies are not required to install and run remote_agent but when installed provide additional features.

Humanize

Agent tree view can show state changes in relative dates in human language (e.g. 4 minutes ago). Install this in Odoo in the following way:

pip3 install humanize

And restart Odoo.

web_notify

When this module is installed agents can send UI notifictions to users.

Install it from here - https://apps.odoo.com/apps/modules/12.0/web_notify/ and restart Odoo.

Install agent

Copy agent folder to your remote box to /srv/agent/ folder. Python2.7 is required.

Install dependencies:

pip install -r requirements.txt

Run agent using start_agent.sh script to check the installation:

/srv/agent # ./start_agent.sh
2019-06-10 16:02:36,551 - INFO - remote_agent - Odoo agent version 1.0-gevent init
...
^CKeyboardInterrupt
Mon Jun 10 16:06:38 2019
2019-06-10 16:06:38,283 - INFO - remote_agent - Odoo Agent exit

Configure Agent to be started on system boot:

cp agent.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable odoo_agent
systemctl start odoo_agent
journalctl -u odoo_agent

Docker compose deploy

See docker-compose.yml in the package folder.

To customize your installation use docker-compose.override.yml to set your custom values.

Changelog

1.1

  • RPC over HTTPS implemented.
  • Added option to odoo Agent model to verify agent's HTTPS certificate (in case you want to use your own certificates instead of suplied self-signed.).
  • Agent now can overwrite it's settings on Odoo if

1.0

Initial release.

Please log in to comment on this module

Please choose a rating from 1 to 5 for this module.