Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8c09f78
[ADD] iot_template
etobella Mar 18, 2019
d71e3ed
[IMP] iot_template: Add a demo example
etobella Dec 30, 2020
67777c4
[IMP] iot_template_oca: black, isort, prettier
olgamarcocb Jun 10, 2021
5f8a950
[MIG] iot_template_oca: Migration to 13.0
olgamarcocb Jun 10, 2021
049b591
[IMP] iot_template_oca: User configuration, tag and groups
etobella Dec 9, 2021
50dce5c
[IMP] iot_template_oca: Improve configuration wizard
etobella Dec 9, 2021
840cb0a
[ADD] iot_option_oca
etobella Dec 10, 2021
e6a0583
[IMP] iot_template_oca: Add device image on template, fix manifest
etobella Dec 16, 2021
a1f4458
[IMP] iot_template_oca: set a default icon, allow to pass IP
olgamarcocb Dec 17, 2021
2376604
[IMP] iot_template_oca: black, isort, prettier
olgamarcocb Dec 20, 2021
9d1c38e
[MIG] iot_template_oca: Migration to 14.0
olgamarcocb Dec 20, 2021
919a14e
[IMP] iot_template_oca: add iot.device.configure access rules
olgamarcocb Dec 20, 2021
490a67f
[MIG] iot_template_oca: Migration to 15.0
olgamarcocb May 11, 2022
e030bc3
[UPD] Update iot_template_oca.pot
May 12, 2022
22c2901
[UPD] README.rst
OCA-git-bot May 12, 2022
5b1e17a
[DEL] iot_template_oca: Remove migration script to v14.0
sergio-teruel Feb 21, 2023
0967e34
Added translation using Weblate (Italian)
mymage Mar 23, 2023
ca94a26
Translated using Weblate (Italian)
mymage Mar 23, 2023
abff304
Translated using Weblate (Italian)
mymage Mar 23, 2023
c682b4e
Translated using Weblate (Italian)
mymage Mar 23, 2023
330ff6f
Translated using Weblate (Italian)
mymage Mar 30, 2023
cb929a9
Translated using Weblate (Italian)
mymage Jun 8, 2023
2eccaf6
[UPD] README.rst
OCA-git-bot Sep 3, 2023
b4e940f
Added translation using Weblate (Spanish)
Ivorra78 Nov 15, 2023
69621e6
Translated using Weblate (Spanish)
Ivorra78 Nov 15, 2023
a30bd88
[MIG] iot_template_oca: migration to v16
AaronHForgeFlow Jan 15, 2024
0bf0bb0
[UPD] Update iot_template_oca.pot
Jan 19, 2024
19d9707
Added translation using Weblate (Persian)
mostafabarmshory Apr 3, 2024
457ea07
[UPD] Update iot_template_oca.pot
May 1, 2024
b0cd742
Update translation files
weblate May 1, 2024
8c4ec5a
Translated using Weblate (Italian)
mymage May 2, 2024
6ee69b7
[IMP] iot_template_oca: pre-commit auto fixes
FernandoRomera Aug 6, 2024
b0470d3
[MIG] iot_template_oca: Migration to 17.0
FernandoRomera Aug 6, 2024
3e7e504
[UPD] Update iot_template_oca.pot
Sep 13, 2024
a015ab7
[BOT] post-merge updates
OCA-git-bot Sep 13, 2024
5f1d906
[MIG] iot_template_oca: Migration to 18.0
JordiBForgeFlow Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions iot_template_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
=============
IoT Templates
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9da856bdfdf1550c905f1ed5dc06b171812d3219d90070c36d0735b4e9013a78
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fiot-lightgray.png?logo=github
:target: https://github.com/OCA/iot/tree/18.0/iot_template_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/iot-18-0/iot-18-0-iot_template_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/iot&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Create a system of templates for IoT devices.

When we are using a template we can configure a device with a simple URL
configuration. The device will contact odoo and send the template name.
Odoo will create the device and respond with all the expected data.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Create a template with a module or in Iot > Templates
2. Access Iot > Config Device
3. Confirm that you want to configurate a new device
4. Copy the URL
5. Access the device and send it the configuration url
6. The device will contact odoo and automatically configure itself.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/iot/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/iot/issues/new?body=module:%20iot_template_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Creu Blanca

Contributors
------------

- Enric Tobella <etobella@creublanca.es>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/iot <https://github.com/OCA/iot/tree/18.0/iot_template_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions iot_template_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import controller
from . import models
from . import wizards
19 changes: 19 additions & 0 deletions iot_template_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2018 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "IoT Templates",
"version": "18.0.1.0.0",
"category": "IoT",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"summary": "IoT module for managing templates",
"depends": ["iot_input_oca", "iot_output_oca"],
"website": "https://github.com/OCA/iot",
"data": [
"security/ir.model.access.csv",
"wizards/iot_device_configure.xml",
"views/iot_template_views.xml",
],
"demo": ["demo/iot_template.xml"],
}
1 change: 1 addition & 0 deletions iot_template_oca/controller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import iot_controller
25 changes: 25 additions & 0 deletions iot_template_oca/controller/iot_controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import json

from odoo import http


class CallIot(http.Controller):
@http.route(
["/iot/<serial>/configure"],
type="http",
auth="public",
methods=["POST"],
csrf=False,
)
def configure_iot(self, serial, template, **kwargs):
request = http.request
if not request.env:
return json.dumps(False)
return json.dumps(
request.env["iot.device.configure"]
.sudo()
.configure(serial, template, **kwargs)
)
17 changes: 17 additions & 0 deletions iot_template_oca/demo/iot_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="demo_template" model="iot.template">
<field name="name">demo_template</field>
</record>
<record id="demo_template_serial" model="iot.template.key">
<field name="template_id" ref="demo_template" />
<field name="key">serial</field>
</record>
<record id="demo_template_input" model="iot.template.input">
<field name="template_id" ref="demo_template" />
<field name="name">demo_input</field>
<field name="call_model_id" eval="False" />
<field name="call_function">test_input_device</field>
<field name="params">{}</field>
</record>
</odoo>
Loading
Loading