Repository
OCA/iot · module folder · Try on Runboat
Module version
1.0.0
Category
Uncategorized
Folder size
0.1 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/iot
Last tracking update
2026-08-07 08:23:15
Authors
Odoo Community Association (OCA), ForgeFlow, CreuBlanca
Maintainers
Odoo Community Association (OCA), ForgeFlow, CreuBlanca
Committers
Weblate, FernandoRomera, OCA-git-bot, oca-ci
Odoo dependencies
OCA/iot:
odoo/odoo:
Python dependencies
None
System dependencies
None
Required by
None
Description
This addon allows to define IoT Rules.

A Rule specifies which Inputs that can be controlled by a certain Key.
The Key is owned by an Agent (Employee, Partner or anonymous). The Input
is a request from an IoT Device that executes a certain function in
Odoo. This function will check if the Key (= the Agent) is allowed by
any Rule to "control" the Device. If Odoo answers positively the Agent
will be allowed the to execute some Function on the Device (for example
open a door or switch on a relay).

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
iot_device_input_form_view iot.device.input.form (in iot_rule) iot.device.input form Inherits iot_input_oca.iot_device_input_form
iot_key_action_form_view iot.key.action.form (in iot_rule) iot.key.action form New
iot_key_action_search_view iot.key.action.search (in iot_rule) iot.key.action search New
iot_key_action_tree_view iot.key.action.tree (in iot_rule) iot.key.action tree New
iot_key_form_view iot.key.form (in iot_rule) iot.key form New
iot_key_search_view iot.key.search (in iot_rule) iot.key search New
iot_key_tree_view iot.key.tree (in iot_rule) iot.key tree New
iot_key_wizard_form_view iot.key.wizard.form (in iot_rule) iot.key.wizard form New
iot_lock_form_view iot.lock.form (in iot_rule) iot.lock form New
iot_lock_search_view iot.lock.search (in iot_rule) iot.lock search New
iot_lock_tree_view iot.lock.tree (in iot_rule) iot.lock tree New
iot_rule_form_view iot.rule.form (in iot_rule) iot.rule form New
iot_rule_search_view iot.rule.search (in iot_rule) iot.rule search New
iot_rule_tree_view iot.rule.tree (in iot_rule) iot.rule tree New
res_partner_form_view res.partner.form (in iot_rule) res.partner form Inherits base.view_partner_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • get_iot_keys(self, serial_of_input, type_of_key)
  • write(self, vals)

New fields (1)
  • lock_id Many2one → iot.lock
    args: 'iot.lock'
Public methods (3)
  • call_lock(self, value)
  • generate_iot_lock(self)
  • get_iot_keys(self, domain=None)

New fields (9)
  • action_ids One2many → iot.key.action
    inverse_name='key_id' args: 'iot.key.action'
  • active Boolean
    default=True
  • expiration_date Datetime
  • key_type Char
  • name Char
  • res_id Integer
    index=True
  • res_model Char
    index=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
  • unique_virtual_key Char
    default='/' readonly=True required=True
Public methods (3)
  • create(self, mvals)
    @api.model_create_multi
  • get_iot_rule_values(self)
  • view_actions(self)

New fields (6)
  • key_id Many2one → iot.key
    args: 'iot.key'
  • key_name Char
    related='key_id.name' string="Key's Name"
  • lock_id Many2one → iot.lock
    required=True args: 'iot.lock'
  • result Char
    default='undefined' required=True
  • timestamp Datetime
    default=fields.Datetime.now required=True string='Time'
  • unique_virtual_key Char
Public methods (0)

No public methods.

New fields (2)
  • iot_key_count Integer
    compute='_compute_iot_key_count'
  • iot_key_ids One2many → iot.key
    domain=<expr> inverse_name='res_id' args: 'iot.key'
Public methods (1)
  • action_view_iot_key(self)

New fields (5)
  • iot_key_id Many2one → iot.key
    args: 'iot.key'
  • res_id Integer
    required=True
  • res_model Char
    required=True
  • rule_ids Many2many → iot.rule
    args: 'iot.rule'
  • unique_virtual_key Char
    required=True
Public methods (2)
  • create_key(self)
  • update_key(self, update=True)

New fields (5)
  • action_ids One2many → iot.key.action
    inverse_name='lock_id' args: 'iot.key.action'
  • active Boolean
    default=True required=True
  • description Text
  • name Char
    required=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
Public methods (5)
  • check_access(self, key)
  • check_access_unique_virtual_key(self, unique_virtual_key)
  • create_action(self, key, result)
  • get_virtual_keys(self, domain=None)
  • view_actions(self)

New fields (4)
  • active Boolean
    default=True required=True
  • lock_ids Many2many → iot.lock
    string='Locks' args: 'iot.lock'
  • name Char
  • parent_ids Many2many → iot.rule
    column1='rule_id' column2='implied_rule_id' relation='iot_rule_implied_rel' args: 'iot.rule'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…