Advertisement
Guest User

Pimatic Source

a guest
Dec 30th, 2016
211
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 113.36 KB | None
  1.  
  2. <!DOCTYPE html><html manifest="application.manifest"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no, maximum-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><meta id="theme-color" name="theme-color" content="#007dcd"><link rel="icon" sizes="152x152" href="apple-touch-icon-152x152-precomposed.png"><link rel="apple-touch-icon-precomposed" sizes="152x152" href="apple-touch-icon-152x152-precomposed.png"><link rel="apple-touch-icon-precomposed" sizes="120x120" href="apple-touch-icon-120x120-precomposed.png"><link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png"><link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png"><title>partmatic</title><link href='/assets/base-96c2e43ac38f883a0d3d42d24f11bced.css' rel='stylesheet' type='text/css'><link href='/assets/style-e4f32d321774f09300f34f0709da5321.css' rel='stylesheet' type='text/css'><script src='/assets/lazyload-13d21784a81e74f4e9f5fe1a73aef994.js' type='text/javascript'></script><script src='/assets/base-199deb70de2f47d7cf8f1afa9d18410f.js' type='text/javascript'></script><script src="socket.io/socket.io.js"></script><script src="api/decl-api-client.js"></script><script type="text/javascript">locale = {"on":"on","turned %s on":"turned %s on","Please enter a id":"Please enter an ID","would turn %s on":"would turn %s on","would log \"%s\"":"would log \"%s\"","turned %s off":"turned %s off","log: \"%s\"":"log: \"%s\"","Off":"Off","On":"On","Menu":"Menu","Speak":"Speak","Devices":"Devices","Drop here to remove item":"Drop here to remove item","Rules":"Rules","Close menu":"Close menu","Log":"Log","Back":"Back","Add a item":"Add an item","if":"if","then":"then","Edit rule":"Edit rule","Add new rule":"Add new rule","Cancel":"Cancel","Save":"Save","Delete this rule":"Delete this rule","Clear":"Clear","Log messages":"Log messages","would turn %s off":"would turn %s off","Add an item":"Add an item","Add a new rule":"Add a new rule","Advanced Options":"Advanced Options","Connection lost, retying...":"Connection lost, retrying...","The rule must start with \"if\" and contain a \"then\" part!":"The rule must start with \"if\" and contain a \"then\" part!","No id given":"No ID given","Plugins":"Plugins","Installed Plugins":"Installed plugins","Install new Plugin":"Install new plugin","Do Action":"Do action","select a action":"Select an action","add to config":"Add to config","remove from config":"Remove from config","do it":"Do it","Select a action":"Select an action","Add to config":"Add to config","Remove from config":"Remove from config","Do it!":"Do it!","Install a new Plugin":"Install a new plugin","Install a Plugin":"Install a plugin","Select an action":"Select an action","Install a Plugins":"Install plugins","Add":"Add","Loading":"Loading..","Updates":"Updates","Install Updates":"Install updates","active":"active","update available":"Update available","installed":"installed","Restart pimatic":"Restart pimatic","Add a group header":"Add a group header","Other":"Other","Enabled":"Enabled","Sensor value log":"Sensor value log","Yes":"Yes","No":"No","Sensor values":"Sensor values","Show":"Show","Graph":"Graph","Log data: ":"Log data: ","Show data of: ":"Show data of: ","Last 24 hours":"Last 24 hours","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 365 days":"Last 365 days","Id":"Id","Name":"Name","ID":"ID","Device info":"Device info","Attributes":"Attributes","Add a custom button":"Add a custom button","Added %s to the list.":"Added %s to the list.","You can now edit your list.":"You can now edit your list.","Editing the list locked.":"Editing the list is locked.","The list is now locked.":"The list is now locked.","would execute \"%s\"":"would execute \"%s\"","executed \"%s\": %s":"executed \"%s\": %s","dimmed %s to %s%%":"dimmed %s to %s%%","would dim %s to %s%%":"would dim %s to %s%%","Remember me":"Remember me","Show CA root certificate":"Show CA root certificate","Restart":"Restart","Last Update: ":"Last Update: ","Button":"Button","Add a button":"Add a button","unknown":"Unknown","connecting":"Connecting...","Variables":"Variables","Choose an action":"Choose an action","Change order":"Change order","Add a variable":"Add a variable","Showing variables for device attributes.":"Showing variables for device attributes.","Hiding variables for device attributes.":"Hiding variables for device attributes.","Value":"Value","Delete this variable":"Delete this variable","Down":"Down","Up":"Up","Expression":"Expression","Type":"Type","pusover message sent successfully":"Pushover message sent successfully","Drop here to remove rule":"Drop here to remove rule","Drop here to remove variable":"Drop here to remove variable","Description of the rule":"Description of the rule","Short Description":"Short Description","Short description":"Short description","lowered %s down":"lowered %s down","lifted %s up":"lifted %s up","mail sent with statuscode: %s":"mail sent with statuscode: %s","mail sent with status: %s":"mail sent with status: %s","raised %s":"raised %s","lowered %s":"lowered %s","stopped %s":"stopped %s","There was an error installing the updates.":"There was an error installing the updates.","Updates were successful. Please restart pimatic.":"Updates were successful. Please restart pimatic.","Log ":"Log ","Log action execution ":"Log action execution ","Log Action Execution ":"Log Action Execution ","Copy as new":"Copy as new","Delete All":"Delete all","Events":"Events","Pages":"Pages","Messages":"Messages","Settings":"Settings","Automation":"Automation","Delete this Page":"Delete this Page","Ungrouped":"Ungrouped","Device Attributes":"Device Attributes","Add a new item":"Add a new item","Time":"Time","Device":"Device","Attribute":"Attribute","Groupes":"Groupes","Drop here to remove group":"Drop here to remove group","Add a new group":"Add a new group","Groups":"Groups","Delete this group":"Delete this group","Show: ":"Show: ","Delete This Rule":"Delete this Rule","Copy as New":"Copy as new","Delete this Group":"Delete this Group","Class":"Class","Drop here to remove device":"Drop here to remove device","Add a new device":"Add a new device","Delete this Device":"Delete this Device","Showen devices":"Shown devices","Hide":"Hide","pushover message sent successfully":"pushover message sent successfully","Show data of ":"Show data of ","24 hours":"24 hours","7 days":"7 days","30 days":"30 days","365 days":"365 days"," from ":" from ","up to ":"up to ","Show ":"Show ","played \"%s\"":"played \"%s\"","toggled state of %s":"toggled state of %s","Edit Pages":"Edit Pages","Drop here to remove page":"Drop here to remove page","Add a new page":"Add a new page","Previous":"Previous","Next":"Next","I'm an empty page, add some items!":"I'm an empty page, add some items!","Rpicam":"Rpicam","Capture Image":"Capture Image","There was an error installing the updates, please check the log.":"There was an error installing the updates, please check the log.","Permission denied":"Permission denied","Logout":"Logout","Login":"Login","Username":"Username","Password":"Password","Wrong username or password":"Wrong username or password","Wrong username or password.":"Wrong username or password.","Keep logged in":"Keep logged in","Keep me logged in":"Keep me logged in","Link":"Link","Config":"Config","Unit":"Unit","Database":"Database","Problems":"Problems","No problems found.":"No problems found.","Condition":"Condition","And":"And","Or":"Or","and":"and","or":"or","all":"all","OK":"OK","Predicate":"Predicate","Select Event":"Select Event","Available Events":"Available Events","Event":"Event","switch to text input":"switch to text input","switch to text input mode":"switch to text input mode","switch to text mode":"switch to text mode","switch to gui mode":"switch to gui mode","Duration":"Duration","Attribute Info":"Attribute Info","Interval":"Interval","Expire":"Expire","Count":"Count","Attribute logging info":"Attribute logging info","Remove":"Remove","Stop":"Stop","No data to display.":"No data to display.","started %s":"started %s","Reset":"Reset","opened":"opened","closed":"closed","press button %s of device %s":"press button %s of device %s","default: ":"default: ","(default)":"(default)","default:":"default:","(not set)":"(not set)","use default":"use default","not set":"not set","Edit Config":"Edit Config","Browse Plugins":"Browse Plugins","Activate":"Activate","Deactivate":"Deactivate","Uninstall":"Uninstall","Install":"Install","activated":"activated","loaded":"loaded","Some settings have changed, a restart is required.":"Some settings have changed, a restart is required.","Restart Now":"Restart Now","No properties":"No properties","Discover Devices":"Discover Devices","Discovered devices":"Discovered devices","and if":"and if","or when":"or when","compatibility unknown":"compatibility unknown","Show Readme":"Show Readme","Add a property":"Add a property","pushbullet message sent successfully":"pushbullet message sent successfully","set temp of %s to %s°C":"set temp of %s to %s°C","set presence of %s to present":"set presence of %s to present","set presence %s to absent":"set presence %s to absent"};</script><script type="text/javascript">api = {"actions":{"getGuiSettings":{"description":"Get the GUI config options","rest":{"type":"GET","url":"/api/config/settings/gui"},"result":{"guiSettings":{"type":"object","properties":{"config":{"type":"object"},"defaults":{"type":"object"}}}}},"restart":{"description":"Restart pimatic","rest":{"type":"POST","url":"/api/restart"},"result":{"void":{}},"permission":{"action":"restart"}},"getConfig":{"description":"Get the config, fields will be blank if no password was provided","rest":{"type":"GET","url":"/api/config"},"params":{"password":{"type":"string","optional":true}},"result":{"config":{"description":"The config","type":"object"}},"permission":{"scope":"config","access":"read"}},"updateConfig":{"description":"Update the config","rest":{"type":"POST","url":"/api/config"},"params":{"config":{"type":"object"}},"permission":{"scope":"config","access":"write"}},"addRuleByString":{"description":"Add a rule by a string","rest":{"type":"POST","url":"/api/rules/:ruleId"},"params":{"ruleId":{"type":"string"},"rule":{"type":"object","properties":{"name":{"type":"string"},"ruleString":{"type":"string"},"active":{"type":"boolean","optional":true},"logging":{"type":"boolean","optional":true}}},"force":{"type":"boolean","optional":true}},"permission":{"scope":"rules","access":"write"}},"updateRuleByString":{"rest":{"type":"PATCH","url":"/api/rules/:ruleId"},"description":"Update a rule by a string","params":{"ruleId":{"type":"string"},"rule":{"type":"object","properties":{"name":{"type":"string","optional":true},"ruleString":{"type":"string","optional":true},"active":{"type":"boolean","optional":true},"logging":{"type":"boolean","optional":true}}}},"permission":{"scope":"rules","access":"write"}},"removeRule":{"rest":{"type":"DELETE","url":"/api/rules/:ruleId"},"description":"Remove the rule with the given ID","params":{"ruleId":{"type":"string"}},"permission":{"scope":"rules","access":"write"}},"getRules":{"rest":{"type":"GET","url":"/api/rules"},"description":"List all rules","params":{},"result":{"rules":{"type":"array","toJson":true}},"permission":{"scope":"rules","access":"write"}},"getRuleById":{"rest":{"type":"GET","url":"/api/rules/:ruleId"},"description":"List all rules","params":{"ruleId":{"type":"string"}},"result":{"rule":{"type":"object","toJson":true}},"permission":{"scope":"rules","access":"read"}},"getRuleActionsHints":{"rest":{"type":"POST","url":"/api/rules-parser/get-actions-hints"},"description":"Get hints for the rule actions input field","params":{"actionsInput":{"type":"string"}},"result":{"hints":{"type":"object","properties":{"actions":{"type":"array"},"tokens":{"type":"array"},"autocomplete":{"type":"array"},"errors":{"type":"array"},"warnings":{"type":"array"},"format":{"type":"array"}}}},"permission":{"scope":"rules","access":"read"}},"getRuleConditionHints":{"rest":{"type":"POST","url":"/api/rules-parser/get-condition-hints"},"description":"Get hints for the rule condition input field","params":{"conditionInput":{"type":"string"}},"result":{"hints":{"type":"object","properties":{"predicates":{"type":"array"},"tokens":{"type":"array"},"autocomplete":{"type":"array"},"errors":{"type":"array"},"warnings":{"type":"array"},"format":{"type":"array"}}}},"permission":{"scope":"rules","access":"read"}},"getPredicatePresets":{"rest":{"type":"GET","url":"/api/rules-parser/get-predicate-presets"},"description":"Get predicates the user can choose from","params":{},"result":{"presets":{"type":"array"}},"permission":{"scope":"rules","access":"read"}},"getPredicateInfo":{"rest":{"type":"GET","url":"/api/rules-parser/get-predicate-info"},"description":"Get predicates info","params":{"input":{"type":"string"},"predicateProviderClass":{"type":"string","optional":true}},"result":{"result":{"type":"array"}},"permission":{"scope":"rules","access":"read"}},"executeAction":{"rest":{"type":"POST","url":"/api/execute-action"},"description":"Execute a rule action by a given string","params":{"actionString":{"description":"The action to execute","type":"string"},"simulate":{"description":"If it is true then only simulate the action.","type":"boolean","optional":true},"logging":{"description":"Log result message","type":"string","optional":true}},"result":{"message":{"type":"string"}},"permission":{"scope":"rules","access":"write"}},"updateRuleOrder":{"rest":{"type":"POST","url":"/api/rules"},"description":"Update the order of all rules","params":{"ruleOrder":{"type":"array"}},"result":{"ruleOrder":{"type":"array"}},"permission":{"scope":"rules","access":"write"}},"getVariables":{"description":"List all variables","rest":{"type":"GET","url":"/api/variables"},"params":{},"result":{"variables":{"type":"array","toJson":true}},"permission":{"scope":"variables","access":"read"}},"updateVariable":{"description":"Update a variable value or expression","rest":{"type":"PATCH","url":"/api/variables/:name"},"params":{"name":{"type":"string"},"type":{"type":"string","enum":["expression","value"]},"valueOrExpression":{"type":"string"},"unit":{"type":"string","optional":true}},"result":{"variable":{"type":"object","toJson":true}},"permission":{"scope":"variables","access":"write"}},"addVariable":{"description":"Add a value or expression variable","rest":{"type":"POST","url":"/api/variables/:name"},"params":{"name":{"type":"string"},"type":{"type":"string","enum":["expression","value"]},"valueOrExpression":{"type":"string"},"unit":{"type":"string","optional":true}},"result":{"variable":{"type":"object","toJson":true}},"permission":{"scope":"variables","access":"write"}},"getVariableByName":{"description":"Get infos about a variable","rest":{"type":"GET","url":"/api/variables/:name"},"params":{"name":{"type":"string"}},"result":{"variable":{"type":"object","toJson":true}},"permission":{"scope":"variables","access":"read"}},"removeVariable":{"description":"Remove a variable","rest":{"type":"DELETE","url":"/api/variables/:name"},"params":{"name":{"type":"string"}},"permission":{"scope":"variables","access":"write"},"result":{"variable":{"type":"object","toJson":true}}},"updateVariableOrder":{"rest":{"type":"POST","url":"/api/variables"},"description":"Update the order of all variables","params":{"variableOrder":{"type":"array"}},"result":{"variableOrder":{"type":"array"}},"permission":{"scope":"variables","access":"write"}},"getInstalledPluginsWithInfo":{"description":"List all installed plugins","rest":{"type":"GET","url":"/api/plugins"},"params":{},"result":{"plugins":{"type":"array"}},"permission":{"scope":"plugins","access":"read"}},"searchForPluginsWithInfo":{"description":"Search for available plugins","rest":{"type":"GET","url":"/api/available-plugins"},"params":{},"result":{"plugins":{"type":"array"}},"permission":{"scope":"plugins","access":"read"}},"getOutdatedPlugins":{"description":"Get outdated plugins","rest":{"type":"GET","url":"/api/outdated-plugins"},"params":{},"result":{"outdatedPlugins":{"type":"array"}},"permission":{"scope":"updates","access":"read"}},"isPimaticOutdated":{"description":"Is pimatic outdated","rest":{"type":"GET","url":"/api/outdated-pimatic"},"params":{},"result":{"outdated":{"tye":"any"}},"permission":{"scope":"updates","access":"read"}},"installUpdatesAsync":{"description":"Install updates without awaiting result","rest":{"type":"POST","url":"/api/update-async"},"params":{"modules":{"type":"array"}},"result":{"status":{"type":"any"}},"permission":{"scope":"updates","access":"write"}},"uninstallPlugin":{"description":"Uninstalls a plugin completely","rest":{"type":"DELETE","url":"/api/plugins/:name"},"params":{"name":{"type":"string"}},"permission":{"scope":"updates","access":"write"}},"removePluginFromConfig":{"description":"Remove a plugin from config","rest":{"type":"DELETE","url":"/api/config/plugins"},"params":{"pluginName":{"type":"string"}},"result":{"removed":{"type":"boolean"}},"permission":{"scope":"plugins","access":"write"}},"setPluginActivated":{"description":"Set active state of the plugin","rest":{"type":"POST","url":"/api/config/plugins-active"},"params":{"pluginName":{"type":"string"},"active":{"type":"boolean"}},"result":{"pluginUpdated":{"type":"boolean"}},"permission":{"scope":"plugins","access":"write"}},"getUpdateProcessStatus":{"description":"Get update status","rest":{"type":"GET","url":"/api/update-process"},"result":{"info":{"type":"object"}},"permission":{"scope":"updates","access":"none"}},"getPluginConfigSchema":{"description":"Get the config schema of a plugin name (must be installed).","rest":{"type":"GET","url":"/api/plugin-config-schema/:pluginName"},"params":{"pluginName":{"type":"string"}},"result":{"configSchema":{"type":"object"}},"permission":{"scope":"plugins","access":"read"}},"getPluginConfig":{"description":"Get the config of a plugin.","rest":{"type":"GET","url":"/api/plugin-config/:pluginName"},"params":{"pluginName":{"type":"string"}},"result":{"config":{"type":"object"}},"permission":{"scope":"plugins","access":"read"}},"updatePluginConfig":{"description":"Update the config of a plugin.","rest":{"type":"POST","url":"/api/plugin-config/:pluginName"},"params":{"pluginName":{"type":"string"},"config":{"type":"object"}},"permission":{"scope":"plugins","access":"write"}},"doesRequireRestart":{"description":"Check if a restart is required.","rest":{"type":"GET","url":"/api/restart-required"},"result":{"restartRequired":{"type":"boolean"}},"permission":{"scope":"plugins","access":"read"}},"queryMessages":{"description":"List log messages","rest":{"type":"GET","url":"/api/database/messages"},"params":{"criteria":{"type":"object","optional":true,"properties":{"level":{"type":"any","optional":true},"levelOp":{"type":"string","optional":true},"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"limit":{"type":"number","optional":true}}}},"result":{"messages":{"type":"array"}},"permission":{"scope":"messages","access":"read"}},"deleteMessages":{"description":"Delete messages older than the given date","rest":{"type":"DELETE","url":"/api/database/messages"},"params":{"criteria":{"type":"object","optional":true,"properties":{"level":{"type":"any","optional":true},"levelOp":{"type":"string","optional":true},"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"limit":{"type":"number","optional":true}}}},"permission":{"scope":"messages","access":"write"}},"addDeviceAttributeLogging":{"description":"Enable or disable logging for an device attribute","params":{"deviceId":{"type":"string"},"attributeName":{"type":"string"},"time":{"type":["number","boolean","string","array","date","object"]}},"permission":{"scope":"events","access":"read"}},"queryMessagesTags":{"description":"List all tags from the matching messages","rest":{"type":"GET","url":"/api/database/messages/tags"},"params":{"criteria":{"type":"object","optional":true,"properties":{"level":{"type":"any","optional":true},"levelOp":{"type":"string","optional":true},"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"limit":{"type":"number","optional":true}}}},"result":{"tags":{"type":"array"}},"permission":{"scope":"messages","access":"read"}},"queryMessagesCount":{"description":"Count of all matches matching the criteria","rest":{"type":"GET","url":"/api/database/messages/count"},"params":{"criteria":{"type":"object","optional":true,"properties":{"level":{"type":"any","optional":true},"levelOp":{"type":"string","optional":true},"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"limit":{"type":"number","optional":true}}}},"result":{"count":{"type":"number"}},"permission":{"scope":"messages","access":"read"}},"queryDeviceAttributeEvents":{"rest":{"type":"GET","url":"/api/database/device-attributes/"},"description":"Get logged values of device attributes","params":{"criteria":{"type":"object","optional":true,"properties":{"deviceId":{"type":["string","array"],"optional":true},"attributeName":{"type":["string","array"],"optional":true},"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"order":{"type":"string","optional":true},"orderDirection":{"type":"string","optional":true},"offset":{"type":"number","optional":true},"limit":{"type":"number","optional":true}}}},"result":{"events":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"queryDeviceAttributeEventsCount":{"rest":{"type":"GET","url":"/api/database/device-attributes/count"},"description":"Get count of saved device attributes events","params":{},"result":{"count":{"type":"number"}},"permission":{"scope":"events","access":"read"}},"queryDeviceAttributeEventsCounts":{"rest":{"type":"GET","url":"/api/database/device-attributes/counts"},"description":"Get count of saved device attributes per attribute","params":{},"result":{"counts":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"queryDeviceAttributeEventsDevices":{"rest":{"type":"GET","url":"/api/database/device-attributes/devices"},"description":"Get all device attribute infos in database","params":{},"result":{"devices":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"queryDeviceAttributeEventsInfo":{"rest":{"type":"GET","url":"/api/database/device-attributes-info"},"description":"Get all device attribute infos in database","params":{},"result":{"deviceAttributes":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"querySingleDeviceAttributeEvents":{"rest":{"type":"GET","url":"/api/database/device-attributes/:deviceId/:attributeName"},"description":"Get logged values of device attributes","params":{"deviceId":{"type":"string"},"attributeName":{"type":"string"},"criteria":{"type":"object","optional":true,"properties":{"after":{"type":"date","optional":true},"before":{"type":"date","optional":true},"groupByTime":{"type":"number","optional":true},"order":{"type":"string","optional":true},"orderDirection":{"type":"string","optional":true},"offset":{"type":"number","optional":true},"limit":{"type":"number","optional":true}}}},"result":{"events":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"getDeviceAttributeLogging":{"description":"Get device attribute logging times table","params":{},"result":{"attributeLogging":{"type":"array"}},"permission":{"scope":"events","access":"read"}},"setDeviceAttributeLogging":{"description":"Set device attribute logging times table","params":{"attributeLogging":{"type":"array"}},"permission":{"scope":"events","access":"write"}},"getDeviceAttributeLoggingTime":{"description":"Get device attribute logging times table","params":{"deviceId":{"type":"string"},"attributeName":{"type":"string"}},"result":{"timeInfo":{"type":"object"}},"permission":{"scope":"events","access":"read"}},"runVacuum":{"description":"Run the sqlite3 vacuum pragma","params":{},"rest":{"type":"GET","url":"/api/database/vacuum"},"permission":{"scope":"database","access":"write"}},"checkDatabase":{"description":"Check database and config integrity","params":{},"rest":{"type":"GET","url":"/api/database/check"},"result":{"problems":{"type":"array"}},"permission":{"scope":"database","access":"write"}},"deleteDeviceAttribute":{"description":"Delete a device attribute from the database","rest":{"type":"DELETE","url":"/api/database/device-attribute/by-id"},"params":{"id":{"type":"number"}},"permission":{"scope":"database","access":"write"}},"updateDeviceAttribute":{"description":"Updates a device attribute info in database","rest":{"type":"PATCH","url":"/api/database/device-attribute/by-id"},"params":{"id":{"type":"number"}},"permission":{"scope":"database","access":"write"}},"getGroups":{"description":"List all groups.","rest":{"type":"GET","url":"/api/groups"},"params":{},"result":{"groups":{"type":"array","items":{"group":{"type":"object"}}}},"permission":{"scope":"groups","access":"read"}},"removeGroup":{"description":"Remove group","rest":{"type":"DELETE","url":"/api/groups/:groupId"},"params":{"groupId":{"type":"string"}},"result":{"removed":{"type":"object"}},"permission":{"scope":"groups","access":"write"}},"addGroup":{"rest":{"type":"POST","url":"/api/groups/:groupId"},"description":"Add a group","params":{"groupId":{"type":"string"},"group":{"type":"object"}},"result":{"group":{"type":"object"}},"permission":{"scope":"groups","access":"write"}},"updateGroup":{"rest":{"type":"PATCH","url":"/api/groups/:groupId"},"description":"Update a group","params":{"groupId":{"type":"string"},"group":{"type":"object","properties":{"name":{"optional":true},"devicesOrder":{"type":"array","optional":true},"variablesOrder":{"type":"array","optional":true},"rulesOrder":{"type":"array","optional":true}}}},"result":{"group":{"type":"object"}},"permission":{"scope":"groups","access":"write"}},"addDeviceToGroup":{"rest":{"type":"POST","url":"/api/groups/:groupId/devices/:deviceId"},"description":"Add a device to a group","params":{"groupId":{"type":"string"},"deviceId":{"type":"string"}},"result":{"deviceItem":{"type":"object"}},"permission":{"scope":"groups","access":"write"}},"removeDeviceFromGroup":{"rest":{"type":"DELETE","url":"/api/groups/:groupId/devices/:deviceId"},"description":"Remove a device from a group","params":{"groupId":{"type":"string"},"deviceId":{"type":"string"}},"result":{"group":{"type":"object"}},"permission":{"scope":"groups","access":"write"}},"addRuleToGroup":{"rest":{"type":"POST","url":"/api/groups/:groupId/rules/:ruleId"},"description":"Add a rule to a group","params":{"groupId":{"type":"string"},"ruleId":{"type":"string"},"position":{"type":"number","optional":true}},"result":{"group":{"type":"object"}},"permission":{"scope":"rules","access":"write"}},"removeRuleFromGroup":{"rest":{"type":"DELETE","url":"/api/groups/:groupId/rules/:ruleId"},"description":"Remove a rule from a group","params":{"groupId":{"type":"string"},"ruleId":{"type":"string"}},"result":{"group":{"type":"object"}},"permission":{"scope":"rules","access":"write"}},"updateRuleGroupOrder":{"rest":{"type":"POST","url":"/api/groups/:groupId/rules"},"description":"Add a rule to a group","params":{"groupId":{"type":"string"},"ruleOrder":{"type":"array"}},"result":{"group":{"type":"object"}},"permission":{"scope":"rules","access":"write"}},"addVariableToGroup":{"rest":{"type":"POST","url":"/api/groups/:groupId/variables/:variableName"},"description":"Add a variable to a group","params":{"groupId":{"type":"string"},"variableName":{"type":"string"},"position":{"type":"number","optional":true}},"result":{"group":{"type":"object"}},"permission":{"scope":"variables","access":"write"}},"updateDeviceGroupOrder":{"rest":{"type":"POST","url":"/api/groups/:groupId/devices"},"description":"Update device order in group","params":{"groupId":{"type":"string"},"deviceOrder":{"type":"array"}},"result":{"group":{"type":"object"}},"permission":{"scope":"devices","access":"write"}},"removeVariableFromGroup":{"rest":{"type":"DELETE","url":"/api/groups/:groupId/variables/:variableName"},"description":"Remove a variable from a group","params":{"groupId":{"type":"string"},"variableName":{"type":"string"}},"result":{"group":{"type":"object"}},"permission":{"scope":"variables","access":"write"}},"updateVariableGroupOrder":{"rest":{"type":"POST","url":"/api/groups/:groupId/variables"},"description":"Update variable order in group","params":{"groupId":{"type":"string"},"variableOrder":{"type":"array"}},"result":{"group":{"type":"object"}},"permission":{"scope":"variables","access":"write"}},"updateGroupOrder":{"rest":{"type":"POST","url":"/api/groups"},"description":"Update the order of all groups","params":{"groupOrder":{"type":"array"}},"result":{"groupOrder":{"type":"array"}},"permission":{"scope":"groups","access":"write"}},"getPages":{"description":"List all pages.","rest":{"type":"GET","url":"/api/pages"},"params":{},"result":{"pages":{"type":"array","items":{"page":{"type":"object","properties":{"id":{"description":"A user chosen string, used to identify the page.","type":"string"},"name":{"description":"A user chosen string that should be used to display the page.","type":"string"},"devices":{"description":"List of all device ids that should be displayed on that page","type":"array","items":{"deviceItem":{"type":"object","properties":{"deviceId":{"description":"The id of the device to display at that position","type":"string"}}}}}}}}}},"permission":{"scope":"pages","access":"read"}},"getPageById":{"description":"Get a page by ID","rest":{"type":"GET","url":"/api/pages/:pageId"},"params":{"pageId":{"description":"The ID of the page that should be returned.","type":"string"}},"result":{"page":{"description":"The requested page or null if the page was not found.","type":"object","properties":{"id":{"description":"A user chosen string, used to identify the page.","type":"string"},"name":{"description":"A user chosen string that should be used to display the page.","type":"string"},"devices":{"description":"List of all device ids that should be displayed on that page","type":"array","items":{"deviceItem":{"type":"object","properties":{"deviceId":{"description":"The id of the device to display at that position","type":"string"}}}}}}}},"permission":{"scope":"pages","access":"read"}},"removePage":{"description":"Remove a page.","rest":{"type":"DELETE","url":"/api/pages/:pageId"},"params":{"pageId":{"description":"The ID of the page that should be removed.","type":"string"}},"result":{"removed":{"description":"The removed page.","type":"object","properties":{"id":{"description":"A user chosen string, used to identify the page.","type":"string"},"name":{"description":"A user chosen string that should be used to display the page.","type":"string"},"devices":{"description":"List of all device ids that should be displayed on that page","type":"array","items":{"deviceItem":{"type":"object","properties":{"deviceId":{"description":"The id of the device to display at that position","type":"string"}}}}}}}},"permission":{"scope":"pages","access":"write"}},"addPage":{"rest":{"type":"POST","url":"/api/pages/:pageId"},"description":"Add a page.","params":{"pageId":{"description":"The ID of the page that should be added.","type":"string"},"page":{"description":"Object with ID and name of the page to create.","type":"object","properties":{"name":{"description":"A user chosen string that should be used to display the page.","type":"string"}}}},"result":{"page":{"description":"The created page.","type":"object","properties":{"id":{"description":"A user chosen string, used to identify the page.","type":"string"},"name":{"description":"A user chosen string that should be used to display the page.","type":"string"},"devices":{"description":"List of all device ids that should be displayed on that page","type":"array","items":{"deviceItem":{"type":"object","properties":{"deviceId":{"description":"The id of the device to display at that position","type":"string"}}}}}}}},"permission":{"scope":"pages","access":"write"}},"updatePage":{"description":"Update a page name or device order.","rest":{"type":"PATCH","url":"/api/pages/:pageId"},"params":{"pageId":{"description":"The ID of the page to change.","type":"string"},"page":{"description":"An object with properties that should be updated.","type":"object","properties":{"name":{"description":"The new name to set.","type":"string","optional":true},"devicesOrder":{"description":"Array of ordered deviceIDs.","type":"array","optional":true,"items":{"deviceId":{"type":"string"}}}}}},"result":{"page":{"description":"The updated page.","type":"object","properties":{"id":{"description":"A user chosen string, used to identify the page.","type":"string"},"name":{"description":"A user chosen string that should be used to display the page.","type":"string"},"devices":{"description":"List of all device ids that should be displayed on that page","type":"array","items":{"deviceItem":{"type":"object","properties":{"deviceId":{"description":"The id of the device to display at that position","type":"string"}}}}}}}},"permission":{"scope":"pages","access":"write"}},"addDeviceToPage":{"rest":{"type":"POST","url":"/api/pages/:pageId/devices/:deviceId"},"description":"Add a page","params":{"pageId":{"type":"string"},"deviceId":{"type":"string"}},"result":{"page":{"type":"object"}},"permission":{"scope":"pages","access":"write"}},"removeDeviceFromPage":{"rest":{"type":"DELETE","url":"/api/pages/:pageId/devices/:deviceId"},"description":"Remove a device from a group.","params":{"pageId":{"type":"string"},"deviceId":{"type":"string"}},"result":{"page":{"type":"object"}},"permission":{"scope":"pages","access":"write"}},"updatePageOrder":{"rest":{"type":"POST","url":"/api/pages"},"description":"Update the order of all pages","params":{"pageOrder":{"type":"array"}},"result":{"pageOrder":{"type":"array"}},"permission":{"scope":"pages","access":"write"}},"getDevices":{"description":"List all devices.","rest":{"type":"GET","url":"/api/devices"},"params":{},"result":{"devices":{"description":"Array of all devices.","type":"array","toJson":true,"items":{"device":{"type":"object","toJson":true,"properties":{"id":{"description":"A user chosen string, used to identify that device.","type":"string"},"name":{"description":"A user chosen string that should be used to display the device.","type":"string"},"template":{"description":"Name of the template, that should be used to display the device.","type":"string"},"attributes":{"description":"List of all attributes of the device.","type":"array"},"actions":{"description":"List of all actions of the device.","type":"array"},"config":{"description":"Config of the device, without default values.","type":"object"},"configDefaults":{"description":"Default values for the config options.","type":"object"}}}}}},"permission":{"scope":"devices","access":"read"}},"getDeviceById":{"description":"Retrieve a device by a given ID.","rest":{"type":"GET","url":"/api/devices/:deviceId"},"params":{"deviceId":{"description":"The ID of the device that should be returned.","type":"string"}},"result":{"device":{"description":"The requested device or null if the device was not found.","type":"object","toJson":true,"properties":{"id":{"description":"A user chosen string, used to identify that device.","type":"string"},"name":{"description":"A user chosen string that should be used to display the device.","type":"string"},"template":{"description":"Name of the template, that should be used to display the device.","type":"string"},"attributes":{"description":"List of all attributes of the device.","type":"array"},"actions":{"description":"List of all actions of the device.","type":"array"},"config":{"description":"Config of the device, without default values.","type":"object"},"configDefaults":{"description":"Default values for the config options.","type":"object"}}}},"permission":{"scope":"devices","access":"read"}},"updateDeviceOrder":{"rest":{"type":"POST","url":"/api/devices"},"description":"Update the order of all devices","params":{"deviceOrder":{"type":"array"}},"result":{"deviceOrder":{"type":"array"}},"permission":{"scope":"devices","access":"write"}},"getDeviceClasses":{"description":"List all registered device classes.","rest":{"type":"GET","url":"/api/device-class"},"result":{"deviceClasses":{"type":"array"}},"permission":{"scope":"devices","access":"read"}},"getDeviceConfigSchema":{"description":"Get the config schema of a device class.","rest":{"type":"GET","url":"/api/device-class/:className"},"params":{"className":{"type":"string"}},"result":{"configSchema":{"type":"object"}},"permission":{"scope":"devices","access":"read"}},"addDeviceByConfig":{"description":"Add a device by config values","rest":{"type":"POST","url":"/api/device-config"},"params":{"deviceConfig":{"type":"object"}},"result":{"device":{"type":"object","toJson":true,"properties":{"id":{"description":"A user chosen string, used to identify that device.","type":"string"},"name":{"description":"A user chosen string that should be used to display the device.","type":"string"},"template":{"description":"Name of the template, that should be used to display the device.","type":"string"},"attributes":{"description":"List of all attributes of the device.","type":"array"},"actions":{"description":"List of all actions of the device.","type":"array"},"config":{"description":"Config of the device, without default values.","type":"object"},"configDefaults":{"description":"Default values for the config options.","type":"object"}}}},"permission":{"scope":"devices","access":"write"}},"updateDeviceByConfig":{"description":"Update a device by config values","rest":{"type":"PATCH","url":"/api/device-config"},"params":{"deviceConfig":{"type":"object"}},"result":{"device":{"type":"object","toJson":true,"properties":{"id":{"description":"A user chosen string, used to identify that device.","type":"string"},"name":{"description":"A user chosen string that should be used to display the device.","type":"string"},"template":{"description":"Name of the template, that should be used to display the device.","type":"string"},"attributes":{"description":"List of all attributes of the device.","type":"array"},"actions":{"description":"List of all actions of the device.","type":"array"},"config":{"description":"Config of the device, without default values.","type":"object"},"configDefaults":{"description":"Default values for the config options.","type":"object"}}}},"permission":{"scope":"devices","access":"write"}},"removeDevice":{"description":"Remove a device from the framework an config","rest":{"type":"DELETE","url":"/api/device-config/:deviceId"},"params":{"deviceId":{"type":"string"}},"result":{"device":{"type":"object","toJson":true,"properties":{"id":{"description":"A user chosen string, used to identify that device.","type":"string"},"name":{"description":"A user chosen string that should be used to display the device.","type":"string"},"template":{"description":"Name of the template, that should be used to display the device.","type":"string"},"attributes":{"description":"List of all attributes of the device.","type":"array"},"actions":{"description":"List of all actions of the device.","type":"array"},"config":{"description":"Config of the device, without default values.","type":"object"},"configDefaults":{"description":"Default values for the config options.","type":"object"}}}},"permission":{"scope":"devices","access":"write"}},"discoverDevices":{"description":"Start to scan for new devices","rest":{"type":"POST","url":"/api/discover-devices"},"params":{"time":{"type":"number","optional":true}},"permission":{"scope":"devices","access":"write"}},"callDeviceAction":{"description":"Calls the action of the given device","rest":{"type":"GET","url":"/api/device/:deviceId/:actionName","handler":"callDeviceActionReq"},"socket":{"handler":"callDeviceActionSocket"},"params":{"deviceId":{"type":"string"},"actionName":{"type":"string"}},"permission":{"action":"controlDevices"}}}};</script><script type="text/javascript">scripts = {"lazyload":["/assets/lazyload-13d21784a81e74f4e9f5fe1a73aef994.js"],"base":["/assets/base-199deb70de2f47d7cf8f1afa9d18410f.js"],"textcomplete":["/assets/textcomplete-a6bb2a37102628640e6570f44ca17772.js"],"jsonschemaeditor":["/assets/jsonschemaeditor-fd8bf7288ffd401e02351841a17dfce6.js"],"dygraph":["/assets/dygraph-f313764c515976997e227fb1438dd8d9.js"],"datepicker":["/assets/datepicker-2685d8cb15f400de44e99cbccfb3daab.js"],"mobiscroll":["/assets/mobiscroll-cc45573dcd9ed2f4ac8da5815ab69cbb.js"],"index":["/assets/index-1859afbb0b8b04f69e9ee910f06f7beb.js"],"add-item-page":["/assets/add-item-page-af8c5f9570c531a374de722e0a69021b.js"],"editor":["/assets/editor-580b90629b64bf8cd35eb01d8ec1aa1d.js"],"edit-rule-page":["/assets/edit-rule-page-e112a39ccecfdf5863928675b0a99fde.js"],"edit-variable-page":["/assets/edit-variable-page-22dc47a17aea5d3bbf4d52504231080f.js"],"edit-group-page":["/assets/edit-group-page-8997e8515ce379b19356a796f0f7d359.js"],"edit-device-page":["/assets/edit-device-page-86584bcd60e0bebc71fb5b8002852bc2.js"],"edit-devicepage-page":["/assets/edit-devicepage-page-3db065b71b37db04602bf72b8dc2b543.js"],"edit-plugin-page":["/assets/edit-plugin-page-f22f7f56ee0d9a7dff215db1d2460d77.js"],"database-page":["/assets/database-page-e67f72b7bb375769499627950d9ee0db.js"],"updates-page":["/assets/updates-page-242ee19ea482742fd3867cae56364a2a.js"],"config-page":["/assets/config-page-822b617734b2ca2da03bdb418def6157.js"],"rules-page":["/assets/rules-page-b38ee3107739a8f5f6768989006b2da5.js"],"groups-page":["/assets/groups-page-f203b8ef791c9891baafa5cee4fb76b0.js"],"devicepages-page":["/assets/devicepages-page-8537a11f67db72d8aaf6b3be30363db3.js"],"devices-page":["/assets/devices-page-57f4b2743d0efecd7e6e0292ec5df7f7.js"],"variables-page":["/assets/variables-page-6f8de87a6bffa2ca9780df15b2a7914f.js"],"log-page":["/assets/log-page-9c493c4f6f478a1ad0fbff4389c84059.js"],"events-page":["/assets/events-page-224e3e47c503bdcc020812bc4e684333.js"],"plugins-page":["/assets/plugins-page-3d561c7a988c94293068d70a86eea90a.js"],"graph-page":["/assets/graph-page-22c7dded70c70f137d26173887311ac7.js"]};</script><script type="text/javascript">styles = {"base":["/assets/base-96c2e43ac38f883a0d3d42d24f11bced.css"],"style":["/assets/style-e4f32d321774f09300f34f0709da5321.css"],"editor":["/assets/editor-5825958ee036f091c4ca8f8eae38bcf8.css"]};</script><link id="theme-link" rel="stylesheet" data-default-theme="graphite/slate" media="all"><script src='/assets/index-1859afbb0b8b04f69e9ee910f06f7beb.js' type='text/javascript'></script><link id="test" rel="stylesheet" data-default-theme="graphite/slate" media="all"></head><body class="flat"><script id="switch-template" type="text/template"><li class="sortable switch-device no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select> <span data-bind="text: ($data.error() ? $data.error() : '') " class="error"></span> <span data-bind="template: { name: 'switch-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></li></script><script id="shutter-template" type="text/template"><li class="sortable shutter-device no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div data-role="controlgroup" data-type="horizontal" data-mini="true" data-enhanced="true" class="shutter-buttons ui-mini ui-controlgroup ui-controlgroup-horizontal ui-corner-all"><div class="ui-controlgroup-controls"><a href="#" class="shutter-down ui-first-child ui-btn ui-corner-all ui-icon-arrow-d ui-btn-icon-left">Down</a><a href="#" class="shutter-up ui-last-child ui-btn ui-corner-all ui-icon-arrow-u ui-btn-icon-left">Up</a></div></div></li></script><script id="dimmer-template" type="text/template"><li class="sortable dimmer-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <input min="0" max="100" step="1" data-highlight="true" data-bind="attr: { id: sliderId }, value: sliderValue" class="dimmer"> <span data-bind="template: { name: 'dimmer-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"> </span></div></li></script><script id="device-template" type="text/template">    <li class="sortable device no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <span data-bind="text: ($data.error() ? $data.error() : '') " class="error"></span> <span data-bind="template: { name: 'attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></li></script><script id="buttons-template" type="text/template"><li class="sortable button no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><div data-bind="foreach: $data.device.configWithDefaults().buttons" class="buttons"><a data-bind="jqmbutton: {text: $data.text}, click: $parent.onButtonPress" class="ui-btn ui-mini ui-btn-inline ui-corner-all"></a></div></li></script><script id="input-template" type="text/template"><li class="sortable input no-header no-carousel-slide"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><div class="inputs"><!-- ko if: $data.getConfig('type') === 'string'  --><input data-bind="textInput: inputValue" class="ui-input-text ui-corner-all"><!-- /ko -->
  3. <!-- ko if: $data.getConfig('type') === 'number' --><div class="spinbox no-carousel-slide"><input type="text" data-role="spinbox" name="spin" data-mini="true" data-bind="textInput: inputValue"></div><!-- /ko --></div></li></script><script id="inputTime-template" type="text/template"><li class="sortable input no-header no-carousel-slide"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><div class="inputs"><div class="timebox no-carousel-slide"><input type="time" name="time" data-role="timebox" data-mini="true" data-bind="textInput: inputValue"></div></div></li></script><script id="musicplayer-template" type="text/template"><li class="sortable musicplayer no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><div class="controls"><span data-bind="text: $data.currentTitle" class="songTitle"></span> <span class="controls-inner"><a data-bind="click: function(){$data.sendPlayerAction('previous');}" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon ui-icon-step-backward">Previous</a><a data-bind="jqmbutton: {icon: $data.playButtonIcon}, click: $data.togglePlay" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon"></a><a data-bind="click: function(){$data.sendPlayerAction('stop');}" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon-stop">Stop</a><a data-bind="click: function(){$data.sendPlayerAction('next');}" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon ui-icon-step-forward">Next</a></span></div></li></script><script id="thermostat-template" type="text/template"><li data-bind="css: {unsynced: !$data.synced()}" class="sortable device no-header thermostat"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><!-- ko if: $data.getConfig('guiShowValvePosition')  --><div class="valve-position"><div class="valve-position-bar">&nbsp</div></div><!-- /ko --><div class="controls no-carousel-slide"><!-- ko if: $data.getConfig('guiShowModeControl')  --><div data-role="controlgroup" data-type="horizontal" data-mini="true" data-enhanced="true" class="button-control ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-mini no-carousel-slide"><div class="ui-controlgroup-controls"><a name="autoButton" data-bind="click: modeAuto" class="ui-first-child ui-btn ui-corner-all">auto</a><a name="manuButton" data-bind="click: modeManu" class="ui-btn ui-corner-all">manu    </a><a name="boostButton" data-bind="click: modeBoost" class="ui-last-child ui-btn ui-corner-all">boost</a></div></div><!-- /ko -->
  4. <!-- ko if: $data.getConfig('guiShowPresetControl')  --><div data-role="controlgroup" data-type="horizontal" data-mini="true" data-enhanced="true" class="button-control ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-mini no-carousel-slide"><div class="ui-controlgroup-controls"><a name="ecoButton" data-bind="click: modeEco" class="ui-first-child ui-btn ui-corner-all">eco      </a><a name="comfyButton" data-bind="click: modeComfy" class="ui-last-child ui-btn ui-corner-all">comfy</a></div></div><!-- /ko -->
  5. <!-- ko if: $data.getConfig('guiShowTemperatureInput') --><div class="spinbox no-carousel-slide"><input type="text" data-role="spinbox" name="spin" value="0" min="0" max="100" data-mini="true" step="0.5" data-bind="textInput: inputValue"></div><!-- /ko --></div></li></script><script id="timer-template" type="text/template"><li class="sortable timer no-header"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label><div class="controls"><span data-bind="template: { name: 'attribute-template', data: $data.device.getAttribute('time'), afterRender: $data.afterAttributeRender }" class="attribute"></span> <span class="controls-inner"><a data-bind="jqmbutton: {icon: $data.startButtonIcon}, click: $data.toggleRunning" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon"></a><a data-bind="click: function(){$data.sendTimerAction('resetTimer');}" class="ui-btn ui-mini ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon ui-icon-refresh">Reset</a></span></div></li></script><script id="attribute-template" type="text/template"><!-- ko if: !$data.hidden --><span data-bind="tooltip: $data.tooltipHtml, css: {outOfDate: $data.outOfDate()}" class="attribute"><!-- ko if: $data.shouldDisplayAcronym() --><span data-bind="text: $data.displayAcronym()" class="acronym"></span><!-- /ko -->
  6. <!-- ko if: $data.shouldDisplayIcon() --><span data-bind="css: $data.getIconClass()" class="attribute-icon"></span><!-- /ko -->
  7. <!-- ko if: $data.shouldDisplayValue() --><span data-bind="text: $data.displayValueText()" class="val"></span><span data-bind="text: $data.displayUnitText()" class="unit"></span><!-- /ko -->
  8. <!-- ko if: $data.shouldDisplaySparkline() --><span data-bind="sparkline: {data: $data.sparklineHistory, tooltipFormatter: $data.tooltipFormatter}" class="sparkline"></span><!-- /ko --></span><!-- /ko --></script><script id="switch-attribute-template" type="text/template"><!-- ko if: $data.name !== 'state' -->
  9. <!-- ko template: {name: 'attribute-template', data: $data} --><!-- /ko -->
  10. <!-- /ko --></script><script id="dimmer-attribute-template" type="text/template"><!-- ko if: $data.name !== 'state' && $data.name !== 'dimlevel' -->
  11. <!-- ko template: {name: 'attribute-template', data: $data} --><!-- /ko -->
  12. <!-- /ko --></script><script id="sortable-handle-template" type="text/template"><div class="handle no-carousel-slide"><div class="ui-btn-icon-notext ui-icon ui-icon-bars ui-alt-icon ui-nodisc-icon"></div></div></script><script id="edit-devicepage-link-template" type="text/template"><li><a data-ajax="false" href="#devicepages-page" id="edit-devicepages-link"><div class="edit-handle no-carousel-slide"><div class="ui-btn-icon-notext ui-icon ui-icon-gear ui-alt-icon ui-nodisc-icon"></div></div><span class="edit-pages-handle-label">Edit Pages</span></a></li></script><script id="page-menuentry-template" type="text/template"><li data-theme="f"><a href="#index" data-rel="close" data-transition="slidefade" data-bind="text: name, click: $root.showDevicePage"></a></li></script><script id="devicepages-template" type="text/template"><!-- ko template: { name: 'devicepage-template', foreach: devicepages} --><!-- /ko --></script><script id="devicepage-template" type="text/template"><div data-bind="id: 'device-page-'+$data.id()"><ul data-role="listview" data-bind="sortable: {isSorting: $root.isSortingItems, sorted: $root.onItemsSorted, drop: $root.onDropItemOnTrash, droppable: '.droppable-' + $data.id, scroller: '.owl-item'}" class="items"><!-- ko if: ! $root.enabledEditing() && $data.devices().length === 0  --><li class="empty-list">I'm an empty page, add some items!</li><!-- /ko -->
  13. <!-- ko template: { name: 'device-group-template', foreach: $root.groups} --><!-- /ko -->
  14. <!-- ko if: $root.enabledEditing() || $data.getUngroupedDevices().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.createToggleGroupCallback($data, {id: '$ungrouped'}), css: ($root.isGroupCollapsed($data, {id: '$ungrouped'}) ? 'closed' : 'open')" class="sortable header collapsible"><label>Ungrouped</label></li><!-- ko if: !$root.isGroupCollapsed($data, {id: '$ungrouped'}) -->
  15. <!-- ko template: { name: $root.getItemTemplate, foreach: $data.getUngroupedDevices(), afterRender: $data.afterRenderDevice } --><!-- /ko -->
  16. <!-- /ko -->
  17. <!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: $root.isSortingItems, attr: {id: 'delete-item-' + $data.id}, css: 'droppable-' + $data.id" class="delete-link">Drop here to remove item</li><li data-bind="visible: $root.enabledEditing() &amp;&amp; !$root.isSortingItems(), attr: {id: 'add-item-link-' + $data.id}"><a data-transition="slidefade" href="#add-item-page" data-bind="click: $root.onAddItemClicked">Add a new item...</a></li></ul></div></script><script id="device-group-template" type="text/template"><!-- ko if: $root.enabledEditing() || $parent.getDevicesInGroup($data.id).length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.createToggleGroupCallback($parent, $data), css: ($root.isGroupCollapsed($parent, $data) ? 'closed' : 'open')" class="sortable header collapsible"><label data-bind="text: $data.name"></label></li><!-- ko if: !$root.isGroupCollapsed($parent, $data) -->
  18. <!-- ko template: { name: $root.getItemTemplate, foreach: $parent.getDevicesInGroup($data.id), afterRender: $parent.afterRenderDevice } --><!-- /ko -->
  19. <!-- /ko -->
  20. <!-- /ko --></script><div id="index" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingItems()}"><div data-theme="a" data-role="header"><a id="nav-button" href="#nav-panel" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-bars ui-btn-icon-notext">Menu</a><h3>partmatic</h3><div data-role="controlgroup" data-type="horizontal" class="ui-mini ui-btn-right"><!-- ko if: $root.hasPermission('messages', 'read') --><a id="error-count" href="#log-page" data-transition="slidedown" data-bind="jqmbutton: {text: errorCount}, visible: errorCount() &gt; 0, click: onLogMessageClicked" class="ui-btn ui-btn-inline ui-mini ui-btn-icon-left ui-icon-alert"></a><!-- /ko -->
  21. <!-- ko if: $root.hasPermission('pages', 'write') || pimatic.isDemo() --><a data-bind="jqmbutton: lockButton(), click: toggleEditing" href="" class="ui-btn ui-btn-inline ui-btn-icon-left ui-icon-bars ui-btn-icon-notext"></a><!-- /ko --></div></div><div data-role="main" tabindex="1" class="ui-content overthrow"><div id="item-tabs" data-insert="false"></div><div id="item-lists" class="owl-carousel"></div><!-- ko if: !$root.hasPermission('pages', 'read') --><div class="denied">Permission denied</div><!-- /ko --></div><div class="content-overlay ui-content"></div><div id="nav-panel" data-role="panel" data-position="left" data-position-fixed="false" data-display="reveal" data-theme="f" tabindex="0" class="overthrow"><ul data-role="listview" data-theme="f" data-divider-theme="f" style="margin-top: -16px;" class="nav-panel-menu"><li data-icon="delete" data-theme="f"><a href="#" data-rel="close">Close menu</a></li><!-- ko if: $root.hasPermission('pages', 'read') --><li data-theme="f" data-role="list-divider">Pages</li><!-- ko template: { name: 'page-menuentry-template', foreach:devicepages} --><!-- /ko -->
  22. <!-- /ko -->
  23. <!-- ko if: $root.hasPermission('rules', 'read') || $root.hasPermission('variables', 'read') --><li data-theme="f" data-role="list-divider">Automation</li><!-- ko if: $root.hasPermission('rules', 'read') --><li data-theme="f"><a href="#rules-page" data-transition="slidefade">Rules</a></li><!-- /ko -->
  24. <!-- ko if: $root.hasPermission('variables', 'read') --><li data-theme="f"><a href="#variables-page" data-transition="slidefade">Variables</a></li><!-- /ko -->  
  25. <!-- /ko -->
  26. <!-- ko if: $root.hasPermission('messages', 'read') || $root.hasPermission('events', 'read') --><li data-theme="f" data-role="list-divider">Log</li><!-- ko if: $root.hasPermission('messages', 'read') --><li data-theme="f"><a href="#log-page" data-transition="slidefade">Messages</a></li><!-- /ko -->
  27. <!-- ko if: $root.hasPermission('events', 'read') --><li data-theme="f"><a href="#events-page" data-transition="slidefade">Events</a></li><!-- /ko -->
  28. <!-- /ko --> <li data-theme="f" data-role="list-divider">Settings</li><!-- ko if: $root.hasPermission('devices', 'read') --><li data-theme="f"> <a href="#devices-page" data-transition="slidefade">Devices</a></li><!-- /ko -->
  29. <!-- ko if: $root.hasPermission('groups', 'read') --><li data-theme="f"> <a href="#groups-page" data-transition="slidefade">Groups</a></li><!-- /ko -->
  30. <!-- ko if: $root.hasPermission('plugins', 'read') --><li data-theme="f"><a href="#plugins-page" data-transition="slidefade">Plugins</a></li><!-- /ko -->
  31. <!-- ko if: $root.hasPermission('config', 'read') --><li data-theme="f"><a href="#config-page" data-transition="slidefade">Config</a></li><!-- /ko -->
  32. <!-- ko if: $root.hasPermission('database', 'read') --><li data-theme="f"><a href="#database-page" data-transition="slidefade">Database</a></li><!-- /ko -->
  33. <!-- ko if: $root.hasPermission('updates', 'read') --><li data-theme="f"><a href="#updates-page" data-transition="slidefade">Updates</a></li><!-- /ko --> <li id="import-ca-cert" data-theme="f"><a href="root-ca-cert.crt" data-ajax="false" data-bind="visible: hasRootCACert">Show CA root certificate</a></li><li data-theme="f"><a href="/logout" data-bind="text: $root.logoutText, click: onLogoutClicked">Logout</a></li></ul></div></div><script id="rule-template" type="text/template"><li data-bind="css: {deactivated: !active()}" class="rule sortable draggable"><a data-transition="slidefade" href="#edit-rule-page" style="white-space: normal" data-bind="click: $root.onEditRuleClicked"><span data-bind="text: ($data.name() != '' ? $data.name() : __('Unnamed rule') ) " class="name"></span><p><span class="if">When</span> <span data-bind="text: conditionToken" class="condition"></span> <span class="then">then</span> <span data-bind="text: actionsToken" class="actions"></span></p></a></li></script><script id="rule-groups-template" type="text/template"><!-- ko if: $root.enabledEditing() || $data.getRules().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label data-bind="text: name"></label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  34. <!-- ko template: { name: 'rule-template', foreach: $data.getRules, afterRender: $root.afterRenderRule } --><!-- /ko -->
  35. <!-- /ko -->
  36. <!-- /ko --></script><div id="rules-page" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingRules() }"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Rules</h3><!-- ko if: $root.hasPermission('rules', 'write') || pimatic.isDemo() --><a data-bind="jqmbutton: lockButton(), click: toggleEditing" href="" class="ui-btn-right ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-bars ui-btn-icon-notext"></a><!-- /ko --></div><div class="ui-content overthrow"><div><ul id="rules" data-role="listview" data-bind="sortable: {isSorting: isSortingRules, sorted: onRulesSorted, drop: onDropRuleOnTrash}, dragslide: {}, css: ruleCss"><!-- ko template: { name: 'rule-groups-template', foreach: groups} --><!-- /ko -->
  37. <!-- ko if: $root.enabledEditing() || $root.getUngroupedRules().length > 0  -->
  38. <!-- ko with: $root --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label>Ungrouped</label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  39. <!-- ko template: { name: 'rule-template', foreach: $root.getUngroupedRules, afterRender: $root.afterRenderRule } --><!-- /ko -->
  40. <!-- /ko -->
  41. <!-- /ko -->
  42. <!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: $root.isSortingRules()" class="delete-link droppable">Drop here to remove rule</li><li id="add-rule" data-bind="visible: $root.enabledEditing() &amp;&amp; !$root.isSortingRules() "><a data-transition="slidefade" href="#edit-rule-page" data-bind="click: $root.onAddRuleClicked" class="ui-btn ui-btn-icon-left ui-icon-plus">Add a new rule...</a></li><div class="drag-message"></div></ul><!-- ko if: !$root.hasPermission('rules', 'read') --><div class="denied">Permission denied</div><!-- /ko --></div></div></div><script id="variable-template" type="text/template"><li data-bind="" class="variable sortable"><a data-transition="slidefade" href="#edit-variable-page" style="white-space: normal" data-bind="click: $root.onEditVariableClicked"><label data-bind="text: displayName()" class="var-name"></label><span data-bind="text: type() == 'expression' ? ' = ' + exprInputStr() : ''" class="var-expression"></span><span data-bind="text: ' (' + type() + ')'" class="var-type"></span><span class="var-fullvalue"><span data-bind="text: displayValue()" class="var-value"></span><span data-bind="text: unit" class="var-unit"></span></span></a></li></script><script id="variable-groups-template" type="text/template"><!-- ko if: $root.enabledEditing() || $data.getVariables().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label data-bind="text: name"></label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  43. <!-- ko template: { name: 'variable-template', foreach: $data.getVariables, afterRender: $root.afterRenderVariable } --><!-- /ko -->
  44. <!-- /ko -->
  45. <!-- /ko --></script><div id="variables-page" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingVariables() }"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Variables</h3><!-- ko if: $root.hasPermission('variables', 'write') || pimatic.isDemo() --><a data-bind="jqmbutton: lockButton(), click: toggleEditing" class="ui-btn-right ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-bars ui-btn-icon-notext"></a><!-- /ko --></div><div class="ui-content overthrow"><div><ul id="variables" data-role="listview" data-bind="sortable: {isSorting: isSortingVariables, sorted: onVariablesSorted, drop: onDropVariableOnTrash}"><!-- ko template: { name: 'variable-groups-template', foreach: groups} --><!-- /ko -->
  46. <!-- ko if: $root.enabledEditing() || $root.getUngroupedVariables().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label>Ungrouped</label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  47. <!-- ko template: { name: 'variable-template', foreach: $root.getUngroupedVariables, afterRender: $root.afterRenderVariable } --><!-- /ko -->
  48. <!-- /ko -->
  49. <!-- /ko -->
  50. <!-- ko if: !$root.enabledEditing() && $root.getDeviceAttributeVariables().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroupDA, css: ($root.isGroupCollapsedDA() ? 'closed' : 'open')" class="sortable header collapsible"><label>Device Attributes</label></li><!-- ko if: !$root.isGroupCollapsedDA() -->
  51. <!-- ko template: { name: 'variable-template', foreach: $root.getDeviceAttributeVariables, afterRender: $root.afterRenderVariable } --><!-- /ko -->
  52. <!-- /ko -->
  53. <!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: isSortingVariables()" class="delete-link droppable">Drop here to remove variable</li><li id="add-a-variable" data-bind="visible: enabledEditing() &amp;&amp; !isSortingVariables()"><a data-transition="slidefade" href="#edit-variable-page" data-bind="click: onAddVariableClicked" class="ui-btn ui-btn-icon-left ui-icon-plus">Add a variable...</a></li></ul></div></div></div><script id="group-template" type="text/template"><li class="group sortable"><a data-transition="slidefade" href="#edit-group-page" data-bind="click: $root.onEditGroupClicked"><span data-bind="text: $data.name()" class="name"></span></a></li></script><div id="groups-page" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingGroups() }"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Groups</h3></div><div class="ui-content overthrow"><ul id="groups" data-role="listview" data-bind="sortable: {isSorting: isSortingGroups, sorted: onGroupsSorted, drop: onDropGroupOnTrash}"><!-- ko template: { name: 'group-template', foreach: groups, afterRender: $root.afterRenderGroup} --><!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: $root.isSortingGroups()" class="delete-link droppable">Drop here to remove group</li><li id="add-group" data-bind="visible: $root.enabledEditing() &amp;&amp; !$root.isSortingGroups() &amp;&amp; $root.hasPermission('groups', 'write')"><a data-transition="slidefade" href="#edit-group-page" data-bind="click: $root.onAddGroupClicked">Add a new group...</a></li></ul></div></div><script id="json-scheme-editor-field" type="text/template"><!-- ko if: $data.schema.name && $data.schema.type !== "object" && $data.schema.type !== "array" --><div data-bind="css: {isExtra: $data.schema.isExtra}" class="ui-field-contain"><!-- ko if: $data.schema && $data.schema.isExtra --><a data-bind="click: $parent.schema.removeExtraProperty" class="remove-property ui-btn ui-icon-minus ui-btn-inline ui-mini ui-btn-icon-notext"></a><!-- /ko -->
  54. <!-- ko if: typeof $data.schema.default !== "undefined" || $data.schema.notRequired --><label for="" class="ui-checkbox ui-mini"><span data-bind="text: $data.schema.name"></span><input type="checkbox" data-enhanced="true" data-bind="jqmchecked: $data.schema.notDefault($data)"></label><!-- /ko -->
  55. <!-- ko if: !(typeof $data.schema.default !== "undefined" || $data.schema.notRequired) --><label for="" data-bind="text: $data.schema.name"></label><!-- /ko --><!-- ko if: $data.schema.type !== "boolean" && !$.isArray($data.schema.enum) --><div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"><!-- ko if: $data.schema.type === "string" --><input type="text" data-bind="jqmtextinput: $data.schema.valueOrDefault($data), jqmenabled: $data.schema.enabled($data)"><!-- /ko -->
  56. <!-- ko if: $data.schema.type === "number" --><input type="text" data-bind="jqmtextinput: $data.schema.valueOrDefault($data), jqmenabled: $data.schema.enabled($data)"><!-- /ko -->
  57. <!-- ko if: $data.schema.type === "integer" --><input type="text" data-bind="jqmtextinput: $data.schema.valueOrDefault($data), jqmenabled: $data.schema.enabled($data)"><!-- /ko --></div><!-- /ko -->
  58. <!-- ko if: $.isArray($data.schema.enum) --><select data-mini="true" data-inline="true" data-bind="jqmoptions: $data.schema.enum, value: $data.schema.valueOrDefault($data), optionsText: $data.schema.enum, jqmenabled: $data.schema.enabled($data)"></select><!-- /ko -->
  59. <!-- ko if: $data.schema.type === "boolean" --><select data-bind="jqmflipswitch: $data.schema.valueOrDefault($data), jqmenabled: $data.schema.enabled($data)"><option value="false">No</option><option value="true">Yes</option></select><!-- /ko -->
  60. <!-- ko if: typeof $data.schema.default !== "undefined" && !$data.schema.enabled($data) --><span class="default">use default</span><!-- /ko -->
  61. <!-- ko if: typeof $data.schema.default === "undefined" && $data.schema.notRequired && !$data.schema.enabled($data) --><span class="notset">not set</span><!-- /ko --><div data-bind="text: $data.schema.description" class="description"></div></div><!-- /ko -->
  62. <!-- ko if: $data.schema.type === "object" --><h3 data-bind="text: $data.schema.name, css: {isExtra: $data.schema &amp;&amp; $data.schema.isExtra}"></h3><!-- ko template: { name: 'json-scheme-editor-object', data: $data } --><!-- /ko -->
  63. <!-- /ko -->
  64. <!-- ko if: $data.schema.type === "array" --><h3 data-bind="text: $data.schema.name, css: {isExtra: $data.schema &amp;&amp; $data.schema.isExtra}"></h3><!-- ko template: { name: 'json-scheme-editor-array', data: $data } --><!-- /ko -->
  65. <!-- /ko --></script><script id="json-scheme-editor-object" type="text/template"><!-- ko if: $data.schema && $data.schema.description --><div data-bind="text: $data.schema.description" class="description"></div><!-- /ko --><div class="properties"><!-- ko if: $data.schema && $data.schema.isExtra --><a data-bind="click: $data.schema.removeExtraProperty" class="remove-property ui-btn ui-icon-minus ui-btn-inline ui-mini ui-btn-icon-notext"></a><!-- /ko -->
  66. <!-- ko if: $data.schema -->
  67. <!-- ko template: { name: 'json-scheme-editor-field', foreach: $data.schema.getProperties($data) } --><!-- /ko -->
  68. <!-- ko if: $data.schema.allowAdditionalProperties -->
  69. <!-- ko template: { name: 'json-scheme-editor-field', foreach: $data.schema.getExtraProperties($data) } --><!-- /ko --><div class="ui-field-contain add-property"><label>Add a property</label><div class="add-property-fields"><div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset add-property-name"><input type="text" placeholder="Name" data-mini="true" data-inline="true" data-bind="jqmtextinput: $data.schema.newPropertyName"></div><select data-mini="true" data-inline="true" data-bind="jqmoptions: $data.schema.newPropertyTypes, value: $data.schema.newPropertyType"></select><a data-bind="click: $data.schema.newPropertyAdd" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini">Add</a></div></div><!-- ko if: $data.schema && $data.schema.extraPropertiesDescription --><div data-bind="text: $data.schema.extraPropertiesDescription" class="description"></div><!-- /ko -->
  70. <!-- /ko -->
  71. <!-- ko if: !$data.schema.hasProperties && !$data.schema.allowAdditionalProperties --><p data-bind="text: __('%s has no config options.', $data.schema.name)"></p><!-- /ko -->
  72. <!-- /ko --></div></script><script id="json-scheme-editor-array" type="text/template"><div class="elements"><!-- ko if: $data.schema && $data.schema.isExtra --><a data-bind="click: $data.schema.removeExtraProperty" class="remove-property ui-btn ui-icon-minus ui-btn-inline ui-mini ui-btn-icon-notext"></a><!-- /ko -->
  73. <!-- ko if: $data.schema && $data.schema.description --><div data-bind="text: $data.schema.description" class="description"></div><!-- /ko --><!-- ko if: $data.schema --><ul data-role="listview" data-inset="true" data-bind="sortable: {isSorting: $data.schema.items.isSorting, sorted: $data.schema.items.onSorted($data), drop: $data.schema.items.onRemove($data)}, jqmlistview: $data.schema.getItems($data.value)" class="items">
  74. <!-- ko template: { name: 'json-scheme-editor-array-item', foreach: $data.schema.getItems($data.value), afterRender: $root.afterRenderItem } --><!-- /ko --><li data-bind="visible: !$data.schema.items.isSorting()" class="add-item"><a data-bind="text: __('Add'), click: $data.schema.items.addItem"></a></li><li data-theme="a" data-icon="delete" data-bind="visible: $data.schema.items.isSorting()" class="delete-link droppable">Drop here to remove item</li></ul><!-- ko template: { name: 'json-scheme-editor-item-overlay', data: $data.schema.items.editingItem } --><!-- /ko -->
  75. <!-- /ko --></div></script><script id="json-scheme-editor-array-item" type="text/template"><li class="sortable"><a data-bind="text: $data.schema.getItemLabel($data.value), click: $data.schema.onEditItemClick.bind($data, $index(), $data)"></a></li></script><script id="json-scheme-editor-item-overlay" type="text/template"><!-- ko if: $data !== null --><div class="popup-overlay"><div class="outer overthrow"><div class="inner"><!-- ko template: { name: 'json-scheme-editor-field', data: $data } --><!-- /ko --><div class="ui-grid-a controls"><div class="ui-block-a"><a id="rule-condition-cancel" data-bind="click: $data.schema.editCancel" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="rule-condition-ok" data-bind="click: $data.schema.editOk.bind($data, $parent, $data)" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">OK</a></div></div></div></div></div><!-- /ko --></script><div id="add-item-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Add an item</h3></div><div class="ui-content overthrow"><ul id="device-items" data-role="listview" data-inset="true" data-theme="b"><li data-role="list-divider">Devices</li><!-- ko foreach: devices --><li data-theme="a" class="item"><a href="" data-bind="text: name, jqmlistitem: {icon: $root.deviceEntryIcon($data)}"></a></li><!-- /ko --></ul></div></div><script id="rule-condition-template" type="text/template"><div id="rule-condition-gui" class="ui-corner-all"><a data-bind="visible: !$data.tree(), click: addCondition" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini ui-corner-all">Condition</a><!-- ko template: { name: "rule-predicate-template", data: tree, if: tree} --><!-- /ko --></div><a href="#" data-bind="click: $root.setTextMode" class="input-mode-switch">switch to text mode</a></script><script id="rule-condition-selector-element" type="text/template"><span><!-- ko if: type == "select" --><select data-mini="true" data-inline="true" data-bind="jqmoptions: options, value: match, optionsText: $root.conditionInput.elementOptionsText, disabled: $parent.disableElementsInput"></select><!-- /ko -->
  76. <!-- ko if: type == "static" --><span data-bind="text: match, disabled: $parent.disableElementsInput"></span><!-- /ko -->
  77. <!-- ko if: type == "text" --><input type="text" data-bind="textInput: match, disabled: $parent.disableElementsInput"><!-- /ko -->
  78. <!-- ko if: type == "time" --><input type="text" data-bind="textInput: match, disabled: $parent.disableElementsInput"><!-- /ko -->
  79. <!-- ko if: type == "number" --><input type="text" data-bind="textInput: match, disabled: $parent.disableElementsInput"><!-- /ko --></span></script><script id="rule-condition-selector-template" type="text/template"><div id="rule-condition-selector" data-bind="visible: conditionInput.visible, event: {keypress: conditionInput.keypress}" class="popup-overlay"><div class="outer overthrow"><div class="inner"><div class="ui-field-contain"> <label for="edit-rule-name" class="short-label">Predicate: </label><div class="ui-input-text"><input id="rule-condition-input" autocomplete="off" autocapitalize="none" autocorrect="off" type="text" data-bind="textInput: conditionInput.inputValue, disabled: conditionInput.disablePredicateInput"></div></div><div data-bind="visible: conditionInput.errors().length &gt; 0" class="ui-field-contain"><div data-bind="foreach: conditionInput.errors" class="errors"><div data-bind="text: $data"></div></div></div><div id="rule-condition-presets" data-bind="visible: conditionInput.presetsVisible" class="ui-field-contain"><label>Available Events: </label><div data-bind="foreach: conditionInput.presets"><a data-bind="click: $root.conditionInput.selectPredicate, text: name" class="ui-btn ui-btn-inline ui-mini ui-corner-all"></a></div></div><div id="rule-condition-elements" data-bind="visible: conditionInput.elementsVisible" class="ui-field-contain"><label>Event: </label><div class="ui-body-inherit ui-corner-all ui-shadow-inset"><a id="rule-condition-back-presets" data-bind="click: conditionInput.showDefaultSelection" class="ui-btn ui-btn-inline ui-mini ui-corner-all ui-icon-back ui-btn-icon-left">Back</a><div data-bind="" class="elements"><!-- ko template: { name: "rule-condition-selector-element", foreach: conditionInput.elements} --><!-- /ko --></div></div></div><div id="rule-condition-for-elements" data-bind="visible: conditionInput.forElementsVisible" class="ui-field-contain"><div class="ui-checkbox ui-mini"><label for="checkbox-enhanced" class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off">Duration: <input id="checkbox-enhanced" type="checkbox" data-enhanced="true" data-bind="jqmchecked: conditionInput.forEnabled"></label></div><div class="ui-body-inherit ui-corner-all ui-shadow-inset"><div data-bind="" class="elements"></div><!-- ko template: { name: "rule-condition-selector-element", foreach: conditionInput.forElements} --><!-- /ko --></div></div><div class="ui-grid-a controls"><div class="ui-block-a"><a id="rule-condition-cancel" data-bind="click: conditionInput.cancel" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="rule-condition-ok" data-bind="click: conditionInput.ok" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">OK</a></div></div><a id="rule-confition-remove" data-bind="visible: conditionInput.canRemove, click: conditionInput.remove" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Remove</a></div></div></div></script><script id="rule-predicate-template" type="text/template"><div data-bind="css: { 'node-predicate': type == 'predicate', 'node-and': type == 'and' , 'node-andIf': type == 'and if', 'node-or': type == 'or', 'node-orWhen': type == 'or when' }" class="node"><!-- ko template: { name: "rule-predicate-template", data: $data.left, if: $data.left} --><!-- /ko -->
  80. <!-- ko if: type != 'predicate' --><span data-bind="text: type" class="binary-operator"></span><!-- /ko -->
  81. <!-- ko if: type == 'predicate' --><span data-bind="text: $root.predicateToString(predicate), click: $root.editPredicate" class="predicate ui-btn ui-btn-inline ui-mini ui-corner-all"></span><!-- /ko -->
  82. <!-- ko template: { name: "rule-predicate-template", data: $data.right, if: $data.right} --><!-- /ko --><div class="buttons"><!-- ko if: type != 'predicate' || $parent.type != 'and' --><a data-bind="click: $root.addAnd" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini ui-corner-all">and</a><!-- /ko -->
  83. <!-- ko if: !$parent.type --><a data-bind="click: $root.addAndIf" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini ui-corner-all">and if</a><!-- /ko -->
  84. <!-- ko if: (type != 'predicate' || $parent.type != 'or') && $parent.type --><a data-bind="click: $root.addOr" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini ui-corner-all">or</a><!-- /ko -->
  85. <!-- ko if: !$parent.type --><a data-bind="click: $root.addOrWhen" class="ui-btn ui-icon-plus ui-btn-icon-left ui-btn-inline ui-mini ui-corner-all">or when</a><!-- /ko --></div></div></script><div id="edit-rule-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><!-- ko template: { name: "rule-condition-selector-template", data: $data} --><!-- /ko --><form id="edit-rule-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" class="short-labels"><div class="ui-field-contain"> <label for="edit-rule-name" class="short-label">Name: </label><input id="edit-rule-name" type="text" placeholder="Short description" data-bind="textInput: ruleName"></div><div class="ui-field-contain"><label for="edit-rule-name" class="short-label">ID: </label><input id="edit-rule-id" type="text" placeholder="Internal ID" data-bind="textInput: ruleId, jqmenabled: action() == 'add'"></div><div class="ui-field-contain"><label for="edit-rule-condition">When</label><textarea id="edit-rule-condition" placeholder="Condition" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: ruleCondition, visible: editMode() == 'text'"></textarea><!-- ko if: editMode() == "text" --><a href="#" data-bind="click: $root.setGuiMode" class="input-mode-switch">switch to gui mode</a><!-- /ko -->
  86. <!-- ko if: editMode() == "gui" -->
  87. <!-- ko template: { name: "rule-condition-template", data: $data} --><!-- /ko -->
  88. <!-- /ko --></div><div class="ui-field-contain"><label for="edit-rule-actions">then</label><textarea id="edit-rule-actions" placeholder="Actions" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: ruleActions"></textarea></div><input id="edit-rule-active" type="checkbox" name="edit-rule-active" data-bind="jqmchecked: ruleEnabled"><label for="edit-rule-active">Enabled</label><input id="edit-rule-logging" type="checkbox" name="edit-rule-logging" data-bind="jqmchecked: ruleLogging"><label for="edit-rule-logging">Log Action Execution </label><div class="ui-grid-a"><div class="ui-block-a"><a id="edit-rule-cancel" data-transition="slide" data-direction="reverse" data-role="button" href="#rules-page" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-rule-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div><div data-bind="visible: action() == 'update'"><a id="edit-rule-remove" data-transition="slide" data-direction="reverse" data-bind="click: onRemove" data-role="button" href="#rules-page" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Delete this Rule</a><a id="edit-rule-copy" data-bind="click: onCopy" data-role="button" href="#rules-page" class="ui-btn ui-icon-plus ui-btn-icon-left">Copy as new</a></div></form></div></div><div id="edit-variable-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><form id="edit-variable-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" class="short-labels"><div class="ui-field-contain has-variable-name-input"><label for="edit-variable-name">Name: </label><input id="edit-variable-name" placeholder="variable-name" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: variableName, jqmenabled: action() == 'add'"></div><div class="ui-field-contain"><label for="select-variable-type">Type: </label><select id="select-variable-type" name="select-variable-type" data-bind="jqmselectvalue: variableType"><option value="value">Value</option><option value="expression">Expression</option></select></div><div class="ui-field-contain"><label data-bind="text: valueLabelText() + ': '"></label><input id="edit-varibale-value" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: variableValue, attr: {placeholder: (variableType() == 'value' ? 'Number or string' : 'Numeric expr or string in quotes')}"></div><div class="ui-field-contain"><label for="select-variable-type">Unit: </label><input id="edit-varibale-unit" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: variableUnit, attr: {placeholder: 'Optional'}"></div><div class="ui-field-contain ui-grid-a"><div class="ui-block-a"><a id="edit-variable-cancel" data-transition="slide" data-direction="reverse" data-role="button" href="#variables-page" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-variable-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div><div id="edit-variable-advanced" data-bind="visible: action() == 'update'"><a id="edit-variable-remove" data-transition="slide" data-direction="reverse" data-bind="click: onRemove" data-role="button" href="#variables-page" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Delete this variable</a></div></form></div></div><div id="edit-devicepage-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><form id="edit-devicepage-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" class="short-labels"><div class="ui-field-contain has-page-name-input"><label for="edit-devicepage-name">Name: </label><input id="edit-devicepage-name" placeholder="page-name" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: pageName"></div><div class="ui-field-contain has-page-id-input"><label for="edit-devicepage-id">ID: </label><input id="edit-devicepage-id" placeholder="page-id" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: pageId, jqmenabled: action() == 'add'"></div><div class="ui-field-contain ui-grid-a"><div class="ui-block-a"><a id="edit-devicepage-cancel" data-transition="slide" data-direction="reverse" data-role="button" href="#devicepages-page" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-devicepage-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div><div id="edit-devicepage-advanced" data-bind="visible: action() == 'update'"><a id="edit-devicepage-remove" data-transition="slide" data-direction="reverse" data-bind="click: onRemove" data-role="button" href="#devicepages-page" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Delete this Page</a></div></form></div></div><div id="edit-group-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><form id="edit-group-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" class="short-labels"><div class="ui-field-contain has-group-name-input"><label for="edit-group-name">Name: </label><input id="edit-group-name" placeholder="group-name" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: groupName"></div><div class="ui-field-contain has-group-id-input"><label for="edit-group-id">ID: </label><input id="edit-group-id" placeholder="group-id" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: groupId, jqmenabled: action() == 'add'"></div><div class="ui-field-contain ui-grid-a"><div class="ui-block-a"><a id="edit-group-cancel" data-transition="slide" data-direction="reverse" data-role="button" href="#groups-page" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-group-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div><div id="edit-group-advanced" data-bind="visible: action() == 'update'"><a id="edit-group-remove" data-transition="slide" data-direction="reverse" data-bind="click: onRemove" data-role="button" href="#groups-page" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Delete this Group</a></div></form></div></div><div id="edit-device-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><div id="edit-device-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" action="#" class="short-labels json-schema-editor"><div class="ui-field-contain has-device-name-input"><label for="edit-device-name">Name: </label><input id="edit-device-name" placeholder="device-name" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: deviceName"></div><div class="ui-field-contain has-device-id-input"><label for="edit-device-id">ID: </label><input id="edit-device-id" placeholder="device-id" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" data-bind="textInput: deviceId, jqmenabled: action() == 'add'"></div><div class="ui-field-contain has-device-id-input"><label for="edit-device-class">Class: </label><select id="select-device-class" name="select-device-class" data-bind="jqmoptions: deviceClasses, value: deviceClass, jqmenabled: action() == 'add'"></select></div><!-- ko if: $root.configSchema() && $root.configSchema().error --><div data-bind="text: $root.configSchema().error"></div><!-- /ko -->
  89. <!-- ko if: !($root.configSchema() && $root.configSchema().error) -->
  90. <!-- ko template: { name: 'json-scheme-editor-object', data: {schema: $root.configSchema(), value: $root.deviceConfig() } } --><!-- /ko -->
  91. <!-- /ko --><div class="ui-field-contain ui-grid-a"><div class="ui-block-a"><a id="edit-device-cancel" data-role="button" data-bind="click: onCancel" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-device-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div><div id="edit-device-advanced" data-bind="visible: action() == 'update'"><a id="edit-device-remove" data-transition="slide" data-direction="reverse" data-bind="click: onRemove" data-role="button" href="#devices-page" class="delete-link ui-btn ui-icon-delete ui-btn-icon-left">Delete this Device</a></div></div></div></div><div id="edit-plugin-page" data-role="page"><div data-theme="a" data-role="header"><h3 data-bind="text: pageTitle()"></h3></div><div class="ui-content overthrow"><div id="edit-plugin-form" autocomplete="off" autocapitalize="none" autocorrect="off" spellcheck="false" action="#" class="short-labels json-schema-editor"><!-- ko template: { name: 'json-scheme-editor-object', data: {schema: $root.configSchema(), value: $root.pluginConfig() } } --><!-- /ko --><div class="ui-field-contain ui-grid-a"><div class="ui-block-a"><a id="edit-plugin-cancel" data-transition="slide" data-direction="reverse" data-role="button" href="#plugins-page" class="ui-btn ui-icon-back ui-btn-icon-left">Cancel</a></div><div class="ui-block-b"><a id="edit-plugin-save" data-role="button" data-bind="click: onSubmit" class="ui-btn ui-icon-check ui-btn-icon-left ui-btn-b">Save</a></div></div></div></div></div><div id="log-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><!-- ko if: $root.hasPermission('messages', 'write') --><a id="clear-log" class="ui-btn-right ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-check">Delete all</a><!-- /ko --><h3>Log messages</h3></div><div class="ui-content overthrow"><div class="controls"><select id="select-levels" name="select-levels" multiple="multiple" data-native-menu="false" data-mini="true" data-inline="true" data-bind="jqmselectedOptions: chosenLevels"><option>Level</option><option value="debug">Debug</option><option value="info">Info</option><option value="warn">Warn</option><option value="error">Error</option></select><select id="select-tag" name="select-tag" data-mini="true" data-inline="true" data-bind="jqmoptions: tags, value: chosenTag"></select><span data-bind="text: messageCountText"></span></div><ul id="log-messages" data-role="listview" data-bind="foreach: displayedMessages"><li><span data-bind="text: $parent.timeToShow($index)" class="time"></span><span data-bind="text: level, attr: {class: &quot;level &quot; + level}"></span> <span data-bind="text: JSON.stringify($data.tags).replace(/(&quot;)/g, '')" class="tags"></span>: <span data-bind="text: text" class="msg"></span></li></ul></div></div><script id="graph-group-template" type="text/template"><!-- ko if: $data.getDevicesWithGraphableAttribute().length > 0  --><li data-role="list-divider" data-theme="a"><label data-bind="text: name"></label></li><!-- ko template: { name: 'graph-device-template', foreach: $data.getDevicesWithGraphableAttribute() } --><!-- /ko -->
  92. <!-- /ko --></script><script id="graph-device-template" type="text/template"><li class="graph-device"><label data-bind="text: name"></label><!-- ko template: { name: 'graph-attribute-template', foreach: $data.attributes(), afterRender: $root.afterRenderAttribute } --><!-- /ko --></li></script><script id="graph-attribute-template" type="text/template"><!-- ko if: $data.type == "number" || $data.type == "boolean" --><div data-role="fieldcontain" class="graph-device-attribute"><!-- ko with: $root.getDisplayedAttribute($parent, $data) -->
  93. <!-- ko if: $data.serie --><div data-bind="style: {'background-color': $data.serie().color}" class="color-label"></div><!-- /ko -->
  94. <!-- /ko --><span data-bind="text: label" class="name"></span><div data-role="controlgroup" class="controls"><!-- ko if: !$root.getDisplayedAttribute($parent, $data) --><a class="ui-btn ui-mini ui-btn-inline ui-corner-all show-button">Show</a><!-- /ko -->
  95. <!-- ko if: $root.getDisplayedAttribute($parent, $data) --><a class="ui-btn ui-mini ui-btn-inline ui-corner-all hide-button ui-btn-b">Hide</a><!-- /ko --></div></div><!-- /ko --></script><div id="graph-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true" data-transition="slide" data-direction="reverse">Back</a><h3>Graph</h3></div><div class="ui-content overthrow"><div id="chart-container"><div class="controls"><span>Show </span><select id="chart-select-range" name="chart-select-range" data-bind="value: chosenRange" data-inline="true" data-mini="true"><option value="day">24 hours</option><option value="week">7 days</option><option value="month">30 days</option><option value="year">365 days</option></select><span>up to </span><input id="chart-select-date" type="text" data-role="date" data-mini="true" data-bind="value: chosenDate" data-date-format="yy-mm-dd"></div><div id="chart-wrapper"><div id="chart"></div></div><div id="chart-no-data">No data to display.</div><div id="chart-info"><div id="chart-legend-wrapper"><div id="chart-legend"></div></div><div id="average-info" data-bind="if: averageDuration &amp;&amp; displayedAttributes().length &gt; 0"><span data-bind="text: averageDurationText()"></span></div></div></div><ul id="graph-device-list" data-role="listview" class="device-attribute-list"><!-- ko template: { name: 'graph-group-template', foreach: groups} --><!-- /ko -->
  96. <!-- ko if: $root.getUngroupedDevicesWithGraphableAttribute().length > 0  --><li data-role="list-divider" data-theme="a"><label>Ungrouped</label></li><!-- ko template: { name: 'graph-device-template', foreach: $root.getUngroupedDevicesWithGraphableAttribute() } --><!-- /ko -->
  97. <!-- /ko --></ul></div></div><div id="events-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><a href="#graph-page" class="ui-btn-right ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left">Graph</a><h3>Events</h3></div><div class="ui-content overthrow"><div class="controls"><select id="select-device" name="select-device" data-mini="true" data-inline="true" data-bind="jqmoptions: devices, value: chosenDevice"></select><select id="select-attribute" name="select-attribute" data-mini="true" data-inline="true" data-bind="jqmoptions: attributes, value: chosenAttribute"></select><span data-bind="text: eventsCountText"></span></div><div class="outdent"><table id="events-table" class="table-stroke ui-table"><thead><tr><th class="time-column">Time</th><th class="device-column">Device</th><th class="attribute-column">Attribute</th><th data-priority="1" class="value-column">Value</th></tr></thead><tbody data-bind="foreach: displayedEvents"><tr><td data-bind="html: formatedTime()" class="time-column"></td><td data-bind="html: formatedDeviceName()" class="device-column"></td><td data-bind="text: formatedAttributeName()" class="attribute-column"></td><td data-bind="html: formatedValue()" class="value-column"></td></tr></tbody></table></div></div></div><script id="device-edit-template" type="text/template"><li class="device-edit sortable"><a data-transition="slidefade" href="#edit-device-page" data-bind="click: $root.onEditDeviceClicked"><span data-bind="text: $data.name()" class="name"></span></a></li></script><script id="device-groups-template" type="text/template"><!-- ko if: $root.enabledEditing() || $data.getDevices().length > 0  --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label data-bind="text: name"></label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  98. <!-- ko template: { name: 'device-edit-template', foreach: $data.getDevices, afterRender: $root.afterRenderDevice } --><!-- /ko -->
  99. <!-- /ko -->
  100. <!-- /ko --></script><script id="discover-message-template" type="text/template"><p class="discover-message"><span data-bind="text: pluginName"></span>: <span data-bind="text: message"></span></p></script><script id="discovered-device-template" type="text/template"><li class="device-edit"><a data-transition="slidefade" href="#edit-device-page" data-bind="click: $root.onDiscoveredDeviceClicked"><span data-bind="text: pluginName" class="pluginName"></span>: <span data-bind="text: deviceName" class="name"></span></a></li></script><div id="devices-page" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingDevices() }"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Devices</h3><!-- ko if: $root.hasPermission('devices', 'write') --><a href="#" data-role="button" data-icon="refresh" data-iconpos="left" data-inline="true" data-bind="click: discoverDevices" class="discover-devices">Discover Devices</a><!-- /ko --></div><div class="ui-content overthrow"><!-- ko if: $root.discoverMessages().length > 0 --><div class="discover-messages ui-body ui-body-a ui-corner-all page-message"><!-- ko template: { name: 'discover-message-template', foreach: $root.discoverMessages } --><!-- /ko --></div><!-- /ko --><ul id="devices" data-role="listview" data-bind="sortable: {isSorting: isSortingDevices, sorted: onDevicesSorted, drop: onDropDeviceOnTrash}, dragslide: {}"><!-- ko if: $root.discoveredDevices().length > 0 --><li data-role="list-divider" data-theme="a"><label>Discovered devices</label></li><!-- ko template: { name: 'discovered-device-template', foreach: $root.discoveredDevices } --><!-- /ko -->
  101. <!-- /ko -->
  102. <!-- ko template: { name: 'device-groups-template', foreach: groups} --><!-- /ko -->
  103. <!-- ko if: $root.enabledEditing() || $root.getUngroupedDevices().length > 0  -->
  104. <!-- ko with: $root --><li data-role="list-divider" data-theme="a" data-bind="click: $root.toggleGroup, css: ($root.isGroupCollapsed($data) ? 'closed' : 'open')" class="sortable header collapsible"><label>Ungrouped</label></li><!-- ko if: !$root.isGroupCollapsed($data) -->
  105. <!-- ko template: { name: 'device-edit-template', foreach: $root.getUngroupedDevices, afterRender: $root.afterRenderDevice } --><!-- /ko -->
  106. <!-- /ko -->
  107. <!-- /ko -->
  108. <!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: $root.isSortingDevices()" class="delete-link droppable">Drop here to remove device</li><li id="add-device" data-bind="visible: $root.enabledEditing() &amp;&amp; !$root.isSortingDevices() "><a data-transition="slidefade" href="#edit-device-page" data-bind="click: $root.onAddDeviceClicked">Add a new device...</a></li><div class="drag-message"></div></ul></div></div><script id="loading-template" type="text/template"><li class="loading">Loading.....</li></script><div id="plugins-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true" data-transition="slidefade" data-direction="reverse">Back</a><!-- ko if: $root.hasPermission('plugins', 'write') --><a data-role="button" data-icon="refresh" data-iconpos="left" data-inline="true" class="restart-now">Restart</a><!-- /ko --><h3>Plugins</h3></div><div class="ui-content overthrow"><div data-bind="visible: restartRequired" class="ui-body ui-body-a ui-corner-all restart-alert"><p>Some settings have changed, a restart is required.</p><a href="#" class="restart-now">Restart Now</a></div><div data-role="tabs"><div data-role="navbar"><ul><li><a href="#installed-plugins" class="ui-btn-active">Installed plugins</a></li><li><a href="#download-plugins">Browse Plugins</a></li></ul></div><div id="installed-plugins"><ul id="plugin-list" data-role="listview" data-inset="true" data-bind="foreach: installedPlugins"><li><label><h2><span data-bind="text: name" class="name"></span> <span data-bind="text: version" class="version"></span> <span data-bind="visible: loaded()" class="loaded">loaded</span> <span data-bind="visible: $data.activated()" class="activated">activated</span> <span data-bind="visible: $data.isCompatible !== true" class="compatibility-unknown">compatibility unknown</span> <span data-bind="visible: $data.updateAvailable" class="update-available">Update available</span></h2><p class="description"><span data-bind="text: description"></span> <a target="_blank" data-bind="attr: {href: 'https://pimatic.org/plugins/pimatic-'+$data.name}">Show Readme</a></p><div class="buttons"><a data-bind="visible: !$data.activated(), click: $root.onActivateClick" class="ui-btn ui-mini ui-btn-inline ui-icon-power ui-btn-icon-left activate">Activate</a><a data-bind="visible: $data.activated(), click: $root.onDeactivateClick" class="ui-btn ui-mini ui-btn-inline ui-icon-power ui-btn-icon-left deactivate">Deactivate</a><a data-bind="visible: $data.activated(), click: $root.onSettingsClick" href="#edit-plugin-page" class="ui-btn ui-mini ui-btn-inline ui-icon-gear ui-btn-icon-left">Settings</a><a data-bind="click: $root.onUninstallClick" class="ui-btn ui-mini ui-btn-inline delete-link ui-icon-delete ui-btn-icon-left">Uninstall</a></div></label></li></ul></div><div id="download-plugins"><form><ul id="plugin-browse-list" data-role="listview" data-inset="true" data-bind="foreach: browsePlugins"><li><label><h2><span data-bind="text: name" class="name"></span> <span data-bind="text: version" class="version"></span> <span data-bind="visible: installed()" class="installed">installed</span> <span data-bind="visible: loaded()" class="loaded">loaded</span> <span data-bind="visible: $data.activated()" class="activated">activated</span> <span data-bind="visible: $data.isCompatible !== true" class="compatibility-unknown">compatibility unknown</span></h2><p class="description"><span data-bind="text: description"></span> <a target="_blank" data-bind="attr: {href: 'https://pimatic.org/plugins/pimatic-'+$data.name}">Show Readme</a></p><div class="buttons"><a data-bind="visible: !installed(), click: $root.onInstallClick" class="ui-btn ui-mini ui-btn-inline ui-icon-power ui-btn-icon-left install">Install</a></div></label></li></ul></form></div></div></div></div><div id="config-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true" data-transition="slidefade" data-direction="reverse">Back</a><div data-role="controlgroup" data-type="horizontal" class="ui-mini ui-btn-right"><a data-bind="jqmbutton: lockButton(), click: toggleLock, visible: pimatic.hasPermission('config', 'write')" href="" class="ui-btn ui-btn-inline ui-btn-icon-left ui-icon-bars"></a><a data-bind="click: updateConfigClicked, visible: pimatic.hasPermission('config', 'write') &amp;&amp; !$data.locked()" data-transition="slidefade" data-direction="reverse" class="ui-btn ui-btn-inline ui-btn-icon-left ui-icon-check">Save</a></div><h3>Config</h3></div><div class="ui-content overthrow"><div id="config-editor"></div></div></div><div id="updates-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true" data-transition="slidefade" data-direction="reverse">Back</a><h3>Updates</h3></div><div class="ui-content overthrow"><div class="message"><p data-bind="visible: !pimaticUpdateInfo()">pimatic is searching for updates...</p><p data-bind="visible: pimaticUpdateInfo(), text: pimaticUpdateInfoText"></p><!-- ko foreach: pluginUpdateInfoText() --><p data-bind="text: $data"></p><!-- /ko --></div><a id="install-updates" data-bind="visible: hasUpdates() &amp;&amp; updateProcessStatus() == 'idle', click: installUpdatesClicked" data-role="button" data-icon="check" data-inline="true" data-theme="b" data-mini="true">Install updates</a><div data-bind="visible: updateProcessMessages().length &gt; 0" class="message process-message"><!-- ko foreach: updateProcessMessages() --><p data-bind="text: $data"></p><!-- /ko --></div><p data-bind="visible: updateProcessStatus() == 'error'">There was an error installing the updates, please check the log.</p><p data-bind="visible: updateProcessStatus() == 'done'">Updates were successful. Please restart pimatic.</p><a data-bind="visible: updateProcessStatus() == 'done', click: restart" data-role="button" data-icon="refresh" data-inline="true" data-theme="b" data-mini="true" class="restart-now">Restart pimatic</a></div></div><script id="devicepage-item-template" type="text/template"><li class="devicepage sortable"><a data-transition="slidefade" href="#edit-devicepage-page" data-bind="click: $root.onEditDevicepageClicked"><span data-bind="text: $data.name()" class="name"></span></a></li></script><div id="devicepages-page" data-role="page" data-bind="css: {locked: !$root.enabledEditing(), unlocked: $root.enabledEditing(), notSorting: !$root.isSortingDevicepages() }"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Edit Pages</h3></div><div class="ui-content overthrow"><div><ul id="devicepages" data-role="listview" data-bind="sortable: {isSorting: isSortingDevicepages, sorted: onDevicepagesSorted, drop: onDropDevicepageOnTrash}"><!-- ko template: { name: 'devicepage-item-template', foreach: devicepages, afterRender: $root.afterRenderDevicepage} --><!-- /ko --><li data-theme="a" data-icon="delete" data-bind="visible: $root.isSortingDevicepages()" class="delete-link droppable">Drop here to remove page</li><li id="add-devicepage" data-bind="visible: $root.enabledEditing() &amp;&amp; !$root.isSortingDevicepages() "><a data-transition="slidefade" href="#edit-devicepage-page" data-bind="click: $root.onAddDevicepageClicked">Add a new page...</a></li></ul></div></div></div><div id="database-page" data-role="page"><div data-theme="a" data-role="header"><a href="#index" data-transition="slidefade" data-direction="reverse" class="ui-btn-left ui-btn ui-btn-inline ui-corner-all ui-btn-icon-left ui-icon-arrow-l">Back</a><h3>Database</h3></div><div class="ui-content overthrow"><h2>Attribute logging info</h2><div class="outdent"><table id="database-attribute-info" class="table-stroke ui-table"><thead><tr><th class="device-column">Device</th><th class="attribute-column">Attribute</th><th class="type-column">Type</th><th class="interval-column">Interval</th><th class="expire-column">Expire</th><th class="count-column">Count</th></tr></thead><tbody data-bind="foreach: deviceAttributes"><tr><td data-bind="text: deviceId" class="device-column"></td><td data-bind="text: attributeName" class="attribute-column"></td><td class="type-column"><span data-bind="text: $data.type" class="type"></span> <span data-bind="text: '(' + ($data.discrete? 'discrete' : 'continuous') + ')'" class="discrete"></span></td><td data-bind="text: interval" class="interval-column"></td><td data-bind="text: expire" class="expire-column"></td><td data-bind="text: count" class="count-column"></td></tr></tbody></table></div><h2>Problems: </h2><ul id="database-problems" data-role="listview" data-bind="foreach: problems"><li><div class="info"><span data-bind="text: $data.deviceId + &quot;.&quot; + $data.attribute" class="attribute"></span>: <span data-bind="text: $data.description" class="description"></span></div><div class="action"><a data-bind="text: $data.action, click: $parent.fixProblem" class="ui-btn ui-corner-all ui-mini delete-link"></a></div></li></ul><!-- ko if: problems && problems.length == 0 --><div>No problems found.</div><!-- /ko --> </div></div><div id="login-page" data-role="page" data-dialog="true" data-close-btn="none"><div data-theme="a" data-role="header"><select id="select-theme" name="select-theme" data-mini="true" data-inline="true" class="ui-btn-left"><option value="graphite/aloe">graphite: aloe</option><option value="graphite/candy">graphite: candy</option><option value="graphite/melon">graphite: melon</option><option value="graphite/mint">graphite: mint</option><option value="graphite/royal">graphite: royal</option><option value="graphite/sand">graphite: sand</option><option value="graphite/water">graphite: water</option><option value="graphite/dark">graphite: dark</option><option value="jqm/classic">jqm: classic</option></select><h3>Login</h3></div><div class="ui-content"><form id="loginForm"><div data-role="fieldcontain"><label for="Username">Username:</label><input id="firstName" type="text" name="username" value=""></div><div data-role="fieldcontain"><label for="password">Password:</label><input id="password" type="password" name="password" value="" autocomplete="off"></div><input id="rememberMe" type="checkbox" name="rememberMe"><label for="rememberMe">Keep me logged in</label><div data-role="fieldcontain"><button id="submit" data-theme="b" type="submit">Login</button></div></form></div></div><script id="huezllonoff-template" type="text/template"><li class="sortable huezlllight-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div class="ui-dimlevel"><select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select></div> <span data-bind="template: { name: 'huezlllight-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></div></li></script><script id="huezlldimmable-template" type="text/template"><li class="sortable huezlllight-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div class="ui-dimlevel"><select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select> <input min="0" max="100" step="1" data-highlight="true" data-bind="attr: { id: sliderBriId }, value: sliderBriValue" class="dimmer"/></div> <span data-bind="template: { name: 'huezlllight-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></div></li></script><script id="huezllcolortemp-template" type="text/template"><li class="sortable huezlllight-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div class="ui-dimlevel"><select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select> <input min="0" max="100" step="1" data-highlight="true" data-bind="attr: { id: sliderBriId }, value: sliderBriValue" class="dimmer"/></div> <div class="ui-color"><div class="ui-colorpicker-spacer"></div> <input min="153" max="500" step="1" data-highlight="true" data-bind="attr: { id: sliderCtId }, value: sliderCtValue" class="dimmer"/></div> <span data-bind="template: { name: 'huezlllight-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></div></li></script><script id="huezllcolor-template" type="text/template"><li class="sortable huezlllight-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div class="ui-dimlevel"><select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select> <input min="0" max="100" step="1" data-highlight="true" data-bind="attr: { id: sliderBriId }, value: sliderBriValue" class="dimmer"/></div> <div class="ui-color"><div class="ui-colorpicker ui-flipswitch ui-corner-all"><input class="light-color"/></div></div> <span data-bind="template: { name: 'huezlllight-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></div></li></script><script id="huezllextendedcolor-template" type="text/template"><li class="sortable huezlllight-device no-header"><div class="item-inner"><label data-bind="text: name, tooltip: $data.labelTooltipHtml" class="device-label"></label> <div class="ui-dimlevel"><select data-bind="attr: { id: switchId }, value: switchState" class="switch"><option value="off">Off</option><option value="on">On</option></select> <input min="0" max="100" step="1" data-highlight="true" data-bind="attr: { id: sliderBriId }, value: sliderBriValue" class="dimmer"/></div> <div class="ui-color"><div class="ui-colorpicker ui-flipswitch ui-corner-all"><input class="light-color"/></div> <input min="153" max="500" step="1" data-highlight="true" data-bind="attr: { id: sliderCtId }, value: sliderCtValue" class="dimmer"/></div> <span data-bind="template: { name: 'huezlllight-attribute-template', foreach: $data.device.attributes, afterRender: $data.afterAttributeRender }" class="attributes"></span></div></li></script><script id="huezlllight-attribute-template" type="text/template"><!-- ko if: $data.name !== 'state' && $data.name !== 'dimlevel' && $data.name !== 'reachable' && $data.name !== 'ct' && $data.name !== 'hue' && $data.name !== 'sat' && $data.name !== 'colormode' -->
  109. <!-- ko template: {name: 'attribute-template', data: $data} --><!-- /ko -->
  110. <!-- /ko --></script><div id="toasts" data-bind="foreach: toastMessages"><ui-toast data-role="toast" data-bind="toast: $data.message" class="ui-corner-all"></ui-toast></div><div class="ui-loader-background"></div></body></html>
Advertisement
RAW Paste Data Copied
Advertisement