Here is documentation on API methods. First here is the specifications (JSON RPC 2.0) : http://www.jsonrpc.org/specification
Access to the API is via the url : URL_JEEDOM/core/api/jeeApi.php
Return pong, test communication with Jeedom
Returns the version of Jeedom
Returns the Jeedom datetime in microseconds
Returns a configuration value.
Settings :
string key : configuration value key to return
string plugin : (optional), configuration value plugin
string default : (optional), value to return if the key does not exist pas
Saves a configuration value
Settings :
string value : value to record
string key : configuration value key to save
string plugin : (optional), configuration value plugin to enregistrer
Returns the list of changes since the datetime passed in parameter (must be in microseconds). You will also have in the answer the Jeedom’s current datetime (to be reused for the next query)
Settings :
Returns the list of all plugins
Settings :
int activateOnly = 0 (only returns the list of activated plugins)
int orderByCaterogy = 0 (returns the list of sorted plugins by category)
Returns the list of all objects
Returns the list of all objects, with for each object all its equipment and for each equipment all its commands as well as states of these (for info type commands)
Returns an object with all its equipment and for each equipment all its commands as well as their states (for info type commands)
Settings :
Returns the specified object
Settings:
Returns an object, its equipment and for each equipment all its commands as well as the cell states (for type commands info)
Returns the specified object
Settings:
int id (empty if it is a creation)
string name
int father_id = null
int isVisible = 0
int position
array configuration
array display
Return the global summary for the key passed in parameter
Settings:
Returns the summary for the object id
Settings:
int id : object id
string key : (optional), key of the desired summary, if empty then Jeedom sends you the summary for all the keys
Returns the list of all equipment
Returns equipment and its commands as well as their states (for info type commands)
Settings:
Returns the specified equipment
Settings:
Returns all equipment belonging to the specified type (plugin)
Settings:
Returns all equipment belonging to the specified object
Settings:
Returns an equipment table according to the parameters. The return will be of the form array ('eqType1' ⇒array ('id'⇒…,' cmds' ⇒ array (….)), 'eqType2' ⇒array ('id'⇒…,' cmds' ⇒ array (….))….,id1 ⇒ array ('id'⇒…,' cmds '⇒ array (….)), id2 ⇒ array (' id'⇒…, 'cmds' ⇒ array(….))..)
Settings:
string \ [] eqType = table of the types of equipment required
int \ [] id = table of desired custom equipment IDs
Returns the registered / created equipment
Settings:
int id (empty if it is a creation)
string eqType_name (type of script, virtual equipment…)
string name
string logicalId = ‘’
int object_id = null
int eqReal_id = null
int isVisible = 0
int isEnable = 0
array configuration
int timeout
array category
Returns the list of all commands
Returns the specified command
Settings:
Returns all orders belonging to the specified equipment
Settings:
Execute the specified command
Settings:
int id : id of a command or id array if you want to execute multiple orders at once
\ [options ] List of command options (depends on type and command subtype)
Returns statistics on the order (only works on info and historical commands)
Settings:
int id
string startTime : start date of statistics calculation
string endTime : end date of statistics calculation
Returns the trend on the command (only works on the commands of info and historical type)
Settings:
int id
string startTime : trend calculation start date
string endTime : trend calculation end date
Returns the command history (only works on the commands of info and historical type)
Settings:
int id
string startTime : history start date
string endTime : history end date
Returns the specified object
Settings:
int id (empty if it is a creation)
string name
string logicalId
string eqType
string order
string type
string subType
int eqLogic_id
int isHistorized = 0
string unit = ‘’
array configuration
array template
array display
array html
int value = null
int isVisible = 1
array alert
Allows you to send a value to an order
Settings:
int id
string value : valeur
string datetime : (optional) datetime value
Returns the list of all scenarios
Returns the specified scenario
Settings:
Returns the export of the scenario as well as the human name of the scenario
Settings:
Allows you to import a scenario.
Settings:
int id : id of the scenario in which to import (empty if creation)
string humanName : human name of the scenario (empty if creation)
array import : scenario (from the export scenario field::export)
Changes the state of the specified scenario.
Settings:
int id
string state: \ [Run, stop, enable, disable ]
Allows you to recover a log
Settings:
string log : name of the log to recover
string start : line number on which to start reading
string nbLine : number of lines to recover
Get the Jeedom logs list
Settings:
Empty a log
Settings:
Allows you to delete a log
Settings:
Get the value of a variable stored in the datastore
Settings:
string type : type of stored value (for scenarios it’s scenario)
id linkId : -1 for global (value for default scenarios, or the scenario id)
string key : value name
Stores the value of a variable in the datastore
Settings:
string type : type of stored value (for scenarios it’s scenario)
id linkId : -1 for global (value for default scenarios, or the scenario id)
string key : value name
mixed value : value to record
Returns the list of all messages
Delete all messages
Try to match a request with an interaction, execute action and responds accordingly
Settings:
query (request phrase)
int reply_cmd = NULL : Command ID to use to respond, if not specify then Jeedom sends you the answer in the json
Returns the complete list of all interactions
Stop Jeedom
Restart Jeedom
Lets you know if the global state of Jeedom is OK
Lets launch a Jeedom update
Allows you to launch a backup of Jeedom
List of USB ports and names of USB key connected to it
Installation / Update of a given plugin
Settings:
Deletion of a given plugin
Settings:
Returns information on the status of plugin dependencies
Settings:
Force installation of plugin dependencies
Settings:
Returns information about the status of the plugin daemon
Settings:
Force the demon to start
Settings:
Force demon stop
Settings:
Change the management mode of the daemon
Settings:
string plugin_id : plugin name (logical name)
int mode : 1 for automatic, 0 for manual
Return the list of all installed components, their version and the related information
Allows you to check for updates
Allows you to update Jeedom and all plugins
Settings:
Force the (re) start of the Jeedom DNS
Forces the DNS Jeedom to stop
Return Jeedom DNS status
Here is an example of using the API. For the example below I use this class php which simplifies the use of the API.
Retrieving the list of objects :
`{.php}
$jsonrpc = new jsonrpcClient('#URL_JEEDOM#/core/api/jeeApi.php', #API_KEY#);
if ($ jsonrpc-> sendRequest ( 'object::all ', array())){
print_r ($ jsonrpc-> getResult ());
}else{
echo $ jsonrpc-> getError ();
}
‘’
Execution of an order (with the option of a title and a message)
`{.php}
$jsonrpc = new jsonrpcClient('#URL_JEEDOM#/core/api/jeeApi.php', #API_KEY#);
if ($ jsonrpc-> sendRequest ( 'cmd::execCmd ', array (' id' => #cmd_id#, 'options '=> array (' title '=>' Cuckoo ',' message '=>' It works')))){
echo 'OK';
}else{
echo $ jsonrpc-> getError ();
}
‘’
The API is of course usable with other languages (simply a post on a page)