Connect to remote systems from Odoo (IoT, etc)
- 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)
- 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.
Bugs, feature requests
For bugs and feature requests please send email to email@example.com.
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.
- 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).
- Install Odoo module.
- Install external (optional) libraries and modules.
- Run agent somewhere.
Copy remote_agent package to /mnt/external-addons or another directory where Odoo modules are located.
Install TinyRPC library:
` pip3 install TinyRPC `
The following dependencies are not required to install and run remote_agent but when installed provide additional features.
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.
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.
Copy agent folder to your remote box to /srv/agent/ folder. Python2.7 is required.
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
See docker-compose.yml in the package folder.
To customize your installation use docker-compose.override.yml to set your custom values.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.