Jeedom Core

eqLogic
in package

eqLogic is the base class for any plugin equipment.

Tags
link
https://doc.jeedom.com/fr_FR/dev/plugin_template

Table of Contents

Constants

UIDDELIMITER  = '__'

Properties

$_batteryUpdated  : mixed
$_changed  : mixed
$_cmds  : mixed
$_debug  : mixed
$_needRefreshWidget  : mixed
$_object  : mixed
$_templateArray  : mixed
$_timeoutUpdated  : mixed
$category  : mixed
$comment  : mixed
$configuration  : mixed
$display  : mixed
$eqType_name  : mixed
$generic_type  : mixed
$id  : int
internal id of the eqLogic object
$isEnable  : mixed
$isVisible  : mixed
$logicalId  : string
$name  : string
the name of the eqLogic object. Real Human Readable Name
$object_id  : int|null
$order  : mixed
$tags  : mixed
$timeout  : mixed

Methods

all()  : mixed
allType()  : mixed
batteryStatus()  : mixed
batteryWidget()  : mixed
byCategorie()  : mixed
byId()  : void|eqLogic
byLogicalId()  : eqLogic|array<string|int, eqLogic>
byObjectId()  : mixed
byObjectNameEqLogicName()  : mixed
byString()  : eqLogic
byString
byTimeout()  : mixed
byType()  : array<string|int, eqLogic>
byTypeAndSearchConfiguration()  : mixed
byTypeAndSearhConfiguration()  : mixed
checkAlive()  : mixed
Checks if each equipment logic is still alive by verifying if it has sent a message recently. If a message has not been sent within the specified timeout period, an alert is generated.
checkAndUpdateCmd()  : mixed
copy()  : mixed
deadCmdGeneric()  : array<string|int, mixed>
Check for dead commands in the specified plugin.
displayDebug()  : mixed
emptyCacheWidget()  : mixed
export()  : mixed
fromHumanReadable()  : mixed
generateHtmlTable()  : mixed
getAlert()  : mixed
getAllTags()  : mixed
static method to get all tags
getCache()  : mixed
getCategory()  : mixed
getChanged()  : mixed
getCmd()  : cmd|array<string|int, cmd>
get one or multiple cmd of the eqLogic
getCmdByGenericType()  : cmd|array<string|int, cmd>
get one or multiple cmd of the eqLogic
getComment()  : mixed
getConfiguration()  : mixed
getCustomImage()  : mixed
getDebug()  : mixed
getDisplay()  : mixed
getEqType_name()  : string
getGenericType()  : mixed
getHumanName()  : mixed
getId()  : int
getImage()  : mixed
getIsEnable()  : int
getIsVisible()  : int
getLinkData()  : mixed
getLinkToConfiguration()  : mixed
getLogicalId()  : string
getMaxCmdAlert()  : mixed
getName()  : string
getObject()  : jeeObject
getObject_id()  : int
getOrder()  : int
getPrimaryCategory()  : mixed
getShowOnChild()  : mixed
getStatus()  : mixed
getTableName()  : mixed
getTags()  : mixed
getTimeout()  : mixed
getUsage()  : mixed
getUse()  : mixed
getUsedBy()  : mixed
hasOnlyEventOnlyCmd()  : mixed
hasRight()  : mixed
import()  : mixed
listByObjectAndCmdType()  : array<string|int, mixed>
Retrieves a list of distinct equipment logic IDs and names from a database table based on certain criteria.
listByTypeAndCmdType()  : mixed
migrateEqlogic()  : eqLogic
Migrates an equipment logic from a source to a target equipment logic.
postToHtml()  : mixed
preToHtml()  : mixed
refresh()  : mixed
refreshWidget()  : mixed
remove()  : mixed
save()  : mixed
Saves the equipment logic with various checks and updates.
searchByString()  : mixed
searchCmdByConfiguration()  : array<string|int, cmd>
searchConfiguration()  : mixed
setCache()  : mixed
setCategory()  : mixed
setChanged()  : mixed
setComment()  : mixed
setConfiguration()  : mixed
setDebug()  : mixed
setDisplay()  : mixed
setEqType_name()  : mixed
setGenericType()  : mixed
setId()  : mixed
setIsEnable()  : mixed
setIsVisible()  : mixed
setLogicalId()  : mixed
setName()  : mixed
setObject()  : $this
setObject_id()  : mixed
setOrder()  : mixed
setStatus()  : mixed
setTags()  : mixed
setTimeout()  : mixed
toArray()  : mixed
toHtml()  : mixed
toHumanReadable()  : mixed
widgetPossibility()  : mixed
Determine if a widget is possible for the given object.
cast()  : eqLogic|mixed
cast the input object or arrauyof objects into (?)

Constants

Properties

$_needRefreshWidget

protected mixed $_needRefreshWidget = \false

$_templateArray

protected static mixed $_templateArray = array()

$name

the name of the eqLogic object. Real Human Readable Name

protected string $name

$object_id

protected int|null $object_id = \null

the eqLogic object. inline description

Methods

all()

public static all([mixed $_onlyEnable = false ]) : mixed
Parameters
$_onlyEnable : mixed = false

batteryStatus()

public batteryStatus([mixed $_pourcent = '' ][, mixed $_datetime = '' ]) : mixed
Parameters
$_pourcent : mixed = ''
$_datetime : mixed = ''

batteryWidget()

public batteryWidget([mixed $_version = 'dashboard' ]) : mixed
Parameters
$_version : mixed = 'dashboard'

byCategorie()

public static byCategorie(mixed $_category) : mixed
Parameters
$_category : mixed

byId()

public static byId(int|string $_id) : void|eqLogic
Parameters
$_id : int|string
Return values
void|eqLogic —

void if $_id is not valid else the eqLogic

byLogicalId()

public static byLogicalId(string $_logicalId, string $_eqType_name[, bool $_multiple = false ]) : eqLogic|array<string|int, eqLogic>
Parameters
$_logicalId : string
$_eqType_name : string

the plugin class name

$_multiple : bool = false

default value=false

Return values
eqLogic|array<string|int, eqLogic> —

eqLogic if $_multiple is false else eqLogic[]

byObjectId()

public static byObjectId(mixed $_object_id[, mixed $_onlyEnable = true ][, mixed $_onlyVisible = false ][, mixed $_eqType_name = null ][, mixed $_logicalId = null ][, mixed $_orderByName = false ][, mixed $_onlyHasCmds = false ]) : mixed
Parameters
$_object_id : mixed
$_onlyEnable : mixed = true
$_onlyVisible : mixed = false
$_eqType_name : mixed = null
$_logicalId : mixed = null
$_orderByName : mixed = false
$_onlyHasCmds : mixed = false

byObjectNameEqLogicName()

public static byObjectNameEqLogicName(mixed $_object_name, mixed $_eqLogic_name) : mixed
Parameters
$_object_name : mixed
$_eqLogic_name : mixed

byTimeout()

public static byTimeout([mixed $_timeout = 0 ][, mixed $_onlyEnable = false ]) : mixed
Parameters
$_timeout : mixed = 0
$_onlyEnable : mixed = false

byType()

public static byType(string $_eqType_name[, bool $_onlyEnable = false ]) : array<string|int, eqLogic>
Parameters
$_eqType_name : string

the plugin class name

$_onlyEnable : bool = false
Return values
array<string|int, eqLogic>

byTypeAndSearchConfiguration()

public static byTypeAndSearchConfiguration(mixed $_eqType_name, mixed $_configuration[, mixed $_onlyEnable = false ][, mixed $_onlyVisible = false ]) : mixed
Parameters
$_eqType_name : mixed
$_configuration : mixed
$_onlyEnable : mixed = false
$_onlyVisible : mixed = false

byTypeAndSearhConfiguration()

public static byTypeAndSearhConfiguration(mixed $_eqType_name, mixed $_configuration[, mixed $_onlyEnable = false ][, mixed $_onlyVisible = false ]) : mixed
Parameters
$_eqType_name : mixed
$_configuration : mixed
$_onlyEnable : mixed = false
$_onlyVisible : mixed = false

checkAlive()

Checks if each equipment logic is still alive by verifying if it has sent a message recently. If a message has not been sent within the specified timeout period, an alert is generated.

public static checkAlive() : mixed
Tags
uses
message::byPluginLogicalId()
uses
config::byKey()
throws
Exception

if there is an error executing the SQL query.

checkAndUpdateCmd()

public checkAndUpdateCmd(mixed $_logicalId, mixed $_value[, mixed $_updateTime = null ]) : mixed
Parameters
$_logicalId : mixed
$_value : mixed
$_updateTime : mixed = null

copy()

public copy(mixed $_name) : mixed
Parameters
$_name : mixed

deadCmdGeneric()

Check for dead commands in the specified plugin.

public static deadCmdGeneric(string $_plugin_id) : array<string|int, mixed>
Parameters
$_plugin_id : string

The ID of the plugin to check for dead commands.

Tags
uses
utils::o2a()

Object-To-Array conversion

uses
cmd::byId()
Return values
array<string|int, mixed> —

Returns an array of dead commands, if any are found.

displayDebug()

public displayDebug(mixed $_message) : mixed
Parameters
$_message : mixed

export()

public export([mixed $_withCmd = true ]) : mixed
Parameters
$_withCmd : mixed = true

fromHumanReadable()

public static fromHumanReadable(mixed $_input) : mixed
Parameters
$_input : mixed

generateHtmlTable()

public static generateHtmlTable(mixed $_nbLine, mixed $_nbColumn[, mixed $_options = array() ]) : mixed
Parameters
$_nbLine : mixed
$_nbColumn : mixed
$_options : mixed = array()

getAllTags()

static method to get all tags

public static getAllTags() : mixed

getCache()

public getCache([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getCategory()

public getCategory([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getCmd()

get one or multiple cmd of the eqLogic

public getCmd([string $_type = null ][, string $_logicalId = null ][, bool $_visible = null ][, bool $_multiple = false ]) : cmd|array<string|int, cmd>
Parameters
$_type : string = null

['action'|'info']

$_logicalId : string = null
$_visible : bool = null
$_multiple : bool = false
Return values
cmd|array<string|int, cmd>

getCmdByGenericType()

get one or multiple cmd of the eqLogic

public getCmdByGenericType([string $_type = null ][, string $_generic_type = null ][, bool $_visible = null ][, bool $_multiple = false ]) : cmd|array<string|int, cmd>
Parameters
$_type : string = null

['action'|'info']

$_generic_type : string = null
$_visible : bool = null
$_multiple : bool = false
Return values
cmd|array<string|int, cmd>

getConfiguration()

public getConfiguration([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getDisplay()

public getDisplay([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getEqType_name()

public getEqType_name() : string
Return values
string

getHumanName()

public getHumanName([mixed $_tag = false ][, mixed $_prettify = false ]) : mixed
Parameters
$_tag : mixed = false
$_prettify : mixed = false

getIsEnable()

public getIsEnable([int $_default = 0 ]) : int
Parameters
$_default : int = 0
Return values
int

getIsVisible()

public getIsVisible([int $_default = 0 ]) : int
Parameters
$_default : int = 0
Return values
int

getLinkData()

public getLinkData([mixed &$_data = array('node' => array(), 'link' => array()) ][, mixed $_level = 0 ][, mixed $_drill = null ]) : mixed
Parameters
$_data : mixed = array('node' => array(), 'link' => array())
$_level : mixed = 0
$_drill : mixed = null

getLinkToConfiguration()

public getLinkToConfiguration() : mixed

getLogicalId()

public getLogicalId() : string
Return values
string

getObject_id()

public getObject_id() : int
Return values
int

getStatus()

public getStatus([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getTimeout()

public getTimeout([mixed $_default = null ]) : mixed
Parameters
$_default : mixed = null

getUsedBy()

public getUsedBy([mixed $_array = false ]) : mixed
Parameters
$_array : mixed = false

hasRight()

public hasRight(mixed $_right[, mixed $_user = null ]) : mixed
Parameters
$_right : mixed
$_user : mixed = null

import()

public import(mixed $_configuration[, mixed $_dontRemove = false ]) : mixed
Parameters
$_configuration : mixed
$_dontRemove : mixed = false

listByObjectAndCmdType()

Retrieves a list of distinct equipment logic IDs and names from a database table based on certain criteria.

public static listByObjectAndCmdType(mixed $_object_id, string $_typeCmd[, string $subTypeCmd = '' ]) : array<string|int, mixed>
Parameters
$_object_id : mixed

The ID of the object associated with the equipment logic (if any). If null, retrieves all equipment logic that do not have an object associated with them. If a non-empty string, retrieves all equipment logic associated with the specified object ID.

$_typeCmd : string

The type of command associated with the equipment logic. If 'all', retrieves all equipment logic regardless of command type. Otherwise, retrieves equipment logic with the specified command type.

$subTypeCmd : string = ''

The subtype of command associated with the equipment logic (if any). If a non-empty string, retrieves equipment logic with the specified command subtype.

Tags
throws
Exception

if there is an error executing the SQL query.

Return values
array<string|int, mixed> —

An array of distinct equipment logic IDs and names that match the specified criteria. The array is sorted by name in ascending order.

listByTypeAndCmdType()

public static listByTypeAndCmdType(mixed $_eqType_name, mixed $_typeCmd[, mixed $subTypeCmd = '' ]) : mixed
Parameters
$_eqType_name : mixed
$_typeCmd : mixed
$subTypeCmd : mixed = ''

migrateEqlogic()

Migrates an equipment logic from a source to a target equipment logic.

public static migrateEqlogic(int $_sourceId, int $_targetId[, string $_mode = 'replace' ]) : eqLogic
Parameters
$_sourceId : int

The ID of the source equipment logic to migrate.

$_targetId : int

The ID of the target equipment logic to migrate to.

$_mode : string = 'replace'

The mode of migration. Default is 'replace'.

Tags
uses
jeedom::getConfiguration()
uses
DB::prepare()
throws
Exception

if the source or target equipment logic does not exist or if there is an error executing the SQL query.

Return values
eqLogic —

The migrated target equipment logic.

postToHtml()

public postToHtml(mixed $_version, mixed $_html) : mixed
Parameters
$_version : mixed
$_html : mixed

preToHtml()

public preToHtml([mixed $_version = 'dashboard' ][, mixed $_default = array() ][, mixed $_noCache = false ]) : mixed
Parameters
$_version : mixed = 'dashboard'
$_default : mixed = array()
$_noCache : mixed = false

save()

Saves the equipment logic with various checks and updates.

public save([bool $_direct = false ]) : mixed
Parameters
$_direct : bool = false

Whether to save the equipment logic directly. Default is false.

Tags
uses
message::byPluginLogicalId()
uses
DB::save()
uses
scenario::byId()
throws
Exception

if the name of the equipment is empty or there is an error executing the SQL query.

searchByString()

public static searchByString(mixed $_search) : mixed
Parameters
$_search : mixed

searchCmdByConfiguration()

public searchCmdByConfiguration(string $_configuration[, string $_type = null ]) : array<string|int, cmd>
Parameters
$_configuration : string
$_type : string = null

['action'|'info']

Return values
array<string|int, cmd>

searchConfiguration()

public static searchConfiguration(mixed $_configuration[, mixed $_eqType_name = null ]) : mixed
Parameters
$_configuration : mixed
$_eqType_name : mixed = null

setCache()

public setCache(mixed $_key[, mixed $_value = null ]) : mixed
Parameters
$_key : mixed
$_value : mixed = null

setCategory()

public setCategory(mixed $_key, mixed $_value) : mixed
Parameters
$_key : mixed
$_value : mixed

setChanged()

public setChanged(mixed $_changed) : mixed
Parameters
$_changed : mixed

setComment()

public setComment(mixed $_comment) : mixed
Parameters
$_comment : mixed

setConfiguration()

public setConfiguration(mixed $_key, mixed $_value) : mixed
Parameters
$_key : mixed
$_value : mixed

setDebug()

public setDebug(mixed $_debug) : mixed
Parameters
$_debug : mixed

setDisplay()

public setDisplay(mixed $_key, mixed $_value) : mixed
Parameters
$_key : mixed
$_value : mixed

setEqType_name()

public setEqType_name(mixed $eqType_name) : mixed
Parameters
$eqType_name : mixed

setGenericType()

public setGenericType(mixed $_generic_type) : mixed
Parameters
$_generic_type : mixed

setId()

public setId(mixed $_id) : mixed
Parameters
$_id : mixed

setIsEnable()

public setIsEnable(mixed $_isEnable) : mixed
Parameters
$_isEnable : mixed

setIsVisible()

public setIsVisible(mixed $_isVisible) : mixed
Parameters
$_isVisible : mixed

setLogicalId()

public setLogicalId(mixed $_logicalId) : mixed
Parameters
$_logicalId : mixed

setName()

public setName(mixed $_name) : mixed
Parameters
$_name : mixed

setObject_id()

public setObject_id([mixed $object_id = null ]) : mixed
Parameters
$object_id : mixed = null

setOrder()

public setOrder(mixed $_order) : mixed
Parameters
$_order : mixed

setStatus()

public setStatus(mixed $_key[, mixed $_value = null ]) : mixed
Parameters
$_key : mixed
$_value : mixed = null

setTags()

public setTags(mixed $_tags) : mixed
Parameters
$_tags : mixed

setTimeout()

public setTimeout(mixed $_timeout) : mixed
Parameters
$_timeout : mixed

toHtml()

public toHtml([mixed $_version = 'dashboard' ]) : mixed
Parameters
$_version : mixed = 'dashboard'

toHumanReadable()

public static toHumanReadable(mixed $_input) : mixed
Parameters
$_input : mixed

widgetPossibility()

Determine if a widget is possible for the given object.

public widgetPossibility([string $_key = '' ][, bool $_default = true ]) : mixed
Parameters
$_key : string = ''

Optional key for which widget possibility needs to be checked.

$_default : bool = true

Default value to return if widget possibility is not found.

Return values
mixed —

Returns an array of widget possibilities if $_key is not provided, or a specific widget possibility if $_key is provided. Returns $_default if widget possibility is not found.

cast()

cast the input object or arrauyof objects into (?)

private static cast(eqLogic|mixed $_inputs) : eqLogic|mixed
Parameters
$_inputs : eqLogic|mixed
Tags
see
decrypt
Return values
eqLogic|mixed

        
On this page

Search results