Advertisement
Guest User

Untitled

a guest
Jun 10th, 2024
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 122.69 KB | None | 0 0
  1. openapi: 3.0.0
  2. info:
  3. description: >
  4. Interface to the HVAC unit equipped with the aMotion control system.
  5. This API can by called as a standart http API, or used by websocket.
  6. Websocket connection should be made to ws://url:port/api/ws'.
  7. Connection is text message based and uses JSON encoding.
  8. When login is used, returned token is automaticaly stored to the active connection and requests are automaticaly assigned to it.
  9. The token is necessary only for requests via HTTP API.
  10. The expected format of the websocket request is Schema WebsocketRequest, the response is as Schema WebsocketResponse.
  11. When user is authorized in the Websocket then events are routed to this socket. Expected format of events is Schema Event.
  12. version: 1.0.1
  13. title: 'aMotion device API'
  14. termsOfService: 'https://amotion.cloud/terms/'
  15. contact:
  16. email: 'api@amotion.cloud'
  17. tags:
  18. - name: 'controller data'
  19. description: 'Current status data from the controller'
  20. - name: 'control'
  21. description: 'Setting and monitor of the control parameters for the HVAC device operation'
  22. - name: 'user'
  23. description: 'User data and setting operation'
  24. - name: 'system'
  25. description: 'Endpoints for the system maintenace and info'
  26. - name: 'settings'
  27. description: 'Support system setting'
  28. paths:
  29. '/ui_control_scheme':
  30. get:
  31. tags:
  32. - 'control'
  33. description: 'Gets the relevant variables to be displayed or controlled'
  34. operationId: 'uiControlScheme'
  35. responses:
  36. "200":
  37. description: ""
  38. content:
  39. application/json:
  40. schema:
  41. properties:
  42. code:
  43. type: string
  44. example: "OK"
  45. error:
  46. type: string
  47. example: null
  48. response:
  49. $ref: '#/components/schemas/UiControlScheme'
  50. "400":
  51. description: ""
  52. content:
  53. application/json:
  54. schema:
  55. properties:
  56. code:
  57. type: string
  58. example: BAD_REQUEST
  59. error:
  60. type: string
  61. example: 'Data is not avalaible'
  62. security:
  63. - api_key: []
  64. '/ui_control_scheme/all':
  65. get:
  66. tags:
  67. - 'control'
  68. description: 'Gets all variables to be displayed or controlled including unusable variables'
  69. operationId: 'uiControlSchemeAll'
  70. responses:
  71. "200":
  72. description: ""
  73. content:
  74. application/json:
  75. schema:
  76. properties:
  77. code:
  78. type: string
  79. example: "OK"
  80. error:
  81. type: string
  82. example: null
  83. response:
  84. $ref: '#/components/schemas/UiControlScheme'
  85. "400":
  86. description: ""
  87. content:
  88. application/json:
  89. schema:
  90. properties:
  91. code:
  92. type: string
  93. example: BAD_REQUEST
  94. error:
  95. type: string
  96. example: 'Data is not avalaible'
  97. security:
  98. - api_key: []
  99. '/ui_info_scheme':
  100. get:
  101. tags:
  102. - 'controller data'
  103. description: 'Gets the relevant variables to be watched'
  104. operationId: 'uiInfoScheme'
  105. responses:
  106. "200":
  107. description: ""
  108. content:
  109. application/json:
  110. schema:
  111. properties:
  112. code:
  113. type: string
  114. example: BAD_REQUEST
  115. error:
  116. type: string
  117. example: null
  118. response:
  119. $ref: '#/components/schemas/UiInfoScheme'
  120. "400":
  121. description: ""
  122. content:
  123. application/json:
  124. schema:
  125. properties:
  126. code:
  127. type: string
  128. example: BAD_REQUEST
  129. error:
  130. type: string
  131. example: 'Data is not avalaible'
  132. security:
  133. - api_key: []
  134. '/ui_diagram_scheme':
  135. get:
  136. tags:
  137. - 'controller data'
  138. description: 'Gets the relevant variables to be watched'
  139. operationId: 'uiDiagramScheme'
  140. responses:
  141. "200":
  142. description: ""
  143. content:
  144. application/json:
  145. schema:
  146. properties:
  147. code:
  148. type: string
  149. example: BAD_REQUEST
  150. error:
  151. type: string
  152. example: null
  153. response:
  154. type: object
  155. properties:
  156. baseStates:
  157. type: array
  158. items:
  159. $ref: "#/components/schemas/UiDiagramSchemeStatus"
  160. "400":
  161. description: ""
  162. content:
  163. application/json:
  164. schema:
  165. properties:
  166. code:
  167. type: string
  168. example: BAD_REQUEST
  169. error:
  170. type: string
  171. example: 'Data is not avalaible'
  172. security:
  173. - api_key: []
  174. '/ui_diagram_data':
  175. get:
  176. tags:
  177. - 'controller data'
  178. description: 'Gets the variables and their values for the diagram, when they are not in the ui_info'
  179. operationId: 'uiDiagramData'
  180. responses:
  181. "200":
  182. description: ""
  183. content:
  184. application/json:
  185. schema:
  186. properties:
  187. code:
  188. type: string
  189. example: OK
  190. error:
  191. type: string
  192. example: null
  193. response:
  194. type: object
  195. additionalProperties:
  196. oneOf:
  197. - type: number
  198. - type: string
  199. - type: boolean
  200. example:
  201. temp_request: true
  202. fan_power_req: false
  203. temp_eha: 25.6
  204. "400":
  205. description: ""
  206. content:
  207. application/json:
  208. schema:
  209. properties:
  210. code:
  211. type: string
  212. example: BAD_REQUEST
  213. error:
  214. type: string
  215. example: 'Data is not avalaible'
  216. security:
  217. - api_key: []
  218. /control:
  219. post:
  220. tags:
  221. - control
  222. description: 'Set the control request'
  223. operationId: 'control'
  224. requestBody:
  225. content:
  226. application/json:
  227. schema:
  228. $ref: '#/components/schemas/VariableControl'
  229. description: 'List of variables to be controlled'
  230. required: true
  231. responses:
  232. "200":
  233. description: ""
  234. content:
  235. application/json:
  236. schema:
  237. properties:
  238. code:
  239. type: string
  240. example: OK
  241. error:
  242. type: string
  243. example: null
  244. response:
  245. $ref: '#/components/schemas/VariableControlResponse'
  246. "400":
  247. description: ""
  248. content:
  249. application/json:
  250. schema:
  251. properties:
  252. code:
  253. type: string
  254. example: BAD_REQUEST
  255. error:
  256. type: string
  257. example: 'Bad control request'
  258. security:
  259. - api_key: []
  260. /config:
  261. post:
  262. tags:
  263. - control
  264. description: 'Set the config request (users parameters)'
  265. operationId: 'config'
  266. requestBody:
  267. content:
  268. application/json:
  269. schema:
  270. $ref: '#/components/schemas/VariableConfig'
  271. description: 'List of config variables to be set'
  272. required: true
  273. responses:
  274. "200":
  275. description: ""
  276. content:
  277. application/json:
  278. schema:
  279. $ref: '#/components/schemas/Success'
  280. "400":
  281. description: ""
  282. content:
  283. application/json:
  284. schema:
  285. properties:
  286. code:
  287. type: string
  288. example: BAD_REQUEST
  289. error:
  290. type: string
  291. example: 'Bad control request'
  292. security:
  293. - api_key: []
  294. '/user_config_get':
  295. get:
  296. tags:
  297. - 'controller data'
  298. description: 'Gets the user config variables and values'
  299. operationId: 'userConfigGet'
  300. responses:
  301. "200":
  302. description: ""
  303. content:
  304. application/json:
  305. schema:
  306. properties:
  307. code:
  308. type: string
  309. example: OK
  310. error:
  311. type: string
  312. example: null
  313. response:
  314. $ref: '#/components/schemas/VariableConfig'
  315. "400":
  316. description: ""
  317. content:
  318. application/json:
  319. schema:
  320. properties:
  321. code:
  322. type: string
  323. example: BAD_REQUEST
  324. error:
  325. type: string
  326. example: 'Data is not avalaible'
  327. security:
  328. - api_key: []
  329. /ui_info:
  330. get:
  331. tags:
  332. - control
  333. description: Gets info with the same structure as the ui_info event
  334. operationId: 'uiInfo'
  335. responses:
  336. "200":
  337. description: "Current values from ui_info structure"
  338. content:
  339. application/json:
  340. schema:
  341. properties:
  342. code:
  343. type: string
  344. example: "OK"
  345. error:
  346. type: string
  347. example: null
  348. nullable: true
  349. result:
  350. $ref: "#/components/schemas/UiInfo"
  351. /support:
  352. get:
  353. tags:
  354. - system
  355. description: Gets technical support info
  356. operationId: 'support'
  357. responses:
  358. "200":
  359. description: "Support info"
  360. content:
  361. application/json:
  362. schema:
  363. properties:
  364. code:
  365. type: string
  366. example: "OK"
  367. error:
  368. type: string
  369. example: null
  370. nullable: true
  371. result:
  372. type: object
  373. properties:
  374. distributor:
  375. type: object
  376. properties:
  377. name:
  378. type: string
  379. example: "Chosen distributor"
  380. telephone:
  381. type: string
  382. example: "+420 700 123 456"
  383. email:
  384. type: string
  385. example: "contact@distributor.com"
  386. technician:
  387. type: object
  388. properties:
  389. name:
  390. type: string
  391. example: "My Technician"
  392. telephone:
  393. type: string
  394. example: "+420 700 123 458"
  395. email:
  396. type: string
  397. example: "contact@technician.com"
  398.  
  399. /control_panel:
  400. get:
  401. tags:
  402. - control
  403. description: '<p>Gets the current status of the control panel including control requests<br>origin: the group of request before the last request change<br>stored: the stored values of the user requests to permanent memory<br>current: the current values of the user requests</p>'
  404. operationId: 'controlPanel'
  405. responses:
  406. "200":
  407. description: "Actual values from control_panel structure"
  408. content:
  409. application/json:
  410. schema:
  411. properties:
  412. code:
  413. type: string
  414. example: "OK"
  415. error:
  416. type: string
  417. example: null
  418. nullable: true
  419. result:
  420. type: object
  421. properties:
  422. control_panel:
  423. $ref: "#/components/schemas/controlPanelContent"
  424. security:
  425. - api_key: []
  426. /control_admin/config/set_scene:
  427. post:
  428. tags:
  429. - control
  430. description: 'Add, Remove or edit scene'
  431. operationId: 'setScene'
  432. requestBody:
  433. content:
  434. application/json:
  435. schema:
  436. type: object
  437. properties:
  438. command:
  439. type: string
  440. enum:
  441. - create
  442. - remove
  443. - edit
  444. scene:
  445. $ref: "#/components/schemas/Scene"
  446. required: true
  447. responses:
  448. "200":
  449. description: ""
  450. content:
  451. application/json:
  452. schema:
  453. $ref: '#/components/schemas/SetOperationResponse'
  454. "400":
  455. description: ""
  456. content:
  457. application/json:
  458. schema:
  459. $ref: '#/components/schemas/OperationFailed'
  460. security:
  461. - api_key: []
  462. /control_admin/config/get_scenes:
  463. get:
  464. tags:
  465. - control
  466. description: 'Returns list of scenes'
  467. operationId: 'getScenes'
  468. responses:
  469. "200":
  470. description: ""
  471. content:
  472. application/json:
  473. schema:
  474. properties:
  475. code:
  476. type: string
  477. example: "OK"
  478. error:
  479. type: string
  480. example: null
  481. result:
  482. type: object
  483. properties:
  484. get_scenes_config:
  485. type: array
  486. items:
  487. $ref: '#/components/schemas/Scene'
  488. "400":
  489. description: ""
  490. content:
  491. application/json:
  492. schema:
  493. $ref: '#/components/schemas/OperationFailed'
  494. security:
  495. - api_key: []
  496. /control_admin/config/get_scenes_template:
  497. get:
  498. tags:
  499. - control
  500. description: 'Returns list of default scenes'
  501. operationId: 'getScenesTemplate'
  502. responses:
  503. "200":
  504. description: ""
  505. content:
  506. application/json:
  507. schema:
  508. properties:
  509. code:
  510. type: string
  511. example: "OK"
  512. error:
  513. type: string
  514. example: null
  515. result:
  516. type: object
  517. properties:
  518. get_scenes_config_template:
  519. type: array
  520. items:
  521. $ref: '#/components/schemas/Scene'
  522. "400":
  523. description: ""
  524. content:
  525. application/json:
  526. schema:
  527. $ref: '#/components/schemas/OperationFailed'
  528. security:
  529. - api_key: []
  530. /control_admin/config/scenes_reset:
  531. get:
  532. tags:
  533. - control
  534. description: 'Loads the default scenes, triggers and schedulers'
  535. operationId: 'scenesReset'
  536. responses:
  537. "200":
  538. description: ""
  539. content:
  540. application/json:
  541. schema:
  542. properties:
  543. code:
  544. type: string
  545. example: "OK"
  546. error:
  547. type: string
  548. example: null
  549. result:
  550. type: object
  551. properties:
  552. scenes_reset:
  553. type: array
  554. items:
  555. $ref: '#/components/schemas/Scene'
  556. "400":
  557. description: ""
  558. content:
  559. application/json:
  560. schema:
  561. $ref: '#/components/schemas/OperationFailed'
  562. security:
  563. - api_key: []
  564.  
  565. /control_admin/config/get_triggers:
  566. get:
  567. tags:
  568. - control
  569. description: 'Returns list of triggers'
  570. operationId: 'getTriggers'
  571. responses:
  572. "200":
  573. description: ""
  574. content:
  575. application/json:
  576. schema:
  577. properties:
  578. code:
  579. type: string
  580. example: "OK"
  581. error:
  582. type: string
  583. example: null
  584. result:
  585. type: object
  586. properties:
  587. get_triggers_config:
  588. type: array
  589. items:
  590. $ref: '#/components/schemas/Trigger'
  591. "400":
  592. description: ""
  593. content:
  594. application/json:
  595. schema:
  596. $ref: '#/components/schemas/OperationFailed'
  597. security:
  598. - api_key: []
  599. /control_admin/config/get_triggers_template:
  600. get:
  601. tags:
  602. - control
  603. description: 'Returns list of triggers'
  604. operationId: 'getTriggersTemplate'
  605. responses:
  606. "200":
  607. description: ""
  608. content:
  609. application/json:
  610. schema:
  611. properties:
  612. code:
  613. type: string
  614. example: "OK"
  615. error:
  616. type: string
  617. example: null
  618. result:
  619. type: object
  620. properties:
  621. get_triggers_config_template:
  622. type: array
  623. items:
  624. $ref: '#/components/schemas/Trigger'
  625. "400":
  626. description: ""
  627. content:
  628. application/json:
  629. schema:
  630. $ref: '#/components/schemas/OperationFailed'
  631. security:
  632. - api_key: []
  633.  
  634. /control_admin/config/get_trigger_functions:
  635. get:
  636. tags:
  637. - control
  638. description: 'Returns list of trigger functions'
  639. operationId: 'getTriggerFunctions'
  640. responses:
  641. "200":
  642. description: ""
  643. content:
  644. application/json:
  645. schema:
  646. properties:
  647. code:
  648. type: string
  649. example: "OK"
  650. error:
  651. type: string
  652. example: null
  653. result:
  654. type: object
  655. properties:
  656. get_trigger_functions:
  657. type: array
  658. items:
  659. $ref: '#/components/schemas/triggerFunction'
  660. "400":
  661. description: ""
  662. content:
  663. application/json:
  664. schema:
  665. $ref: '#/components/schemas/OperationFailed'
  666. security:
  667. - api_key: []
  668. /control_admin/config/get_triggered_variable_list:
  669. get:
  670. tags:
  671. - control
  672. description: 'Returns list of the processed variables by triggers'
  673. operationId: 'getTriggersVars'
  674. responses:
  675. "200":
  676. description: ""
  677. content:
  678. application/json:
  679. schema:
  680. properties:
  681. code:
  682. type: string
  683. example: OK
  684. error:
  685. type: string
  686. example: null
  687. result:
  688. type: object
  689. properties:
  690. get_triggered_variable_list:
  691. type: array
  692. items:
  693. $ref: '#/components/schemas/triggeredVariable'
  694. "400":
  695. description: ""
  696. content:
  697. application/json:
  698. schema:
  699. $ref: '#/components/schemas/OperationFailed'
  700. security:
  701. - api_key: []
  702. /control_admin/config/get_scheduler:
  703. get:
  704. tags:
  705. - control
  706. description: 'Returns list of schedulers/calendars content'
  707. operationId: 'getScheduler'
  708. responses:
  709. "200":
  710. description: ""
  711. content:
  712. application/json:
  713. schema:
  714. properties:
  715. code:
  716. type: string
  717. example: OK
  718. error:
  719. type: string
  720. example: null
  721. result:
  722. type: object
  723. properties:
  724. get_scheduler:
  725. $ref: '#/components/schemas/SchedulerConfig'
  726. "400":
  727. description: ""
  728. content:
  729. application/json:
  730. schema:
  731. $ref: '#/components/schemas/OperationFailed'
  732. security:
  733. - api_key: []
  734. /control_admin/config/set_scheduler:
  735. post:
  736. tags:
  737. - control
  738. description: 'Assignes the chosen calendar to the heating season and to the non-heating season.'
  739. operationId: 'setScheduler'
  740. requestBody:
  741. content:
  742. application/json:
  743. schema:
  744. type: object
  745. properties:
  746. control:
  747. $ref: '#/components/schemas/SchedulerControlType'
  748. heatingSeasonCalendarId:
  749. type: integer
  750. description: calendar ID for the heating season (If control = SEASON)
  751. example: 2
  752. nonheatingSeasonCalendarId:
  753. type: integer
  754. description: calendar ID for the non-heating season (If control = SEASON)
  755. example: 2
  756. responses:
  757. "200":
  758. description: ""
  759. content:
  760. application/json:
  761. schema:
  762. properties:
  763. code:
  764. type: string
  765. example: OK
  766. error:
  767. type: string
  768. example: null
  769. result:
  770. type: object
  771. properties:
  772. get_scheduler:
  773. $ref: '#/components/schemas/SchedulerConfig'
  774. "400":
  775. description: ""
  776. content:
  777. application/json:
  778. schema:
  779. $ref: '#/components/schemas/OperationFailed'
  780. security:
  781. - api_key: []
  782. /control_admin/config/get_scheduler_template:
  783. get:
  784. tags:
  785. - control
  786. description: 'Returns list of scheduler plans'
  787. operationId: 'getSchedulerTemplate'
  788. responses:
  789. "200":
  790. description: ""
  791. content:
  792. application/json:
  793. schema:
  794. properties:
  795. code:
  796. type: string
  797. example: OK
  798. error:
  799. type: string
  800. example: null
  801. result:
  802. type: object
  803. properties:
  804. get_scheduler_template:
  805. $ref: '#/components/schemas/SchedulerConfig'
  806. "400":
  807. description: ""
  808. content:
  809. application/json:
  810. schema:
  811. $ref: '#/components/schemas/OperationFailed'
  812. security:
  813. - api_key: []
  814. /control_admin/config/get_calendars:
  815. get:
  816. tags:
  817. - control
  818. description: 'Returns list of calendars-name and ID'
  819. operationId: 'getCalendars'
  820. responses:
  821. "200":
  822. description: ""
  823. content:
  824. application/json:
  825. schema:
  826. properties:
  827. code:
  828. type: string
  829. example: OK
  830. error:
  831. type: string
  832. example: null
  833. result:
  834. type: object
  835. properties:
  836. get_calendars:
  837. $ref: '#/components/schemas/SchedulerConfigLite'
  838. "400":
  839. description: ""
  840. content:
  841. application/json:
  842. schema:
  843. $ref: '#/components/schemas/OperationFailed'
  844. security:
  845. - api_key: []
  846. /control_admin/config/get_calendar:
  847. post:
  848. tags:
  849. - control
  850. description: 'Returns content of calendar with specified ID and day'
  851. operationId: 'getCalendar'
  852. requestBody:
  853. content:
  854. application/json:
  855. schema:
  856. type: object
  857. properties:
  858. calendarId:
  859. type: number
  860. responses:
  861. "200":
  862. description: ""
  863. content:
  864. application/json:
  865. schema:
  866. properties:
  867. code:
  868. type: string
  869. example: OK
  870. error:
  871. type: string
  872. example: null
  873. result:
  874. type: object
  875. properties:
  876. get_calendar:
  877. $ref: '#/components/schemas/SchedulerCalendar'
  878. "400":
  879. description: ""
  880. content:
  881. application/json:
  882. schema:
  883. $ref: '#/components/schemas/OperationFailed'
  884. security:
  885. - api_key: []
  886. /control_admin/config/set_scheduler_plan_item:
  887. post:
  888. tags:
  889. - control
  890. description: 'Add, Remove or edit scheduler'
  891. operationId: 'setSchedulerPlanItem'
  892. requestBody:
  893. content:
  894. application/json:
  895. schema:
  896. type: object
  897. properties:
  898. command:
  899. type: string
  900. enum:
  901. - create
  902. - remove
  903. - edit
  904. scheduler:
  905. $ref: '#/components/schemas/SchedulerPlanItem'
  906. required: true
  907. responses:
  908. "200":
  909. description: ""
  910. content:
  911. application/json:
  912. schema:
  913. $ref: '#/components/schemas/SetOperationResponse'
  914. "400":
  915. description: ""
  916. content:
  917. application/json:
  918. schema:
  919. $ref: '#/components/schemas/OperationFailed'
  920. security:
  921. - api_key: []
  922. /control_admin/config/set_calendar:
  923. post:
  924. tags:
  925. - control
  926. description: 'Adds new calendar'
  927. operationId: 'setCalendar'
  928. requestBody:
  929. content:
  930. application/json:
  931. schema:
  932. type: object
  933. properties:
  934. scheduler_calendar_name:
  935. type: string
  936. description: 'Name of the new calendar'
  937. example: 'Hot summer'
  938. required: true
  939. responses:
  940. "200":
  941. description: ""
  942. content:
  943. application/json:
  944. schema:
  945. type: object
  946. properties:
  947. code:
  948. type: string
  949. example: "OK"
  950. error:
  951. type: string
  952. example: "OK"
  953. response:
  954. type: object
  955. properties:
  956. scheduler_calendar_id:
  957. type: integer
  958. description: 'ID of the new calendar'
  959. example: 22
  960. "400":
  961. description: ""
  962. content:
  963. application/json:
  964. schema:
  965. $ref: '#/components/schemas/OperationFailed'
  966. security:
  967. - api_key: []
  968. /control_admin/config/remove_calendar:
  969. post:
  970. tags:
  971. - control
  972. description: 'Remove calendar with specified ID'
  973. operationId: 'removeCalendar'
  974. requestBody:
  975. content:
  976. application/json:
  977. schema:
  978. type: object
  979. properties:
  980. id:
  981. type: integer
  982. format: 'uint32'
  983. example: 35
  984. required: true
  985. responses:
  986. "200":
  987. description: ""
  988. content:
  989. application/json:
  990. schema:
  991. $ref: '#/components/schemas/Success'
  992. "400":
  993. description: ""
  994. content:
  995. application/json:
  996. schema:
  997. $ref: '#/components/schemas/OperationFailed'
  998. security:
  999. - api_key: []
  1000. /control_admin/config/edit_calendar:
  1001. post:
  1002. tags:
  1003. - control
  1004. description: 'Edit content of calendar specified Iby the ID'
  1005. operationId: 'editCalendar'
  1006. requestBody:
  1007. content:
  1008. application/json:
  1009. schema:
  1010. type: object
  1011. properties:
  1012. id:
  1013. type: integer
  1014. format: 'uint32'
  1015. example: 35
  1016. name:
  1017. type: string
  1018. description: Name of the calendar
  1019. holidayEnable:
  1020. type: boolean
  1021. description: Public holidays are allowed to use
  1022. required:
  1023. - id
  1024. responses:
  1025. "200":
  1026. description: ""
  1027. content:
  1028. application/json:
  1029. schema:
  1030. $ref: '#/components/schemas/Success'
  1031. "400":
  1032. description: ""
  1033. content:
  1034. application/json:
  1035. schema:
  1036. $ref: '#/components/schemas/OperationFailed'
  1037. security:
  1038. - api_key: []
  1039. /control_admin/config/activate_calendar:
  1040. post:
  1041. tags:
  1042. - control
  1043. description: 'Activation of the chosen calendar by the ID of the calendar'
  1044. operationId: 'activateCalendar'
  1045. requestBody:
  1046. content:
  1047. application/json:
  1048. schema:
  1049. type: object
  1050. properties:
  1051. calendarId:
  1052. type: integer
  1053. format: 'uint32'
  1054. example: 35
  1055. required: true
  1056. responses:
  1057. "200":
  1058. description: ""
  1059. content:
  1060. application/json:
  1061. schema:
  1062. $ref: '#/components/schemas/Success'
  1063. "400":
  1064. description: ""
  1065. content:
  1066. application/json:
  1067. schema:
  1068. properties:
  1069. code:
  1070. type: number
  1071. example: 400
  1072. error:
  1073. type: string
  1074. example: 'Operation failed'
  1075. security:
  1076. - api_key: []
  1077. /control_admin/config/apply_calendar:
  1078. get:
  1079. tags:
  1080. - control
  1081. description: 'The active calendar is screened according to the current time, the scene from the actual calender record is applied'
  1082. operationId: 'applyCalendar'
  1083. responses:
  1084. "200":
  1085. description: ""
  1086. content:
  1087. application/json:
  1088. schema:
  1089. $ref: '#/components/schemas/Success'
  1090. "400":
  1091. description: ""
  1092. content:
  1093. application/json:
  1094. schema:
  1095. properties:
  1096. code:
  1097. type: number
  1098. example: 400
  1099. error:
  1100. type: string
  1101. example: 'Operation failed'
  1102. security:
  1103. - api_key: []
  1104. /control_admin/config/activate_scene:
  1105. post:
  1106. tags:
  1107. - control
  1108. description: 'Activates the scene specified by the ID'
  1109. operationId: 'activateScene'
  1110. requestBody:
  1111. content:
  1112. application/json:
  1113. schema:
  1114. type: object
  1115. properties:
  1116. sceneId:
  1117. type: integer
  1118. format: 'uint32'
  1119. example: 35
  1120. required: true
  1121. responses:
  1122. "200":
  1123. description: ""
  1124. content:
  1125. application/json:
  1126. schema:
  1127. $ref: '#/components/schemas/Success'
  1128. "400":
  1129. description: ""
  1130. content:
  1131. application/json:
  1132. schema:
  1133. properties:
  1134. code:
  1135. type: number
  1136. example: 400
  1137. error:
  1138. type: string
  1139. example: 'Operation failed'
  1140. security:
  1141. - api_key: []
  1142. /control_admin/config/disposable_plan/set:
  1143. post:
  1144. tags:
  1145. - control
  1146. description: Sets the data for the temporary plan - one shot scene activation
  1147. operationId: 'setDisposablePlan'
  1148. requestBody:
  1149. content:
  1150. application/json:
  1151. schema:
  1152. $ref: '#/components/schemas/DisposablePlan'
  1153. required: true
  1154. responses:
  1155. "200":
  1156. description: ""
  1157. content:
  1158. application/json:
  1159. schema:
  1160. properties:
  1161. code:
  1162. type: string
  1163. example: OK
  1164. error:
  1165. type: string
  1166. example: null
  1167. result:
  1168. $ref: '#/components/schemas/DisposablePlan'
  1169. "400":
  1170. description: ""
  1171. content:
  1172. application/json:
  1173. schema:
  1174. properties:
  1175. code:
  1176. type: number
  1177. example: 400
  1178. error:
  1179. type: string
  1180. example: 'Operation failed'
  1181. security:
  1182. - api_key: []
  1183. /control_admin/config/disposable_plan/get:
  1184. get:
  1185. tags:
  1186. - control
  1187. description: Get the currant status of temporary plan
  1188. operationId: 'getDisposablePlan'
  1189. responses:
  1190. "200":
  1191. description: ""
  1192. content:
  1193. application/json:
  1194. schema:
  1195. properties:
  1196. code:
  1197. type: string
  1198. example: OK
  1199. error:
  1200. type: string
  1201. example: null
  1202. result:
  1203. $ref: '#/components/schemas/DisposablePlan'
  1204. "400":
  1205. description: ""
  1206. content:
  1207. application/json:
  1208. schema:
  1209. properties:
  1210. code:
  1211. type: number
  1212. example: 400
  1213. error:
  1214. type: string
  1215. example: 'Operation failed'
  1216. security:
  1217. - api_key: []
  1218. /control_admin/config/moments/get:
  1219. get:
  1220. tags:
  1221. - control
  1222. description: Gets the fans operating time, filtres maintenence and inspection time
  1223. operationId: 'getMoments'
  1224. responses:
  1225. "200":
  1226. description: ""
  1227. content:
  1228. application/json:
  1229. schema:
  1230. properties:
  1231. code:
  1232. type: string
  1233. example: OK
  1234. error:
  1235. type: string
  1236. example: null
  1237. response:
  1238. $ref: '#/components/schemas/MomentData'
  1239. "400":
  1240. description: ""
  1241. content:
  1242. application/json:
  1243. schema:
  1244. properties:
  1245. code:
  1246. type: number
  1247. example: 400
  1248. error:
  1249. type: string
  1250. example: 'Operation failed'
  1251. security:
  1252. - api_key: []
  1253. /control_admin/config/moments/set:
  1254. post:
  1255. tags:
  1256. - control
  1257. description: 'Sets the operative data, e.g. date of filter change, device inspection date, fan working hours reset.'
  1258. operationId: 'setMoments'
  1259. requestBody:
  1260. content:
  1261. application/json:
  1262. schema:
  1263. $ref: '#/components/schemas/MomentData'
  1264. required: true
  1265. responses:
  1266. "200":
  1267. description: ""
  1268. content:
  1269. application/json:
  1270. schema:
  1271. $ref: '#/components/schemas/Success'
  1272. "400":
  1273. description: ""
  1274. content:
  1275. application/json:
  1276. schema:
  1277. properties:
  1278. code:
  1279. type: number
  1280. example: 400
  1281. error:
  1282. type: string
  1283. example: 'Operation failed'
  1284. security:
  1285. - api_key: []
  1286. /control_admin/config/moments/reset/{id}:
  1287. get:
  1288. tags:
  1289. - control
  1290. description: 'Reset of the operation data, e.g. date of filter change or fans working hours'
  1291. operationId: 'resetMoments'
  1292. parameters:
  1293. - name: "id"
  1294. in: "path"
  1295. description: "Type of reset"
  1296. required: true
  1297. schema:
  1298. type: string
  1299. enum:
  1300. - filter
  1301. - uvlamp
  1302. example: filter
  1303. responses:
  1304. "200":
  1305. description: ""
  1306. content:
  1307. application/json:
  1308. schema:
  1309. $ref: '#/components/schemas/Success'
  1310. "400":
  1311. description: ""
  1312. content:
  1313. application/json:
  1314. schema:
  1315. properties:
  1316. code:
  1317. type: number
  1318. example: 400
  1319. error:
  1320. type: string
  1321. example: 'Operation failed'
  1322. security:
  1323. - api_key: []
  1324. /control_admin/config/duplicate_calendar_day:
  1325. post:
  1326. tags:
  1327. - control
  1328. description: 'Duplicate the chosen day of the calendar'
  1329. operationId: 'duplicateCalendarDay'
  1330. requestBody:
  1331. content:
  1332. application/json:
  1333. schema:
  1334. type: object
  1335. properties:
  1336. calendarId:
  1337. type: integer
  1338. format: 'uint32'
  1339. example: 35
  1340. description: Use this calendar ID if you want to duplicate day in the same calendar. Don't use it when you want to duplicate day between different calendars
  1341. calendarId_src:
  1342. type: integer
  1343. format: 'uint32'
  1344. example: 35
  1345. description: Use this calendar ID as a source calendar if you want to duplicate day between different calendars
  1346. calendarId_dest:
  1347. type: integer
  1348. format: 'uint32'
  1349. example: 35
  1350. description: Use this calendar ID as a distance calendar if you want to duplicate day between different calendars
  1351. dayOfWeek_src:
  1352. description: 'Source calendar day'
  1353. $ref: '#/components/schemas/DayOfWeek'
  1354. dayOfWeek_dest:
  1355. description: 'Destination calendar day'
  1356. $ref: '#/components/schemas/DayOfWeek'
  1357. example: Tue
  1358. required: true
  1359. responses:
  1360. "200":
  1361. description: ""
  1362. content:
  1363. application/json:
  1364. schema:
  1365. properties:
  1366. code:
  1367. type: number
  1368. example: 200
  1369. error:
  1370. type: string
  1371. example: null
  1372. result:
  1373. type: object
  1374. properties:
  1375. get_schedulers:
  1376. $ref: '#/components/schemas/SchedulerConfig'
  1377. "400":
  1378. description: ""
  1379. content:
  1380. application/json:
  1381. schema:
  1382. properties:
  1383. code:
  1384. type: number
  1385. example: 400
  1386. error:
  1387. type: string
  1388. example: 'Operation failed'
  1389. security:
  1390. - api_key: []
  1391.  
  1392. /control_admin/config/enable_trigger_function:
  1393. post:
  1394. tags:
  1395. - control
  1396. description: 'Turns the trigger function On or Off'
  1397. operationId: 'enableTriggerFunction'
  1398. requestBody:
  1399. content:
  1400. application/json:
  1401. schema:
  1402. type: object
  1403. properties:
  1404. id:
  1405. type: number
  1406. description: Unique ID of the trigger function
  1407. example: 1
  1408. enabled:
  1409. type: boolean
  1410. description: FALSE = Off, TRUE = On
  1411. example: true
  1412. responses:
  1413. "200":
  1414. description: ""
  1415. content:
  1416. application/json:
  1417. schema:
  1418. $ref: '#/components/schemas/Success'
  1419. "400":
  1420. description: ""
  1421. content:
  1422. application/json:
  1423. schema:
  1424. properties:
  1425. code:
  1426. type: number
  1427. example: 400
  1428. error:
  1429. type: string
  1430. example: 'Operation failed'
  1431. security:
  1432. - api_key: []
  1433. /control_admin/config/set_calendar_plan:
  1434. post:
  1435. tags:
  1436. - control
  1437. description: 'Sets the record in the plan of calendare activation according to dates'
  1438. operationId: 'setCalendarPlan'
  1439. requestBody:
  1440. content:
  1441. application/json:
  1442. schema:
  1443. type: object
  1444. properties:
  1445. calendar_plans:
  1446. type: array
  1447. description: 'Array of the plans'
  1448. items:
  1449. $ref: '#/components/schemas/SchedulerCalendarPlan'
  1450. responses:
  1451. "200":
  1452. description: ""
  1453. content:
  1454. application/json:
  1455. schema:
  1456. $ref: '#/components/schemas/Success'
  1457. "400":
  1458. description: ""
  1459. content:
  1460. application/json:
  1461. schema:
  1462. properties:
  1463. code:
  1464. type: number
  1465. example: 400
  1466. error:
  1467. type: string
  1468. example: 'Operation failed'
  1469. security:
  1470. - api_key: []
  1471. /control_admin/config/set_holidays:
  1472. post:
  1473. tags:
  1474. - control
  1475. description: 'Sets the dates of holidays and vacation for the Holiday usage in calendars'
  1476. operationId: 'setHolidays'
  1477. requestBody:
  1478. content:
  1479. application/json:
  1480. schema:
  1481. type: object
  1482. properties:
  1483. holidays:
  1484. type: array
  1485. description: 'Array of the public holidays'
  1486. items:
  1487. $ref: '#/components/schemas/PublicHoliday'
  1488. responses:
  1489. "200":
  1490. description: ""
  1491. content:
  1492. application/json:
  1493. schema:
  1494. $ref: '#/components/schemas/Success'
  1495. "400":
  1496. description: ""
  1497. content:
  1498. application/json:
  1499. schema:
  1500. properties:
  1501. code:
  1502. type: number
  1503. example: 400
  1504. error:
  1505. type: string
  1506. example: 'Operation failed'
  1507. security:
  1508. - api_key: []
  1509. /get_triggers_report:
  1510. get:
  1511. tags:
  1512. - control
  1513. description: 'Returns list of trigger`s reports'
  1514. operationId: 'getTriggersReport'
  1515. responses:
  1516. "200":
  1517. description: ""
  1518. content:
  1519. application/json:
  1520. schema:
  1521. properties:
  1522. code:
  1523. type: string
  1524. example: "OK"
  1525. error:
  1526. type: string
  1527. example: null
  1528. result:
  1529. type: object
  1530. properties:
  1531. get_triggers_report:
  1532. type: array
  1533. items:
  1534. $ref: '#/components/schemas/TriggerReport'
  1535. "400":
  1536. description: ""
  1537. content:
  1538. application/json:
  1539. schema:
  1540. properties:
  1541. code:
  1542. type: number
  1543. example: 400
  1544. error:
  1545. type: string
  1546. example: 'Trigger`s reports are not available'
  1547. security:
  1548. - api_key: []
  1549. /login:
  1550. post:
  1551. tags:
  1552. - user
  1553. description: 'User login. Returns the API token'
  1554. operationId: 'login'
  1555. requestBody:
  1556. content:
  1557. application/json:
  1558. schema:
  1559. oneOf:
  1560. - $ref: "#/components/schemas/UserLogin"
  1561. - $ref: '#/components/schemas/TokenLogin'
  1562. description: 'Login to register to the system, returns the API Token'
  1563. required: true
  1564. responses:
  1565. "200":
  1566. description: ""
  1567. content:
  1568. application/json:
  1569. schema:
  1570. properties:
  1571. code:
  1572. type: string
  1573. example: "OK"
  1574. error:
  1575. type: string
  1576. example: null
  1577. response:
  1578. type: string
  1579. description: 'Valid API Token'
  1580. example: 'ATCsiinmgssw745'
  1581. "400":
  1582. description: ""
  1583. content:
  1584. application/json:
  1585. schema:
  1586. properties:
  1587. code:
  1588. type: string
  1589. example: "BAD_PASSWORD"
  1590. error:
  1591. type: string
  1592. example: 'Bad username or passoword'
  1593. /logout:
  1594. get:
  1595. tags:
  1596. - user
  1597. description: "Logout current token"
  1598. operationId: 'logout'
  1599. responses:
  1600. "200":
  1601. description: "Succesfull logout"
  1602. content:
  1603. application/json:
  1604. schema:
  1605. properties:
  1606. code:
  1607. type: string
  1608. example: "OK"
  1609. error:
  1610. type: string
  1611. example: null
  1612. response:
  1613. type: string
  1614. example: "OK"
  1615. "400":
  1616. description: "Nonexistent token"
  1617. content:
  1618. application/json:
  1619. schema:
  1620. properties:
  1621. code:
  1622. type: string
  1623. example: "INVALID_TOKEN"
  1624. error:
  1625. type: string
  1626. example: "Token not found"
  1627. response:
  1628. type: string
  1629. example: null
  1630. security:
  1631. - api_key: []
  1632. /user:
  1633. get:
  1634. tags:
  1635. - user
  1636. description: 'Get current logged user info'
  1637. operationId: 'getUser'
  1638. responses:
  1639. "200":
  1640. description: ""
  1641. content:
  1642. application/json:
  1643. schema:
  1644. properties:
  1645. code:
  1646. type: string
  1647. example: OK
  1648. error:
  1649. type: string
  1650. example: null
  1651. response:
  1652. $ref: "#/components/schemas/User"
  1653. "401":
  1654. description: ""
  1655. content:
  1656. application/json:
  1657. schema:
  1658. properties:
  1659. code:
  1660. type: string
  1661. example: MISSING_TOKEN
  1662. error:
  1663. type: string
  1664. example: 'No authorized user (or missing token)'
  1665. security:
  1666. - api_key: []
  1667. /user/set:
  1668. post:
  1669. tags:
  1670. - user
  1671. description: 'Sets users features'
  1672. operationId: 'setUser'
  1673. requestBody:
  1674. content:
  1675. application/json:
  1676. schema:
  1677. type: object
  1678. properties:
  1679. name:
  1680. type: string
  1681. description: "Own full name"
  1682. example: "John Doe"
  1683. nullable: true
  1684. localisation:
  1685. type: string
  1686. description: "User override to default unit localisation"
  1687. example: "de"
  1688. nullable: true
  1689. code:
  1690. type: integer
  1691. example: 1234
  1692. password:
  1693. type: object
  1694. properties:
  1695. new:
  1696. type: string
  1697. description: "New value of plain password"
  1698. example: "my_new_password"
  1699. old:
  1700. type: string
  1701. description: "Old plain password for change confirmation"
  1702. example: "pass"
  1703. nullable: true
  1704. required: true
  1705. responses:
  1706. "200":
  1707. description: ""
  1708. content:
  1709. application/json:
  1710. schema:
  1711. properties:
  1712. code:
  1713. type: string
  1714. example: OK
  1715. error:
  1716. type: string
  1717. example: null
  1718. response:
  1719. type: string
  1720. nullable: true
  1721. description: 'Success'
  1722. example: "OK"
  1723. "400":
  1724. description: ""
  1725. content:
  1726. application/json:
  1727. schema:
  1728. properties:
  1729. code:
  1730. type: string
  1731. example: BAD_REQUEST
  1732. error:
  1733. type: string
  1734. example: 'No change specified'
  1735. security:
  1736. - api_key: []
  1737.  
  1738. /users:
  1739. get:
  1740. summary: "Get all users features"
  1741. description: "User must be authenticated as admin"
  1742. operationId: 'getUsers'
  1743. tags:
  1744. - user
  1745. responses:
  1746. "200":
  1747. description: "List of valid users"
  1748. content:
  1749. application/json:
  1750. schema:
  1751. properties:
  1752. code:
  1753. type: string
  1754. example: "OK"
  1755. error:
  1756. type: string
  1757. example: null
  1758. response:
  1759. type: string
  1760. nullable: true
  1761. description: 'Success'
  1762. example:
  1763. code: OK
  1764. error: null
  1765. result:
  1766. - devices:
  1767. - unit
  1768. email: ''
  1769. localisation: null
  1770. name: ''
  1771. permissions: []
  1772. username: guest
  1773. - devices:
  1774. - unit
  1775. email: ''
  1776. localisation: null
  1777. name: John Doe
  1778. permissions:
  1779. - scheduler
  1780. - controll
  1781. - remote
  1782. - read
  1783. username: user
  1784. - devices:
  1785. - unit
  1786. email: ''
  1787. localisation: null
  1788. name: ''
  1789. permissions:
  1790. - scheduler
  1791. - admin
  1792. - controll
  1793. - remote
  1794. - read
  1795. username: admin
  1796.  
  1797. security:
  1798. - api_key: []
  1799. /users/create:
  1800. post:
  1801. tags:
  1802. - user
  1803. summary: "Creates a new user"
  1804. description: 'User must be logged with ADMIN permission '
  1805. operationId: 'createUser'
  1806. requestBody:
  1807. content:
  1808. application/json:
  1809. schema:
  1810. type: object
  1811. properties:
  1812. name:
  1813. type: string
  1814. description: "Own full name"
  1815. example: "John Doe"
  1816. nullable: true
  1817. localisation:
  1818. type: string
  1819. description: "User override to default unit localisation"
  1820. example: "de"
  1821. nullable: true
  1822. password:
  1823. type: string
  1824. description: "New value of plain password"
  1825. example: "new_password"
  1826. nullable: true
  1827. disabled:
  1828. type: boolean
  1829. description: "If user should be disabled (optional, default=false)"
  1830. example: false
  1831. nullable: true
  1832. required: true
  1833. responses:
  1834. "200":
  1835. description: ""
  1836. content:
  1837. application/json:
  1838. schema:
  1839. properties:
  1840. code:
  1841. type: string
  1842. example: "OK"
  1843. error:
  1844. type: string
  1845. example: null
  1846. response:
  1847. type: string
  1848. nullable: true
  1849. description: 'Success'
  1850. example: "OK"
  1851. "403":
  1852. description: ""
  1853. content:
  1854. application/json:
  1855. schema:
  1856. properties:
  1857. code:
  1858. type: string
  1859. example: FORBIDDEN
  1860. error:
  1861. type: string
  1862. example: 'Missing permission'
  1863. security:
  1864. - api_key: []
  1865. /users/{username}:
  1866. get:
  1867. summary: "Get specified users features"
  1868. description: "User must be authenticated as admin"
  1869. operationId: 'getUserByName'
  1870. tags:
  1871. - user
  1872. parameters:
  1873. - name: "username"
  1874. in: "path"
  1875. description: "Username"
  1876. required: true
  1877. schema:
  1878. type: string
  1879. example: user
  1880. responses:
  1881. "200":
  1882. description: "User indo"
  1883. content:
  1884. application/json:
  1885. schema:
  1886. properties:
  1887. code:
  1888. type: string
  1889. example: "OK"
  1890. error:
  1891. type: string
  1892. example: null
  1893. response:
  1894. type: string
  1895. nullable: true
  1896. description: 'Success'
  1897. example:
  1898. code: OK
  1899. error: null
  1900. result:
  1901. devices:
  1902. - unit
  1903. email: ''
  1904. localisation: null
  1905. name: John Doe
  1906. permissions:
  1907. - scheduler
  1908. - controll
  1909. - remote
  1910. - read
  1911. username: user
  1912. security:
  1913. - api_key: []
  1914. /users/{username}/set:
  1915. post:
  1916. tags:
  1917. - user
  1918. summary: "Set user info as ADMIN"
  1919. description: 'User must be logged with ADMIN permission '
  1920. operationId: 'editUser'
  1921. parameters:
  1922. - name: "username"
  1923. in: "path"
  1924. description: "Username"
  1925. required: true
  1926. schema:
  1927. type: string
  1928. example: user
  1929. requestBody:
  1930. content:
  1931. application/json:
  1932. schema:
  1933. type: object
  1934. properties:
  1935. name:
  1936. type: string
  1937. description: "Own full name"
  1938. example: "John Doe"
  1939. nullable: true
  1940. localisation:
  1941. type: string
  1942. description: "User override to default unit localisation"
  1943. example: "de"
  1944. nullable: true
  1945. password:
  1946. type: string
  1947. description: "New value of plain password"
  1948. example: "new_password"
  1949. nullable: true
  1950. disabled:
  1951. type: boolean
  1952. description: "If user should be disabled (optional, default=false)"
  1953. example: false
  1954. nullable: true
  1955. description: 'Login to register to the system, returns the API Token'
  1956. required: true
  1957. responses:
  1958. "200":
  1959. description: ""
  1960. content:
  1961. application/json:
  1962. schema:
  1963. properties:
  1964. code:
  1965. type: string
  1966. example: OK
  1967. error:
  1968. type: string
  1969. example: null
  1970. response:
  1971. type: string
  1972. nullable: true
  1973. description: 'Success'
  1974. example: "OK"
  1975. "401":
  1976. description: ""
  1977. content:
  1978. application/json:
  1979. schema:
  1980. properties:
  1981. code:
  1982. type: string
  1983. example: FORBIDDEN
  1984. error:
  1985. type: string
  1986. example: 'Missing admin permission'
  1987. security:
  1988. - api_key: []
  1989. /users/{username}/delete:
  1990. delete:
  1991. tags:
  1992. - user
  1993. summary: "Removes chosen user"
  1994. description: 'User must be logged with ADMIN permission '
  1995. operationId: 'deleteUser'
  1996. parameters:
  1997. - name: "username"
  1998. in: "path"
  1999. description: "Username"
  2000. required: true
  2001. schema:
  2002. type: string
  2003. example: user
  2004. responses:
  2005. "200":
  2006. description: ""
  2007. content:
  2008. application/json:
  2009. schema:
  2010. properties:
  2011. code:
  2012. type: string
  2013. example: "OK"
  2014. error:
  2015. type: string
  2016. example: null
  2017. response:
  2018. type: string
  2019. nullable: true
  2020. description: 'Success'
  2021. example: "OK"
  2022. "401":
  2023. description: ""
  2024. content:
  2025. application/json:
  2026. schema:
  2027. properties:
  2028. code:
  2029. type: string
  2030. example: "FORBIDDEN"
  2031. error:
  2032. type: string
  2033. example: 'Mising permission'
  2034. security:
  2035. - api_key: []
  2036. /reboot:
  2037. get:
  2038. description: "Reboots the system"
  2039. operationId: 'deviceReboot'
  2040. tags:
  2041. - system
  2042. responses:
  2043. "200":
  2044. description: "Versions of all connected components"
  2045. content:
  2046. application/json:
  2047. schema:
  2048. $ref: "#/components/schemas/Success"
  2049.  
  2050. /version:
  2051. get:
  2052. description: "Gets versions of all connected components"
  2053. operationId: 'version'
  2054. tags:
  2055. - system
  2056. responses:
  2057. "200":
  2058. description: "Versions of all connected components"
  2059. content:
  2060. application/json:
  2061. schema:
  2062. properties:
  2063. code:
  2064. type: string
  2065. example: OK
  2066. error:
  2067. type: string
  2068. example: null
  2069. response:
  2070. description: 'Info from components'
  2071. example: { "CONTROLLER": {
  2072. "build": "Mon 15 Mar 2021 03:07:00 PM CET",
  2073. "githash": "f99dd11",
  2074. "library_githash": "9e289bf",
  2075. "library_version": "HEAD-9e289bf",
  2076. "version": "2-api-cors-v0.1.3-2-gf99dd11-dirty"
  2077. },
  2078. "GATEWAY": {
  2079. "build": "Mon 15 Mar 2021 03:07:00 PM CET",
  2080. "githash": "f99dd11",
  2081. "version": "2-api-cors-v0.1.3-2-gf99dd11-dirty"
  2082. },
  2083. "MAPPER": {
  2084. "build": "Mon 15 Mar 2021 03:07:00 PM CET",
  2085. "githash": "f99dd11",
  2086. "version": "2-api-cors-v0.1.3-2-gf99dd11-dirty"
  2087. }
  2088. }
  2089. /discovery:
  2090. get:
  2091. description:
  2092. This endpoint is primary used for discovery of unit on known IP address.
  2093. The format and structure is the same as the discovery over UDP boradcast. This endpoint
  2094. does not require login.
  2095. summary: Unit discovery endpoint
  2096. operationId: 'discovery'
  2097. tags:
  2098. - system
  2099. responses:
  2100. "200":
  2101. description: "Discovery response"
  2102. content:
  2103. application/json:
  2104. schema:
  2105. properties:
  2106. code:
  2107. type: string
  2108. example: OK
  2109. error:
  2110. type: string
  2111. example: null
  2112. response:
  2113. type: object
  2114. properties:
  2115. addresses:
  2116. type: object
  2117. title: List of available network accesses
  2118. example:
  2119. br-0f25f03ff05e: "172.19.0.1"
  2120. docker0: "172.17.0.1"
  2121. enp4s0: "192.168.152.52"
  2122. tun0: "10.8.0.2"
  2123. board_number:
  2124. title: Unique number of board
  2125. type: string
  2126. example: "f6:f3:f9:11:2f:75"
  2127. brand:
  2128. title: Brand to be used on UI
  2129. type: string
  2130. example: "atrea.cz"
  2131. localisation:
  2132. title: UI default localisation (user can override)
  2133. type: string
  2134. example: "cs"
  2135. name:
  2136. title: Unit name
  2137. type: string
  2138. example: "Ventilation unit"
  2139. port:
  2140. title: Unit port number
  2141. type: number
  2142. example: 8211,
  2143. production_number:
  2144. title: Unique number of while unit
  2145. type: string
  2146. example: "ATC000000"
  2147. type:
  2148. title: Unit branded type
  2149. type: string
  2150. example: "ATC Virtual"
  2151. version:
  2152. title: Unit software version (from gateway)
  2153. type: string
  2154. example: "ATC-v0.1.5-14-g532c703"
  2155. /clients:
  2156. get:
  2157. tags:
  2158. - system
  2159. summary: "Gets connected clients (only ADMIN)"
  2160. description: 'User must be logged with ADMIN permission'
  2161. operationId: 'connectedClients'
  2162. responses:
  2163. "200":
  2164. description: "List of actual connected clients"
  2165. content:
  2166. application/json:
  2167. schema:
  2168. properties:
  2169. code:
  2170. type: string
  2171. example: OK
  2172. error:
  2173. type: string
  2174. example: null
  2175. response:
  2176. type: object
  2177. properties:
  2178. tokens:
  2179. type: array
  2180. items:
  2181. type: object
  2182. description: Valid tokens without private part
  2183. properties:
  2184. "authorizer":
  2185. type: string
  2186. example: "172.18.6.1:59043"
  2187. "channel":
  2188. type: string
  2189. example: "websocket"
  2190. "created":
  2191. type: integer
  2192. example: 1621256057
  2193. "last_active":
  2194. type: integer
  2195. example: 1621256058
  2196. "username":
  2197. type: string
  2198. example: "admin"
  2199. websocket:
  2200. type: array
  2201. items:
  2202. type: object
  2203. description: Open client websocket
  2204. properties:
  2205. "remote":
  2206. type: string
  2207. example: "10.8.0.1:14051"
  2208. "username":
  2209. type: string
  2210. example: "admin"
  2211.  
  2212. /time:
  2213. get:
  2214. tags:
  2215. - settings
  2216. description: "Gets current time"
  2217. operationId: 'getTime'
  2218. responses:
  2219. "200":
  2220. description: "Actual time"
  2221. content:
  2222. application/json:
  2223. schema:
  2224. properties:
  2225. code:
  2226. type: string
  2227. example: OK
  2228. error:
  2229. type: string
  2230. example: null
  2231. response:
  2232. type: object
  2233. properties:
  2234. timestamp:
  2235. type: object
  2236. properties:
  2237. unix_time:
  2238. type: integer
  2239. example: 1620912143
  2240. nanoseconds:
  2241. type: integer
  2242. example: 168795000
  2243. js_time:
  2244. type: integer
  2245. example: 1620912143168
  2246. timezone:
  2247. type: string
  2248. example: "Europe/Prague"
  2249. timezone_raw:
  2250. type: string
  2251. example: "CET-1CEST,M3.5.0,M10.5.0/3"
  2252. localtime:
  2253. $ref: "#/components/schemas/TimeSpec"
  2254. utc:
  2255. $ref: "#/components/schemas/TimeSpec"
  2256. /time/set:
  2257. post:
  2258. tags:
  2259. - settings
  2260. summary: "Sets the time"
  2261. description: 'User must be logged with ADMIN permission '
  2262. operationId: 'setTime'
  2263. requestBody:
  2264. content:
  2265. application/json:
  2266. schema:
  2267. type: object
  2268. properties:
  2269. hour:
  2270. type: integer
  2271. minimum: 0
  2272. maximum: 23
  2273. title: Hours
  2274. example: 13
  2275. nullable: true
  2276. minute:
  2277. type: integer
  2278. minimum: 0
  2279. maximum: 59
  2280. example: 22
  2281. title: Minutes
  2282. nullable: true
  2283. second:
  2284. type: integer
  2285. minimum: 0
  2286. maximum: 59
  2287. example: 23
  2288. title: Seconds
  2289. nullable: true
  2290. day:
  2291. type: integer
  2292. minimum: 1
  2293. maximum: 31
  2294. example: 13
  2295. title: Day
  2296. nullable: true
  2297. month:
  2298. type: integer
  2299. minimum: 1
  2300. maximum: 12
  2301. example: 5
  2302. title: Month
  2303. nullable: true
  2304. year:
  2305. type: integer
  2306. minimum: 1900
  2307. maximum: 2155
  2308. example: 2021
  2309. title: Year
  2310. nullable: true
  2311. auto_dst:
  2312. type: boolean
  2313. example: false
  2314. title: Auto daylight saving time"
  2315. nullable: true
  2316. timezone:
  2317. type: string
  2318. example: "Europe/Prague"
  2319. ntp_synchronization:
  2320. type: boolean
  2321. example: true
  2322. description: 'Sets actual time, time zone and controls synchronization from NTP. Whole time group (hour, minute, second, day, month, year) is required to by present or misising.'
  2323. required: true
  2324. responses:
  2325. "200":
  2326. description: ""
  2327. content:
  2328. application/json:
  2329. schema:
  2330. properties:
  2331. code:
  2332. type: string
  2333. example: OK
  2334. error:
  2335. type: string
  2336. example: null
  2337. response:
  2338. type: string
  2339. nullable: true
  2340. description: 'Success'
  2341. example: "OK"
  2342. security:
  2343. - api_key: []
  2344. /time/timezones:
  2345. get:
  2346. description: "Gets list of available timezones"
  2347. operationId: 'getTimezones'
  2348. tags:
  2349. - settings
  2350. responses:
  2351. "200":
  2352. description: "All available timezones"
  2353. content:
  2354. application/json:
  2355. schema:
  2356. properties:
  2357. auto_timezones:
  2358. type: array
  2359. items:
  2360. type: string
  2361. example: "Europe/Prague"
  2362. fixed_timezones:
  2363. type: array
  2364. items:
  2365. type: string
  2366. example: "GMT0"
  2367. /network_manager:
  2368. get:
  2369. summary: "Get configurable network adaptors"
  2370. operationId: 'networkManager'
  2371. tags:
  2372. - settings
  2373. responses:
  2374. "200":
  2375. description: "List of configurable network cards with actual settings."
  2376. content:
  2377. application/json:
  2378. schema:
  2379. type: array
  2380. items:
  2381. type: object
  2382. properties:
  2383. interface:
  2384. type: string
  2385. example: eth0
  2386. mode:
  2387. type: string
  2388. enum:
  2389. - static
  2390. - dhcp
  2391. address:
  2392. type: string
  2393. example: "172.20.20.20"
  2394. netmask:
  2395. type: string
  2396. example: "255.255.255.0"
  2397. gateway:
  2398. type: string
  2399. example: "172.20.20.1"
  2400. nullable: true
  2401. dns:
  2402. type: array
  2403. items:
  2404. type: string
  2405. example: "172.20.20.1"
  2406. wifi:
  2407. type: boolean
  2408. example: false
  2409. addresses:
  2410. type: array
  2411. items:
  2412. type: string
  2413. example: ["192.168.1.23", "172.20.20.20"]
  2414. /network_manager/set:
  2415. post:
  2416. summary: "Sets network adaptor settings"
  2417. description: 'User must be logged with ADMIN permission'
  2418. operationId: 'setNetwork'
  2419. tags:
  2420. - settings
  2421. requestBody:
  2422. content:
  2423. application/json:
  2424. schema:
  2425. type: object
  2426. properties:
  2427. interface:
  2428. type: string
  2429. example: eth0
  2430. mode:
  2431. type: string
  2432. enum:
  2433. - static
  2434. - dhcp
  2435. settings:
  2436. type: object
  2437. nullable: true
  2438. properties:
  2439. address:
  2440. type: string
  2441. example: "172.20.20.20"
  2442. netmask:
  2443. type: string
  2444. example: "255.255.255.0"
  2445. gateway:
  2446. type: string
  2447. example: "172.20.20.1"
  2448. nullable: true
  2449. dns:
  2450. type: array
  2451. items:
  2452. type: string
  2453. example: "172.20.20.1"
  2454. responses:
  2455. "200":
  2456. description: "List of configurable network cards with actual settings."
  2457. content:
  2458. application/json:
  2459. schema:
  2460. type: object
  2461. properties:
  2462. interface:
  2463. type: string
  2464. example: eth0
  2465. mode:
  2466. type: string
  2467. enum:
  2468. - static
  2469. - dhcp
  2470. settings:
  2471. type: object
  2472. nullable: true
  2473. properties:
  2474. address:
  2475. type: string
  2476. example: "172.20.20.20"
  2477. netmask:
  2478. type: string
  2479. example: "255.255.255.0"
  2480. gateway:
  2481. type: string
  2482. example: "172.20.20.1"
  2483. nullable: true
  2484. dns:
  2485. type: array
  2486. items:
  2487. type: string
  2488. example: "172.20.20.1"
  2489. wifi:
  2490. type: boolean
  2491. example: false
  2492. /cloud:
  2493. get:
  2494. summary: "Gets cloud connection status"
  2495. description: 'User must be logged with ADMIN permission '
  2496. operationId: 'getCloud'
  2497. tags:
  2498. - settings
  2499. responses:
  2500. "200":
  2501. description: ""
  2502. content:
  2503. application/json:
  2504. schema:
  2505. properties:
  2506. code:
  2507. type: string
  2508. example: OK
  2509. error:
  2510. type: string
  2511. example: null
  2512. response:
  2513. type: object
  2514. properties:
  2515. active:
  2516. type: boolean
  2517. enable:
  2518. type: boolean
  2519. support:
  2520. type: boolean
  2521. link:
  2522. type: object
  2523. properties:
  2524. gateway:
  2525. type: boolean
  2526. dns:
  2527. type: boolean
  2528. internet:
  2529. type: boolean
  2530. cloud:
  2531. type: boolean
  2532. security:
  2533. - api_key: []
  2534. /cloud/set:
  2535. post:
  2536. summary: "Sets the cloud settings"
  2537. description: 'User must be logged with ADMIN permission '
  2538. operationId: 'setCloud'
  2539. tags:
  2540. - settings
  2541. requestBody:
  2542. content:
  2543. application/json:
  2544. schema:
  2545. type: object
  2546. properties:
  2547. enable:
  2548. type: boolean
  2549. title: "Enable cloud connection"
  2550. support:
  2551. type: boolean
  2552. title: "Enable remote support"
  2553. responses:
  2554. "200":
  2555. description: ""
  2556. content:
  2557. application/json:
  2558. schema:
  2559. properties:
  2560. code:
  2561. type: string
  2562. example: OK
  2563. error:
  2564. type: string
  2565. example: null
  2566. response:
  2567. type: string
  2568. nullable: true
  2569. description: 'Success'
  2570. example: "OK"
  2571. security:
  2572. - api_key: []
  2573. /unit/set:
  2574. post:
  2575. summary: "Set unit-wide informations, (only admin)"
  2576. operationId: 'unitSet'
  2577. tags:
  2578. - settings
  2579. requestBody:
  2580. content:
  2581. application/json:
  2582. schema:
  2583. type: object
  2584. properties:
  2585. name:
  2586. type: string
  2587. example: MyUnit
  2588. localisation:
  2589. type: string
  2590. example: "en"
  2591. responses:
  2592. 200:
  2593. description: ""
  2594. content:
  2595. application/json:
  2596. schema:
  2597. $ref: "#/components/schemas/Success"
  2598.  
  2599.  
  2600. /custom/config/activate:
  2601. post:
  2602. tags:
  2603. - settings
  2604. summary: "<p>Sends the activation code for the final HVAC device run approval.<br>The activation code can be used only once</p>"
  2605. description: 'User must have the activation code '
  2606. operationId: 'customConfigActivate'
  2607. requestBody:
  2608. content:
  2609. application/json:
  2610. schema:
  2611. type: object
  2612. properties:
  2613. activationCode:
  2614. type: string
  2615. description: "Activation code from the seller (as a label on the box)"
  2616. example: "A2ED92-2556"
  2617. nullable: true
  2618. required: true
  2619. responses:
  2620. "200":
  2621. description: ""
  2622. content:
  2623. application/json:
  2624. schema:
  2625. properties:
  2626. code:
  2627. type: string
  2628. example: "OK"
  2629. error:
  2630. type: string
  2631. example: null
  2632. response:
  2633. type: string
  2634. nullable: true
  2635. description: 'Success'
  2636. example: "OK"
  2637. "403":
  2638. description: ""
  2639. content:
  2640. application/json:
  2641. schema:
  2642. properties:
  2643. code:
  2644. type: string
  2645. example: FORBIDDEN
  2646. error:
  2647. type: string
  2648. example: 'Unit is already activated'
  2649. security:
  2650. - api_key: []
  2651. servers:
  2652. - url: 'http://localhost:8211/api'
  2653. - url: 'http://192.168.152.52:8211/api'
  2654. components:
  2655. securitySchemes:
  2656. api_key:
  2657. type: apiKey
  2658. name: 'X-ATC-TOKEN'
  2659. in: header
  2660. schemas:
  2661. TimeSpec:
  2662. type: object
  2663. properties:
  2664. hour:
  2665. type: integer
  2666. minimum: 0
  2667. maximum: 23
  2668. title: Hours
  2669. example: 13
  2670. minute:
  2671. type: integer
  2672. minimum: 0
  2673. maximum: 59
  2674. example: 22
  2675. title: Minutes
  2676. second:
  2677. type: integer
  2678. minimum: 0
  2679. maximum: 59
  2680. example: 23
  2681. title: Seconds
  2682. day:
  2683. type: integer
  2684. minimum: 1
  2685. maximum: 31
  2686. example: 13
  2687. title: Day
  2688. month:
  2689. type: integer
  2690. minimum: 1
  2691. maximum: 12
  2692. example: 5
  2693. title: Month
  2694. year:
  2695. type: integer
  2696. minimum: 1900
  2697. maximum: 2155
  2698. example: 2021
  2699. title: Year
  2700. dst:
  2701. type: boolean
  2702. example: false
  2703. title: Daylight saving time
  2704. DayOfYear:
  2705. type: object
  2706. properties:
  2707. day:
  2708. type: integer
  2709. minimum: 1
  2710. maximum: 31
  2711. example: 13
  2712. title: Day
  2713. month:
  2714. type: integer
  2715. minimum: 1
  2716. maximum: 12
  2717. example: 5
  2718. title: Month
  2719. Success:
  2720. type: object
  2721. properties:
  2722. code:
  2723. type: string
  2724. example: OK
  2725. error:
  2726. type: string
  2727. nullable: true
  2728. example: null
  2729. response:
  2730. type: object
  2731. nullable: true
  2732. example: {}
  2733. SetOperationResponse:
  2734. type: object
  2735. properties:
  2736. code:
  2737. type: string
  2738. example: OK
  2739. error:
  2740. type: string
  2741. nullable: true
  2742. example: null
  2743. response:
  2744. type: object
  2745. properties:
  2746. affectedId:
  2747. type: number
  2748. description: 'Unique ID of affected record. If command is CREATE, affectedId is ID of the new created scene'
  2749. example: 23
  2750. OperationFailed:
  2751. type: object
  2752. properties:
  2753. code:
  2754. type: string
  2755. example: FAILED
  2756. error:
  2757. type: string
  2758. example: "Operation failed"
  2759. response:
  2760. type: object
  2761. nullable: true
  2762. example: null
  2763. UserLogin:
  2764. type: object
  2765. properties:
  2766. username:
  2767. type: string
  2768. description: 'Username as user identification'
  2769. example: 'user'
  2770. password:
  2771. type: string
  2772. description: 'User password as a plaintext'
  2773. example: 'pass'
  2774. TokenLogin:
  2775. type: object
  2776. properties:
  2777. token:
  2778. type: string
  2779. description: 'API Token'
  2780. example: 'HjzTdbK45KH98JGFgfh'
  2781. VariableConfig:
  2782. type: object
  2783. properties:
  2784. variables:
  2785. type: object
  2786. additionalProperties:
  2787. example: 0.4
  2788. example:
  2789. variables:
  2790. temp_ida_heater_hyst: 0.5
  2791. temp_cool_active_offset: 0.3
  2792. Variable:
  2793. type: object
  2794. properties:
  2795. id:
  2796. type: integer
  2797. format: int32
  2798. example: 25
  2799. description: 'Unique ID of variable in the list'
  2800. name:
  2801. type: string
  2802. example: 'fan_request'
  2803. description: 'Name of varibale. This is the same name as in the regulator'
  2804. type:
  2805. type: string
  2806. value:
  2807. example: true
  2808. VariableArray:
  2809. type: array
  2810. items:
  2811. $ref: "#/components/schemas/Variable"
  2812. VariableTypeItem:
  2813. type: object
  2814. properties:
  2815. name:
  2816. type: string
  2817. description: 'Name of ENUM'
  2818. example: 'HIGH'
  2819. value:
  2820. type: number
  2821. minimum: 1
  2822. maximum: 4294967295
  2823. VariableTypes:
  2824. type: object
  2825. additionalProperties:
  2826. $ref: "#/components/schemas/VariableTypeItem"
  2827. VariableControl:
  2828. type: object
  2829. properties:
  2830. variables:
  2831. type: object
  2832. additionalProperties:
  2833. example: 25.3
  2834. duration:
  2835. type: number
  2836. description: Delay to keep set value in seconds. 0 = permanent
  2837. example: 3600
  2838. exclusive:
  2839. type: number
  2840. description: Delay to keep exclusive mode in seconds. 0 = no exclusive mode. Exclusive mode is without triggers and schedulers (skips them) - only accept control commands
  2841. example: 3600
  2842. example:
  2843. variables:
  2844. temp_request: 23.1
  2845. fan_power_req: 74
  2846. duration: 3600
  2847. VariableControlResponse:
  2848. type: object
  2849. properties:
  2850. variables:
  2851. type: object
  2852. additionalProperties:
  2853. type: boolean
  2854. example:
  2855. variables:
  2856. temp_request: true
  2857. fan_power_req: false
  2858. ControllerList:
  2859. type: object
  2860. properties:
  2861. config:
  2862. $ref: "#/components/schemas/VariableArray"
  2863. inputs:
  2864. $ref: "#/components/schemas/VariableArray"
  2865. outputs:
  2866. $ref: "#/components/schemas/VariableArray"
  2867. context:
  2868. $ref: "#/components/schemas/VariableArray"
  2869. types:
  2870. $ref: "#/components/schemas/VariableTypes"
  2871. user_requests:
  2872. $ref: "#/components/schemas/UserRequests"
  2873. UserRequests:
  2874. type: object
  2875. additionalProperties:
  2876. type: string
  2877. example:
  2878. fan_power_req: uint8
  2879. flow_circulation_req: float
  2880. temp_request: float
  2881. work_regime: WorkRegime
  2882. zone_request: ZoneSelection
  2883. User:
  2884. type: object
  2885. properties:
  2886. username:
  2887. type: string
  2888. example: "admin"
  2889. description: ""
  2890. email:
  2891. type: string
  2892. format: email
  2893. example: "admin@exmaple.com"
  2894. permissions:
  2895. type: array
  2896. items:
  2897. type: string
  2898. example: '["remote","controll","admin","scheduler"]'
  2899. devices:
  2900. type: array
  2901. items:
  2902. type: string
  2903. example: '["unit"]'
  2904. code:
  2905. type: boolean
  2906. example: true
  2907. UiInfo:
  2908. type: object
  2909. properties:
  2910. requests:
  2911. description: variable of Device to be watched
  2912. type: array
  2913. items:
  2914. type: string
  2915. example:
  2916. temp_request: 22
  2917. zone_request: "BOTH"
  2918. work_regime: "OFF"
  2919. fan_power_req: 0
  2920. season_request: "HEATING"
  2921. unit:
  2922. description: variable of Device to be watched and displayed
  2923. type: array
  2924. items:
  2925. type: string
  2926. example:
  2927. season_current: "HEATING"
  2928. temp_oda: 1.1
  2929. temp_oda_mean: 0
  2930. temp_eta: 21
  2931. fan_sup_factor: 0
  2932. fan_eta_factor: 0
  2933. temp_ida: 21
  2934. temp_sup: 20.3
  2935. mode_current: "OFF"
  2936. states:
  2937. type: array
  2938. items:
  2939. type: string
  2940. example:
  2941. - 'active'
  2942. UiInfoScheme:
  2943. type: object
  2944. properties:
  2945. requests:
  2946. description: variable of Device to be watched
  2947. type: array
  2948. items:
  2949. type: string
  2950. example:
  2951. - 'temp_request'
  2952. - 'zone_request'
  2953. - 'work_regime'
  2954. - 'fan_power_req'
  2955. - 'season_request'
  2956. unit:
  2957. description: variable of Device to be watched and displayed
  2958. type: array
  2959. items:
  2960. type: string
  2961. example:
  2962. - "season_current"
  2963. - "temp_oda"
  2964. - "temp_oda_mean"
  2965. - "temp_eta"
  2966. - "fan_sup_factor"
  2967. - "fan_eta_factor"
  2968. - "temp_ida"
  2969. - "temp_sup"
  2970. - "cooler_status"
  2971. - "mode_current"
  2972. states:
  2973. type: array
  2974. items:
  2975. type: string
  2976. example:
  2977. - 'active'
  2978. UiControlScheme:
  2979. type: object
  2980. properties:
  2981. requests:
  2982. description: variable of Device to be controlled
  2983. type: array
  2984. items:
  2985. type: string
  2986. example:
  2987. - 'temp_request'
  2988. - 'zone_request'
  2989. - 'work_regime'
  2990. - 'fan_power_req'
  2991. - 'season_request'
  2992. unit:
  2993. description: variable of Device to be watched and displayed
  2994. type: array
  2995. items:
  2996. type: string
  2997. example:
  2998. - "season_current"
  2999. - "temp_oda"
  3000. - "temp_oda_mean"
  3001. - "temp_eta"
  3002. - "fan_sup_factor"
  3003. - "fan_eta_factor"
  3004. - "temp_ida"
  3005. - "temp_sup"
  3006. - "cooler_status"
  3007. - "mode_current"
  3008. states:
  3009. type: array
  3010. items:
  3011. type: string
  3012. example:
  3013. - 'active'
  3014. types:
  3015. additionalProperties:
  3016. oneOf:
  3017. - $ref: '#/components/schemas/UiControlSchemeTypeBool'
  3018. - $ref: '#/components/schemas/UiControlSchemeTypeRange'
  3019. - $ref: '#/components/schemas/UiControlSchemeTypeEnum'
  3020. example:
  3021. fan_eta_factor:
  3022. type: range
  3023. min: 0
  3024. max: 100
  3025. components:
  3026. $ref: '#/components/schemas/UiControlSchemeComponent'
  3027. UiControlSchemeTypeBool:
  3028. type: object
  3029. properties:
  3030. type:
  3031. type: string
  3032. description: Type of variable description (enmu, range ..etc)
  3033. example: bool
  3034. unit:
  3035. type: string
  3036. description: 'Unit of value (%, °C, Pa, m3/h etc..)'
  3037. example: '°C'
  3038. valueType:
  3039. type: string
  3040. description: Short description of the value. Domething like a KEY
  3041. UiControlSchemeTypeRange:
  3042. type: object
  3043. properties:
  3044. type:
  3045. type: string
  3046. description: Type of variable description (enmu, range ..etc)
  3047. example: range
  3048. unit:
  3049. type: string
  3050. description: 'Unit of value (%, °C, Pa, m3/h etc..)'
  3051. example: '°C'
  3052. valueType:
  3053. type: string
  3054. description: Short description of the value. Domething like a KEY
  3055. min:
  3056. type: number
  3057. example: 0
  3058. max:
  3059. type: number
  3060. example: 10
  3061. step:
  3062. type: number
  3063. description: Resolution, accuracy, step value for sliders etc..
  3064. example: 0.1
  3065. UiControlSchemeTypeEnum:
  3066. type: object
  3067. properties:
  3068. type:
  3069. type: string
  3070. description: Type of variable description (enmu, range ..etc)
  3071. example: enum
  3072. unit:
  3073. type: string
  3074. description: 'Unit of value (%, °C, Pa, m3/h etc..)'
  3075. example: '°C'
  3076. valueType:
  3077. type: string
  3078. description: Short description of the value. Domething like a KEY
  3079. values:
  3080. type: array
  3081. description: list of enmu items
  3082. items:
  3083. type: string
  3084. example:
  3085. - "OFF"
  3086. - "AUTO"
  3087. - "VENTILATION"
  3088. - "CIRCU_VENT"
  3089. - "VENTMIX"
  3090. - "CIRCULATION"
  3091. - "NIGHT_PRECOOLING"
  3092. - "DISBALANCE"
  3093. - "OVERPRESSURE"
  3094. UiControlSchemeComponent:
  3095. description: 'List of components like a Cooler, Heater, Preheater, Damper etc.. including theirs confuguration'
  3096. additionalProperties:
  3097. description: Key as name of component
  3098. type: object
  3099. properties:
  3100. component_type:
  3101. type: string
  3102. required:
  3103. - component_type
  3104. additionalProperties:
  3105. oneOf:
  3106. - type: number
  3107. - type: string
  3108. - type: boolean
  3109. description: list of config parameters
  3110. example:
  3111. cooler_a:
  3112. component_type: 'cooler'
  3113. excersise_period: 0
  3114. factor_min: 0
  3115. hp_index: 'NONE'
  3116. hp_t_ref_max: 0
  3117. hp_t_ref_min: 0
  3118. hp_t_ref_u_max: 0
  3119. hp_t_ref_u_min: 0
  3120. i_gain: 0.1
  3121. interval_rest_min: 0
  3122. interval_run_min: 0
  3123. order_index: 0
  3124. p_gain: 0.1
  3125. passover_time: 0
  3126. position: 'INTERNAL'
  3127. pump_delay: 20
  3128. temp_bivalence: 0
  3129. type: 'HEATPUMP'
  3130. UiDiagramSchemeStatus:
  3131. type: object
  3132. properties:
  3133. purpose:
  3134. type: string
  3135. description: 'Short key as a purpose of status'
  3136. example: 'warning'
  3137. severity:
  3138. type: number
  3139. description: 'Weight of the status. The higher number the higher weight'
  3140. example: 5
  3141. type:
  3142. type: string
  3143. description: 'Key of the ENUM'
  3144. example: FIRST_FROST_PROTECTION
  3145. SceneItem:
  3146. type: object
  3147. description: 'It is item of scene. Scene can contain any number of items'
  3148. properties:
  3149. operation:
  3150. type: string
  3151. description: 'type of operation with value'
  3152. enum:
  3153. - '='
  3154. - '>'
  3155. - '<'
  3156. - '>>'
  3157. - '<<'
  3158. - '->'
  3159. - 'on'
  3160. - 'off'
  3161. example: '='
  3162. value:
  3163. description: 'value of item variable'
  3164. oneOf:
  3165. - type: number
  3166. - type: string
  3167. - type: boolean
  3168. example: 28.6
  3169. variable:
  3170. description: 'Name of variable'
  3171. type: string
  3172. example: 'temp_request'
  3173. required:
  3174. - opretaion
  3175. - value
  3176. - variable
  3177.  
  3178. Scene:
  3179. type: object
  3180. description: 'Complete structure of the Scene. If command is remove, "id" property inside structure is enough'
  3181. properties:
  3182. id:
  3183. type: integer
  3184. format: 'uint32'
  3185. minimum: 0
  3186. maximum: 0xFFFFFFFF
  3187. description: 'Unique ID of scene record. If command is create, will be ignored'
  3188. name:
  3189. type: string
  3190. description: "User's name of scene to show it on the UI"
  3191. author:
  3192. type: string
  3193. description: 'Author of Scene'
  3194. example: 'Goya'
  3195. created:
  3196. type: integer
  3197. format: 'uint32'
  3198. minimum: 0
  3199. maximum: 0xFFFFFFFF
  3200. description: 'Datetime of creation as a UNIXTIMESTAMP'
  3201. example: 1613382656
  3202. lastModification:
  3203. type: integer
  3204. format: 'uint32'
  3205. minimum: 0
  3206. maximum: 0xFFFFFFFF
  3207. description: 'Datetime of last modification as a UNIXTIMESTAMP'
  3208. example: 1613382656
  3209. icon:
  3210. type: string
  3211. description: 'Text ID of scene icon pointing to the file, but without path and extension'
  3212. example: 'Snowflake'
  3213. visible:
  3214. type: boolean
  3215. description: 'Is this scene visible for Users'
  3216. example: true
  3217. items:
  3218. type: array
  3219. items:
  3220. $ref: '#/components/schemas/SceneItem'
  3221. required:
  3222. - ig
  3223. - name
  3224. - items
  3225. Trigger:
  3226. type: object
  3227. description: 'Struct of Triggers'
  3228. properties:
  3229. id:
  3230. type: number
  3231. description: Unique ID of the Trigger
  3232. example: 23
  3233. name:
  3234. type: string
  3235. description: "User's Name of trigger"
  3236. example: 'Heat up'
  3237. purpose:
  3238. type: string
  3239. enum:
  3240. - "USER"
  3241. - "SYSTEM"
  3242. description: "Type of process"
  3243. example: 'USER'
  3244. threshold:
  3245. type: object
  3246. properties:
  3247. high:
  3248. type: object
  3249. description: 'Range to read trigger value as a TRUE'
  3250. properties:
  3251. max:
  3252. type: number
  3253. description: 'Max value of process range'
  3254. example: 8.25
  3255. min:
  3256. type: number
  3257. description: 'Min value of process range'
  3258. example: 5.00
  3259. required:
  3260. - max
  3261. - min
  3262. low:
  3263. type: object
  3264. description: 'Range to read trigger value as a FALSE'
  3265. properties:
  3266. max:
  3267. type: number
  3268. description: 'Max value of process range'
  3269. example: 2.00
  3270. min:
  3271. type: number
  3272. description: 'Min value of process range'
  3273. example: 0
  3274. required:
  3275. - max
  3276. - min
  3277. map:
  3278. type: object
  3279. properties:
  3280. maxOrigin:
  3281. type: number
  3282. description: 'Max origin Value to mapping'
  3283. example: 10
  3284. maxRequest:
  3285. type: number
  3286. description: 'Max control request Value to mapping. If max unit is 150 (Pascal), output will be 75 (as a 75% fan_power_req)'
  3287. example: 75
  3288. maxUnit:
  3289. type: number
  3290. description: 'Max Value to mapping trigger value to the units. For example - input is 10V then maxOrigin is 10. If Max unit is 150 then 10 Volts means 150 Pascal'
  3291. example: 150
  3292. maxOut:
  3293. type: number
  3294. description: 'Max Value to mapping Unit to the request'
  3295. example: 0
  3296. minOrigin:
  3297. type: number
  3298. description: 'Max origin Value to mapping'
  3299. example: 0
  3300. minRequest:
  3301. type: number
  3302. description: 'Max control request Value to mapping. If max unit is 0 (Pascal), output will be 15 (as a 15% fan_power_req)'
  3303. example: 15
  3304. minUnit:
  3305. type: number
  3306. description: 'Max Value to mapping trigger value to the units. For example - input is 0V then minOrigin is 0. If Min unit is 0 then 0 Volts means 0 Pascal'
  3307. example: 0
  3308. minOut:
  3309. type: number
  3310. description: 'Min Value to mapping Unit to the request'
  3311. example: 15
  3312. hystOut:
  3313. type: number
  3314. description: 'Hysterese of the output treshold to activate/deactivate trigger'
  3315. example: 0.2
  3316. unit:
  3317. type: string
  3318. description: 'Units of value to show it on the UI'
  3319. example: '°C'
  3320. required:
  3321. - maxOrigin
  3322. - maxRequest
  3323. - maxUnit
  3324. - maxOut
  3325. - minOrigin
  3326. - minRequest
  3327. - minOut
  3328. - minUnit
  3329. - unit
  3330. required:
  3331. - high
  3332. - low
  3333. - map
  3334. enabled:
  3335. type: boolean
  3336. description: 'If trigger is enabled to process. If FALSE trigger will be skipped'
  3337. example: true
  3338. active:
  3339. type: boolean
  3340. description: 'Is trigger active? When is active, manual control for connected variable is blocked'
  3341. example: false
  3342. priority:
  3343. type: integer
  3344. description: 'The higher is the most important'
  3345. example: 12
  3346. variable:
  3347. type: string
  3348. description: 'Name of responsive variable'
  3349. example: 'IN1'
  3350. value:
  3351. oneOf:
  3352. - type: number
  3353. - type: string
  3354. - type: boolean
  3355. description: 'Value of responsive variable'
  3356. sceneId:
  3357. type: integer
  3358. description: 'Unique ID of responsive scene to be activated by trigger'
  3359. example: 1
  3360. type:
  3361. type: string
  3362. enum:
  3363. - DIGITAL
  3364. - ANALOG
  3365. delay:
  3366. type: number
  3367. description: 'The delayed start in impulse type (in seconds)'
  3368. example: 15
  3369. duration:
  3370. type: number
  3371. description: 'The duration of the impulse in seconds'
  3372. example: 30
  3373. timeout:
  3374. type: number
  3375. example: 3600
  3376. description: Timeout of trigger in seconds. Timeout is the protect against forgetful operation. For example if the user turns the some function ON and leave the house. If timeout is 0, trigger is unlimited.
  3377. required:
  3378. - name
  3379. - purpose
  3380. - variable
  3381. - sceneId
  3382. - type
  3383. TriggerInputType:
  3384. type: object
  3385. description: 'Description of trigger input type'
  3386. properties:
  3387. type:
  3388. type: string
  3389. example: 'DIGITAL'
  3390. used:
  3391. type: boolean
  3392. description: 'Shows if it is used for regulation'
  3393. min:
  3394. type: number
  3395. example: 0
  3396. description: 'Minimum value input can take'
  3397. max:
  3398. type: number
  3399. example: 0
  3400. description: 'Maximum value input can take'
  3401. unit:
  3402. type: string
  3403. description: 'Units of value to show it on the UI'
  3404. example: '°C'
  3405. required:
  3406. - type
  3407. TriggerInputList:
  3408. type: object
  3409. additionalProperties:
  3410. $ref: '#/components/schemas/TriggerInputType'
  3411. example:
  3412. temp_oda:
  3413. type: 'TEMPERATURE'
  3414. used: true
  3415. min: -15
  3416. max: 35
  3417. unit: '°C'
  3418. fan_power_req:
  3419. type: 'FLOW'
  3420. used: true
  3421. min: 0
  3422. max: 800
  3423. unit: 'm3/h'
  3424. TriggerReport:
  3425. type: object
  3426. properties:
  3427. id:
  3428. type: number
  3429. description: 'Unique ID of the trigger'
  3430. example: 25
  3431. name:
  3432. type: string
  3433. description: 'Name of the trigger (by user)'
  3434. example: 'My favorite trigger'
  3435. report:
  3436. type: object
  3437. properties:
  3438. status:
  3439. type: string
  3440. enum:
  3441. - UNKNOWN
  3442. - DISABLED
  3443. - INACTIVE
  3444. - ACTIVE
  3445. - BLOCKED
  3446. - FAULT
  3447. - FATAL
  3448. example: FAULT
  3449. errorStack:
  3450. type: object
  3451. additionalProperties:
  3452. type: string
  3453. example:
  3454. IN1: Error
  3455. DisposablePlan:
  3456. type: object
  3457. properties:
  3458. start:
  3459. $ref: '#/components/schemas/MomentDayFormat'
  3460. finish:
  3461. $ref: '#/components/schemas/MomentDayFormat'
  3462. sceneId:
  3463. type: number
  3464. description: The scene ID to be invoked
  3465. example: 15
  3466. active:
  3467. type: boolean
  3468. description: This parameter means there is valid plan in progress. If TRUE, this part should be "orange"
  3469. countdown:
  3470. type: number
  3471. description: time to start plan in seconds. If zerro, there is not any plan
  3472. example: 60
  3473. stop:
  3474. type: boolean
  3475. description: If this parameter is present and it is TRUE, then disposable plan will be immediately finished and removed
  3476. MomentData:
  3477. type: object
  3478. properties:
  3479. inspection:
  3480. $ref: '#/components/schemas/MomentDayFormat'
  3481. filters:
  3482. $ref: '#/components/schemas/MomentDayFormat'
  3483. m1_register:
  3484. type: number
  3485. description: operating time of the motor one in seconds
  3486. example: 150
  3487. m2_register:
  3488. type: number
  3489. description: operating time of the motor two in seconds
  3490. example: 150
  3491. uv_lamp_register:
  3492. type: number
  3493. description: operating time of the UV lamps in seconds
  3494. example: 150
  3495. uv_lamp_service_life:
  3496. type: number
  3497. description: service life time of the UV lamps in hours
  3498. example: 5000
  3499. MomentDayFormat:
  3500. type: object
  3501. properties:
  3502. day:
  3503. type: number
  3504. description: Day of month (1 - 31)
  3505. minimum: 1
  3506. maximum: 31
  3507. example: 25
  3508. month:
  3509. type: number
  3510. description: Month of the year (1 - 12)
  3511. minimum: 1
  3512. maximum: 12
  3513. example: 5
  3514. year:
  3515. type: number
  3516. description: Year AD
  3517. minimum: 2000
  3518. maximum: 3000
  3519. example: 2022
  3520. hour:
  3521. type: number
  3522. description: Hour - local time (24 format)
  3523. minimum: 0
  3524. maximum: 23
  3525. example: 14
  3526. minute:
  3527. type: number
  3528. description: Minute - local time
  3529. minimum: 0
  3530. maximum: 59
  3531. example: 35
  3532. required:
  3533. - day
  3534. - month
  3535. - year
  3536. SchedulerPlanWeek:
  3537. type: object
  3538. properties:
  3539. Mon:
  3540. type: boolean
  3541. description: 'Is plan active for this day?'
  3542. example: true
  3543. Tue:
  3544. type: boolean
  3545. description: 'Is plan active for this day?'
  3546. example: true
  3547. Wed:
  3548. type: boolean
  3549. description: 'Is plan active for this day?'
  3550. example: true
  3551. Thu:
  3552. type: boolean
  3553. description: 'Is plan active for this day?'
  3554. example: true
  3555. Fri:
  3556. type: boolean
  3557. description: 'Is plan active for this day?'
  3558. example: true
  3559. Sat:
  3560. type: boolean
  3561. description: 'Is plan active for this day?'
  3562. example: true
  3563. Sun:
  3564. type: boolean
  3565. description: 'Is plan active for this day?'
  3566. example: true
  3567. Hol:
  3568. type: boolean
  3569. description: 'Is plan active for this day?'
  3570. example: true
  3571. SchedulerPlanItem:
  3572. type: object
  3573. properties:
  3574. id:
  3575. type: integer
  3576. format: 'uint32'
  3577. description: 'Unique id of the plan'
  3578. example: 25
  3579. calendarId:
  3580. type: integer
  3581. format: 'uint32'
  3582. description: 'Id of calendar. Each plan is connected to the just one calendar'
  3583. created:
  3584. type: integer
  3585. format: 'uint32'
  3586. minimum: 0
  3587. maximum: 0xFFFFFFFF
  3588. description: 'Datetime of creation as a UNIXTIMESTAMP'
  3589. example: 1613382656
  3590. name:
  3591. type: string
  3592. description: 'Name of the plan. It can be equal to the name of the scene.'
  3593. example: 'I am Cold'
  3594. sceneId:
  3595. type: integer
  3596. format: 'uint32'
  3597. description: 'Id of the scene to be activated by plan'
  3598. hour:
  3599. type: number
  3600. minimum: 0
  3601. maximum: 23
  3602. description: 'Hour of the day plan 0-23'
  3603. minute:
  3604. type: number
  3605. minimum: 0
  3606. maximum: 23
  3607. description: 'Minute of the hourly dailyplan 0-59'
  3608. dayOfWeek:
  3609. $ref: '#/components/schemas/DayOfWeek'
  3610. DayOfWeek:
  3611. type: string
  3612. enum:
  3613. - Sun
  3614. - Mon
  3615. - Tue
  3616. - Wed
  3617. - Thu
  3618. - Fri
  3619. - Sat
  3620. - Hol
  3621. example: Fri
  3622. SchedulerControlType:
  3623. type: string
  3624. enum:
  3625. - MANUAL
  3626. - SEASON
  3627. - CALENDAR
  3628. SchedulerPlanItemArray:
  3629. type: array
  3630. items:
  3631. $ref: '#/components/schemas/SchedulerPlanItem'
  3632. SchedulerCalendar:
  3633. type: object
  3634. properties:
  3635. id:
  3636. type: integer
  3637. format: 'uint32'
  3638. description: 'Unique ID of the calendar'
  3639. example: 41
  3640. name:
  3641. type: string
  3642. description: 'Name of the calendar'
  3643. example: 'Winter'
  3644. weekPlanItems:
  3645. type: object
  3646. properties:
  3647. Sun:
  3648. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3649. Mon:
  3650. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3651. Tue:
  3652. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3653. Wed:
  3654. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3655. Thu:
  3656. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3657. Fri:
  3658. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3659. Sat:
  3660. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3661. Hol:
  3662. $ref: '#/components/schemas/SchedulerPlanItemArray'
  3663. SchedulerCalendarPlan:
  3664. type: object
  3665. description: 'Allows scheduled switching of calendars '
  3666. properties:
  3667. calendarId:
  3668. type: integer
  3669. format: 'uint32'
  3670. description: 'ID of the calendar which will be activated by this plan record'
  3671. example: 5
  3672. dayOfYear:
  3673. $ref: '#/components/schemas/DayOfYear'
  3674. PublicHoliday:
  3675. type: object
  3676. properties:
  3677. start:
  3678. $ref: '#/components/schemas/DayOfYear'
  3679. end:
  3680. $ref: '#/components/schemas/DayOfYear'
  3681. SchedulerConfig:
  3682. type: object
  3683. properties:
  3684. currentCalendarId:
  3685. type: integer
  3686. format: 'uint32'
  3687. description: 'ID of the current calendar. Calendar which scheduler works by.'
  3688. heatingSeasonCalendarId:
  3689. type: integer
  3690. description: calendar ID for the heating season (If control = SEASON)
  3691. example: 2
  3692. nonheatingSeasonCalendarId:
  3693. type: integer
  3694. description: calendar ID for the non-heating season (If control = SEASON)
  3695. example: 2
  3696. control:
  3697. $ref: '#/components/schemas/SchedulerControlType'
  3698. schedulerCalendars:
  3699. type: array
  3700. description: 'Array of the calendars'
  3701. items:
  3702. $ref: '#/components/schemas/SchedulerCalendar'
  3703. publicHolidays:
  3704. type: array
  3705. description: 'Array of the public holidays'
  3706. items:
  3707. $ref: '#/components/schemas/PublicHoliday'
  3708. schedulerCalendarPlans:
  3709. type: array
  3710. description: 'Array of the public holidays'
  3711. items:
  3712. $ref: '#/components/schemas/SchedulerCalendarPlan'
  3713. SchedulerConfigLite:
  3714. type: object
  3715. properties:
  3716. currentCalendarId:
  3717. type: integer
  3718. format: 'uint32'
  3719. description: 'ID of the current calendar. Calendar which scheduler works by.'
  3720. heatingSeasonCalendarId:
  3721. type: integer
  3722. description: calendar ID for the heating season (If control = SEASON)
  3723. example: 2
  3724. nonheatingSeasonCalendarId:
  3725. type: integer
  3726. description: calendar ID for the non-heating season (If control = SEASON)
  3727. example: 2
  3728. control:
  3729. $ref: '#/components/schemas/SchedulerControlType'
  3730. schedulerCalendars:
  3731. type: array
  3732. description: 'Array of the calendars'
  3733. items:
  3734. type: object
  3735. properties:
  3736. name:
  3737. type: string
  3738. id:
  3739. type: number
  3740. publicHolidays:
  3741. type: array
  3742. description: 'Array of the public holidays'
  3743. items:
  3744. $ref: '#/components/schemas/PublicHoliday'
  3745. schedulerCalendarPlans:
  3746. type: array
  3747. description: 'Array of the public holidays'
  3748. items:
  3749. $ref: '#/components/schemas/SchedulerCalendarPlan'
  3750. triggerEnable:
  3751. type: object
  3752. properties:
  3753. triggerId:
  3754. type: number
  3755. description: Unique Trigger ID
  3756. example: 24
  3757. triggerName:
  3758. type: string
  3759. description: "Unique trigger's name"
  3760. example: "CO2 living room"
  3761. enabled:
  3762. type: boolean
  3763. description: Status - true = ON, false = OFF
  3764. required:
  3765. - enabled
  3766. - triggerId | triggerName
  3767. triggerFunction:
  3768. type: object
  3769. properties:
  3770. id:
  3771. type: number
  3772. description: Unique ID of the function. Do not send if create new
  3773. example: 2
  3774. triggerId:
  3775. type: array
  3776. description: Array of Unique Trigger ID
  3777. items:
  3778. type: number
  3779. example:
  3780. - 24
  3781. - 25
  3782. - 26
  3783. name:
  3784. type: string
  3785. description: "Unique function name"
  3786. example: "CO2 FCE"
  3787. enabled:
  3788. type: boolean
  3789. description: Status - true = ON, false = OFF
  3790. triggeredVariable:
  3791. type: object
  3792. properties:
  3793. name:
  3794. type: string
  3795. description: The name of the variable by the perifery or input
  3796. example: 'VOC sensor kitchen'
  3797. triggerId:
  3798. type: number
  3799. description: The unique ID of the trigger
  3800. example: 5
  3801. unit:
  3802. type: string
  3803. description: Unit o the value
  3804. example: 'ppm'
  3805. value:
  3806. type: number
  3807. example: 543
  3808. WebsocketRequest:
  3809. type: object
  3810. properties:
  3811. endpoint:
  3812. type: string
  3813. description: "Api path"
  3814. example: "login"
  3815. args:
  3816. description: "Arguments for api endpoint"
  3817. example: '{"user": "user", "password": "pass"}'
  3818. id:
  3819. type: number
  3820. description: "Number, which will be in response, useful for asynchronous request pairing"
  3821. minimum: 1
  3822. maximum: 0xFFFFFFFF
  3823. WebsocketResponse:
  3824. type: object
  3825. properties:
  3826. type:
  3827. type: string
  3828. example: "response"
  3829. description: "Message type - response"
  3830. id:
  3831. type: number
  3832. description: "Number from request, useful for asynchronous request pairing"
  3833. minimum: 1
  3834. maximum: 0xFFFFFFFF
  3835. response:
  3836. nullable: true
  3837. description: "Response of givent endpoint API if success, else null"
  3838. code:
  3839. type: string
  3840. example: "OK"
  3841. description: "Result code of request"
  3842. error:
  3843. type: string
  3844. nullable: true
  3845. description: "Error message if error else null"
  3846. Event:
  3847. oneOf:
  3848. - $ref: '#/components/schemas/GeneralEvent'
  3849. - $ref: '#/components/schemas/calendarActivityChangeEvent'
  3850. - $ref: '#/components/schemas/sceneActivityChangeEvent'
  3851. - $ref: '#/components/schemas/schedulerConfigChangeEvent'
  3852. - $ref: '#/components/schemas/triggerConfigChangeEvent'
  3853. - $ref: '#/components/schemas/sceneConfigChangeEvent'
  3854. - $ref: '#/components/schemas/controlPanelEvent'
  3855. - $ref: '#/components/schemas/triggeredVariableChangeEvent'
  3856. GeneralEvent:
  3857. type: object
  3858. properties:
  3859. type:
  3860. type: string
  3861. example: "event"
  3862. description: "Message type - event"
  3863. event:
  3864. type: string
  3865. example: "ui_info"
  3866. description: "Event name"
  3867. args:
  3868. description: "Event arguments"
  3869. calendarActivityChangeEvent:
  3870. type: object
  3871. properties:
  3872. type:
  3873. type: string
  3874. example: "event"
  3875. description: "Message type - event"
  3876. event:
  3877. type: string
  3878. example: "calendar_activity_change"
  3879. description: "Event name"
  3880. args:
  3881. description: "Event arguments"
  3882. properties:
  3883. currentCalendarId:
  3884. type: number
  3885. description: new current calendar id which is used. If it is 0, there is not the calendar used
  3886. sceneActivityChangeEvent:
  3887. type: object
  3888. properties:
  3889. type:
  3890. type: string
  3891. example: "event"
  3892. description: "Message type - event"
  3893. event:
  3894. type: string
  3895. example: "scene_activity_change"
  3896. description: "Event name"
  3897. args:
  3898. description: "Event arguments"
  3899. properties:
  3900. activeScene:
  3901. type: number
  3902. description: active scene ID. (blue scene)
  3903. example: 2
  3904. systemScenes:
  3905. type: array
  3906. description: array of an active system scenes (orange scenes)
  3907. items:
  3908. type: number
  3909. description: orange scenes
  3910. example:
  3911. - 2
  3912. - 5
  3913. - 12
  3914. schedulerConfigChangeEvent:
  3915. type: object
  3916. properties:
  3917. type:
  3918. type: string
  3919. example: "event"
  3920. description: "Message type - event"
  3921. event:
  3922. type: string
  3923. example: "scheduler_config_change"
  3924. description: "Only info, the scheduler config has been modified. Try to get new data about it"
  3925. args:
  3926. description: "No arguments"
  3927. sceneConfigChangeEvent:
  3928. type: object
  3929. properties:
  3930. type:
  3931. type: string
  3932. example: "event"
  3933. description: "Message type - event"
  3934. event:
  3935. type: string
  3936. example: "scene_config_change"
  3937. description: "Only info, the scene config has been modified. Try to get new data about it"
  3938. args:
  3939. description: "No arguments"
  3940. triggerConfigChangeEvent:
  3941. type: object
  3942. properties:
  3943. type:
  3944. type: string
  3945. example: "event"
  3946. description: "Message type - event"
  3947. event:
  3948. type: string
  3949. example: "trigger_config_change"
  3950. description: "Only info, the trigger config has been modified. Try to get new data about it"
  3951. args:
  3952. description: "No arguments"
  3953. triggeredVariableChangeEvent:
  3954. type: object
  3955. properties:
  3956. type:
  3957. type: string
  3958. example: "event"
  3959. description: "Message type - event"
  3960. event:
  3961. type: string
  3962. example: "triggered_variable_change"
  3963. description: "Info about changed variables from triggers"
  3964. args:
  3965. type: array
  3966. items:
  3967. type: object
  3968. properties:
  3969. triggerId:
  3970. type: number
  3971. description: The unique ID of the trigger
  3972. example: 4
  3973. value:
  3974. type: number
  3975. description: current value in demanding units
  3976. example: 2701
  3977. controlPanelEvent:
  3978. type: object
  3979. properties:
  3980. type:
  3981. type: string
  3982. example: "event"
  3983. description: "Message type - event"
  3984. event:
  3985. type: string
  3986. example: "control_panel"
  3987. description: "Events about control panel. Determines the apperance and display mode of the control panel. The panel manage the duration of the control changes. UI keeps the 'visible' status. If true, panel is visible, otherwise hidden."
  3988. args:
  3989. $ref: '#/components/schemas/controlPanelContent'
  3990. controlPanelContent:
  3991. type: object
  3992. properties:
  3993. visible:
  3994. type: boolean
  3995. description: If true, panel is visible
  3996. example: true
  3997. remaining:
  3998. type: number
  3999. description: Time until return changes. If 0, changes are permanent
  4000. example: 120
  4001. finishTime:
  4002. type: number
  4003. description: The unixtimestamp of temorary control finish. If 0, changes are permanent.
  4004. origin:
  4005. type: object
  4006. additionalProperties:
  4007. type: string
  4008. description: variables and its values to be applicated after timeout
  4009. example:
  4010. fan_power_req: 50
  4011. temp_request: 25.3
  4012. stored:
  4013. type: object
  4014. additionalProperties:
  4015. type: string
  4016. description: variables and its values to be applicated after timeout
  4017. example:
  4018. fan_power_req: 50
  4019. temp_request: 25.3
  4020. current:
  4021. type: object
  4022. additionalProperties:
  4023. type: string
  4024. description: variables and its values to be applicated after timeout
  4025. example:
  4026. fan_power_req: 50
  4027. temp_request: 25.3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement