alula-ruby 2.15.1 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION.md +1 -0
  3. data/bin/console +1 -0
  4. data/lib/alula/api_resource.rb +17 -20
  5. data/lib/alula/dcp/resource_attributes.rb +128 -7
  6. data/lib/alula/dcp/resource_state.rb +152 -0
  7. data/lib/alula/dcp/staged_value_methods.rb +50 -0
  8. data/lib/alula/dcp_resource.rb +119 -70
  9. data/lib/alula/monkey_patches.rb +27 -1
  10. data/lib/alula/resource_attributes.rb +12 -5
  11. data/lib/alula/resources/config_template.rb +49 -0
  12. data/lib/alula/resources/dcp/config/bus_modules/bus_module.rb +39 -0
  13. data/lib/alula/resources/dcp/config/bus_modules/dws_bus_module.rb +12 -0
  14. data/lib/alula/resources/dcp/config/bus_modules/input_bus_module.rb +12 -0
  15. data/lib/alula/resources/dcp/config/bus_modules/ism_transceiver_bus_module.rb +18 -0
  16. data/lib/alula/resources/dcp/config/bus_modules/output_bus_module.rb +12 -0
  17. data/lib/alula/resources/dcp/config/bus_modules/touchpad_bus_module.rb +17 -0
  18. data/lib/alula/resources/dcp/config/bus_modules/zwave_bus_module.rb +12 -0
  19. data/lib/alula/resources/dcp/config/bus_modules.rb +21 -0
  20. data/lib/alula/resources/dcp/config/comm_data/auto_comm_test_interval.rb +24 -0
  21. data/lib/alula/resources/dcp/config/comm_data/server_heartbeats.rb +25 -0
  22. data/lib/alula/resources/dcp/config/comm_data/server_keep_alives.rb +25 -0
  23. data/lib/alula/resources/dcp/config/comm_data.rb +27 -0
  24. data/lib/alula/resources/dcp/config/panel_options/ac_fail_detect_delay.rb +23 -0
  25. data/lib/alula/resources/dcp/config/panel_options/event_reporting_delay.rb +24 -0
  26. data/lib/alula/resources/dcp/config/panel_options/key_fob_button_functions.rb +45 -0
  27. data/lib/alula/resources/dcp/config/panel_options/minimum_pin_size.rb +23 -0
  28. data/lib/alula/resources/dcp/config/panel_options/panel_led_brightness.rb +23 -0
  29. data/lib/alula/resources/dcp/config/panel_options/panel_misc_options.rb +25 -0
  30. data/lib/alula/resources/dcp/config/panel_options/panel_options.rb +60 -0
  31. data/lib/alula/resources/dcp/config/panel_options/reportable_event_types_partitions.rb +38 -0
  32. data/lib/alula/resources/dcp/config/panel_options/reportable_event_types_system.rb +27 -0
  33. data/lib/alula/resources/dcp/config/panel_options/swinger_threshold.rb +24 -0
  34. data/lib/alula/resources/dcp/config/panel_options/system_options.rb +45 -0
  35. data/lib/alula/resources/dcp/config/panel_options/trouble_beep_suppress.rb +37 -0
  36. data/lib/alula/resources/dcp/config/panel_options/virtual_interface_options.rb +32 -0
  37. data/lib/alula/resources/dcp/config/panel_options.rb +57 -0
  38. data/lib/alula/resources/dcp/config/partitions/partition.rb +54 -0
  39. data/lib/alula/resources/dcp/{users_data/installer_pin.rb → config/partitions.rb} +6 -6
  40. data/lib/alula/resources/dcp/config/siren_data/siren.rb +59 -0
  41. data/lib/alula/resources/dcp/config/siren_data.rb +21 -0
  42. data/lib/alula/resources/dcp/config/synchronize.rb +1 -1
  43. data/lib/alula/resources/dcp/config/timers/entry_delays.rb +27 -0
  44. data/lib/alula/resources/dcp/config/timers/exit_delays.rb +27 -0
  45. data/lib/alula/resources/dcp/config/timers/sensor_supervision_time.rb +27 -0
  46. data/lib/alula/resources/dcp/config/timers/siren_timeout.rb +24 -0
  47. data/lib/alula/resources/dcp/config/timers.rb +33 -0
  48. data/lib/alula/resources/dcp/config/users_data/duress_pin.rb +24 -0
  49. data/lib/alula/resources/dcp/config/users_data/installer_pin.rb +25 -0
  50. data/lib/alula/resources/dcp/config/users_data/user.rb +104 -0
  51. data/lib/alula/resources/dcp/config/users_data.rb +25 -0
  52. data/lib/alula/resources/dcp/config.rb +10 -1
  53. data/lib/alula/version.rb +1 -1
  54. data/lib/alula.rb +66 -5
  55. metadata +44 -5
  56. data/lib/alula/resources/dcp/users_data/user.rb +0 -100
  57. data/lib/alula/resources/dcp/users_data.rb +0 -13
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class AcFailDetectDelay < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/acFailDetectDelay'
16
+
17
+ field :primitive,
18
+ type: :number
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class EventReportingDelay < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/eventReportingDelay'
16
+
17
+ field :index, type: :number
18
+ field :primitive,
19
+ type: :number
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class KeyFobButtonFunctions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ class KeyFobAction < Alula::Dcp::ObjectField
16
+ field :key_fob_action,
17
+ type: :string
18
+ end
19
+
20
+ resource_name 'config/panelOptions/keyFobButtonFunctions'
21
+
22
+ field :index, type: :number
23
+ field :keyfob_unlock_button_function,
24
+ type: :object,
25
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
26
+ field :keyfob_lock_button_function,
27
+ type: :object,
28
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
29
+ field :keyfob_lights_button_function,
30
+ type: :object,
31
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
32
+ field :keyfob_star_button_function,
33
+ type: :object,
34
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
35
+ field :keyfob_stay_button_function,
36
+ type: :object,
37
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
38
+ field :keyfob_lock_and_unlock_buttons_held_function,
39
+ type: :object,
40
+ use: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions::KeyFobAction
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class MinimumPinSize < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/minimumPinSize'
16
+
17
+ field :primitive,
18
+ type: :number
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class PanelLedBrightness < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/panelLedBrightness'
16
+
17
+ field :primitive,
18
+ type: :number
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class PanelMiscOptions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/panelMiscOptions'
16
+
17
+ field :wall_tamper_enrolled,
18
+ type: :boolean
19
+ field :cover_tamper_enrolled,
20
+ type: :boolean
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class PanelOptions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/panelOptions'
16
+
17
+ field :index, type: :number
18
+ field :arming_confirmation,
19
+ type: :boolean
20
+ field :keystroke_tamper,
21
+ type: :boolean
22
+ field :quick_arm,
23
+ type: :boolean
24
+ field :quick_exit,
25
+ type: :boolean
26
+ field :quick_bypass,
27
+ type: :boolean
28
+ field :auto_bypass_all,
29
+ type: :boolean
30
+ field :sync_pins_to_locks,
31
+ type: :boolean
32
+ field :auto_stay_arming,
33
+ type: :boolean
34
+ field :exit_delay_restart,
35
+ type: :boolean
36
+ field :alarm_abort_annunciation,
37
+ type: :boolean
38
+ field :alarm_cancel_annunciation,
39
+ type: :boolean
40
+ field :keypad_and_keyfob_panic_alarms,
41
+ type: :boolean
42
+ field :allow_2way_voice_for_fire_alarms,
43
+ type: :boolean
44
+ field :suppress_momentary_open_zone_status_to_server,
45
+ type: :boolean
46
+ field :suppress_open_zone_status_to_server,
47
+ type: :boolean
48
+ field :confirm_alarm,
49
+ type: :boolean
50
+ field :keyswitch_type,
51
+ type: :string
52
+ field :pin_required_to_silence,
53
+ type: :boolean
54
+ field :chime_mode_enabled,
55
+ type: :boolean
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class ReportableEventTypesPartitions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/reportableEventTypesPartitions'
16
+
17
+ field :index, type: :number
18
+ field :alarm_and_cancels,
19
+ type: :boolean
20
+ field :restorals,
21
+ type: :boolean
22
+ field :zone_trouble_cr,
23
+ type: :boolean
24
+ field :partition_trouble_cr,
25
+ type: :boolean
26
+ field :opening_and_closing,
27
+ type: :boolean
28
+ field :zone_bypass_and_unbypass,
29
+ type: :boolean
30
+ field :partition_test,
31
+ type: :boolean
32
+ field :partition_misc_events,
33
+ type: :boolean
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class ReportableEventTypesSystem < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/reportableEventTypesSystem'
16
+
17
+ field :system_trouble_cr,
18
+ type: :boolean
19
+ field :system_power_trouble_cr,
20
+ type: :boolean
21
+ field :misc_events,
22
+ type: :boolean
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class SwingerThreshold < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/swingerThreshold'
16
+
17
+ field :index, type: :number
18
+ field :primitive,
19
+ type: :number
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class SystemOptions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/systemOptions'
16
+
17
+ field :selected_sim,
18
+ type: :string
19
+ field :stay_arming_silent,
20
+ type: :boolean
21
+ field :fast_battery_charge_rate,
22
+ type: :boolean
23
+ field :commercial_mode_enabled,
24
+ type: :boolean
25
+ field :stay_connected_during_ac_fail,
26
+ type: :boolean
27
+ field :power_boost_enabled,
28
+ type: :boolean
29
+ field :receiver_jam_detect_enable,
30
+ type: :boolean
31
+ field :mac_in_packet_header,
32
+ type: :boolean
33
+ field :cell_tcp,
34
+ type: :boolean
35
+ field :ethernet_wifi_tcp,
36
+ type: :boolean
37
+ field :local_only,
38
+ type: :boolean
39
+ field :false_alarm_reduction,
40
+ type: :boolean
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class TroubleBeepSuppress < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/troubleBeepSuppress'
16
+
17
+ class TimeOfDay < Alula::Dcp::ObjectField
18
+ field :hour,
19
+ type: :number
20
+ field :minute,
21
+ type: :number
22
+ end
23
+
24
+ field :index, type: :number
25
+
26
+ field :trouble_beep_suppress_start,
27
+ type: :object,
28
+ use: TimeOfDay
29
+
30
+ field :trouble_beep_suppress_end,
31
+ type: :object,
32
+ use: TimeOfDay
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ class VirtualInterfaceOptions < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/panelOptions/virtualInterfaceOptions'
16
+
17
+ field :index, type: :number
18
+ field :priority,
19
+ type: :number
20
+ field :wifi_channel_number,
21
+ type: :number
22
+ field :interface_type,
23
+ type: :string
24
+ field :supervised,
25
+ type: :boolean
26
+ field :ssid_hidden,
27
+ type: :boolean
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class PanelOptions < Alula::Dcp::BaseResource
7
+ extend Alula::Dcp::ResourceAttributes
8
+ extend Alula::DcpOperations::Request
9
+ extend Alula::DcpOperations::Save
10
+ extend Alula::DcpOperations::Delete
11
+ extend Alula::DcpOperations::DeleteStaged
12
+
13
+ resource_name 'config/panelOptions'
14
+
15
+ field :ac_fail_detect_delay,
16
+ type: :object,
17
+ use: Alula::Dcp::Config::PanelOptions::AcFailDetectDelay
18
+ field :event_reporting_delay,
19
+ type: :array,
20
+ of: Alula::Dcp::Config::PanelOptions::EventReportingDelay
21
+ field :trouble_beep_suppress,
22
+ type: :array,
23
+ of: Alula::Dcp::Config::PanelOptions::TroubleBeepSuppress
24
+ field :panel_options,
25
+ type: :array,
26
+ of: Alula::Dcp::Config::PanelOptions::PanelOptions
27
+ field :reportable_event_types_system,
28
+ type: :object,
29
+ use: Alula::Dcp::Config::PanelOptions::ReportableEventTypesSystem
30
+ field :reportable_event_types_partitions,
31
+ type: :array,
32
+ of: Alula::Dcp::Config::PanelOptions::ReportableEventTypesPartitions
33
+ field :system_options,
34
+ type: :object,
35
+ use: Alula::Dcp::Config::PanelOptions::SystemOptions
36
+ field :panel_led_brightness,
37
+ type: :object,
38
+ use: Alula::Dcp::Config::PanelOptions::PanelLedBrightness
39
+ field :panel_misc_options,
40
+ type: :object,
41
+ use: Alula::Dcp::Config::PanelOptions::PanelMiscOptions
42
+ field :virtual_interface_options,
43
+ type: :array,
44
+ of: Alula::Dcp::Config::PanelOptions::VirtualInterfaceOptions
45
+ field :minimum_pin_size,
46
+ type: :object,
47
+ use: Alula::Dcp::Config::PanelOptions::MinimumPinSize
48
+ field :swinger_threshold,
49
+ type: :array,
50
+ of: Alula::Dcp::Config::PanelOptions::SwingerThreshold
51
+ field :key_fob_button_functions,
52
+ type: :array,
53
+ of: Alula::Dcp::Config::PanelOptions::KeyFobButtonFunctions
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class Partitions < Alula::Dcp::BaseResource
7
+ class Partition < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ class ArmingLevelEnable < Alula::Dcp::ObjectField
16
+ field :level1,
17
+ type: :boolean
18
+ field :level2,
19
+ type: :boolean
20
+ field :level3,
21
+ type: :boolean
22
+ field :level4,
23
+ type: :boolean
24
+ field :level5,
25
+ type: :boolean
26
+ field :level6,
27
+ type: :boolean
28
+ field :level7,
29
+ type: :boolean
30
+ field :level8,
31
+ type: :boolean
32
+ end
33
+ resource_name 'config/partitions/partition'
34
+
35
+ field :index, type: :number
36
+ field :account_number,
37
+ type: :string
38
+ field :type,
39
+ type: :string
40
+ field :controlling_partitions,
41
+ type: :array,
42
+ of: :boolean
43
+ field :name,
44
+ type: :string
45
+ field :duress_pin,
46
+ type: :string
47
+ field :arming_level_enable,
48
+ type: :object,
49
+ use: Alula::Dcp::Config::Partitions::Partition::ArmingLevelEnable
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -2,19 +2,19 @@
2
2
 
3
3
  module Alula
4
4
  module Dcp
5
- class UsersData
6
- # Panel User Resource
7
- class InstallerPin < Alula::Dcp::BaseResource
5
+ class Config
6
+ class Partitions < Alula::Dcp::BaseResource
8
7
  extend Alula::Dcp::ResourceAttributes
9
8
  extend Alula::DcpOperations::Request
10
9
  extend Alula::DcpOperations::Save
11
10
  extend Alula::DcpOperations::Delete
12
11
  extend Alula::DcpOperations::DeleteStaged
13
12
 
14
- resource_name 'config/usersData/installerPin'
13
+ resource_name 'config/partitions'
15
14
 
16
- field :primitive,
17
- type: :string
15
+ field :partition,
16
+ type: :array,
17
+ of: Alula::Dcp::Config::Partitions::Partition
18
18
  end
19
19
  end
20
20
  end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config
6
+ class SirenData < Alula::Dcp::BaseResource
7
+ class Siren < Alula::Dcp::BaseResource
8
+ extend Alula::Dcp::ResourceAttributes
9
+ extend Alula::DcpOperations::Request
10
+ extend Alula::DcpOperations::Save
11
+ extend Alula::DcpOperations::Delete
12
+ extend Alula::DcpOperations::DeleteStaged
13
+ include Alula::Dcp::StagedValueMethods
14
+
15
+ resource_name 'config/sirenData/siren'
16
+
17
+ field :index, type: :number
18
+ field :id,
19
+ type: :number
20
+ field :device_type,
21
+ type: :string
22
+ field :partition,
23
+ type: :array,
24
+ of: :boolean
25
+ field :plays_other,
26
+ type: :boolean
27
+ field :plays_chime_open,
28
+ type: :boolean
29
+ field :plays_chime_close,
30
+ type: :boolean
31
+ field :plays_exit_delay,
32
+ type: :boolean
33
+ field :plays_entry_delay,
34
+ type: :boolean
35
+ field :plays_aux_alarm,
36
+ type: :boolean
37
+ field :plays_intrusion_alarm,
38
+ type: :boolean
39
+ field :plays_life_safety_alarm,
40
+ type: :boolean
41
+ field :repeater_enabled,
42
+ type: :boolean
43
+ field :plays_life_safety_alarm_all_partitions,
44
+ type: :boolean
45
+ field :burg_alarm_volume,
46
+ type: :number
47
+ field :aux_alarm_volume,
48
+ type: :number
49
+ field :non_alarm_volume,
50
+ type: :number
51
+ field :led_brightness_level,
52
+ type: :number
53
+ field :name,
54
+ type: :string
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alula
4
+ module Dcp
5
+ class Config < Alula::Dcp::BaseResource
6
+ class SirenData < Alula::Dcp::BaseResource
7
+ extend Alula::Dcp::ResourceAttributes
8
+ extend Alula::DcpOperations::Request
9
+ extend Alula::DcpOperations::Save
10
+ extend Alula::DcpOperations::Delete
11
+ extend Alula::DcpOperations::DeleteStaged
12
+
13
+ resource_name 'config/sirenData'
14
+
15
+ field :siren,
16
+ type: :array,
17
+ of: Alula::Dcp::Config::SirenData::Siren
18
+ end
19
+ end
20
+ end
21
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Alula
4
4
  module Dcp
5
- class Config
5
+ class Config < Alula::Dcp::BaseResource
6
6
  # Synchronize DCP configuration
7
7
  class Synchronize < Alula::SingletonDcpCommandResource
8
8
  extend Alula::Dcp::ResourceAttributes