-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathVistaAlarm_sorting_example.yaml
More file actions
667 lines (566 loc) · 18.9 KB
/
VistaAlarm_sorting_example.yaml
File metadata and controls
667 lines (566 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
#for documentation see project at https://github.com/Dilbert66/esphome-VistaECP
substitutions:
name: "vistaalarm" #unique network name, system name
friendlyName: "Vista Alarm" #used as the friendly name of your application in HomeAssistant
panelId: "VistaAlarm" #used as the service variable name.
accesscode: !secret access_code
vista_alarm_panel:
id: $panelId
accesscode: $accesscode #Only comes into effect if needed for arming and quickarm is not set
maxzones: "48" #maximum amount of zones that your panel supports
maxpartitions: "1" #maximum amount of partitions that your panel supports
# Enroll your RF serial devices here. Format: serial#:loop#:zone# Each record is comma separated.
# For most devices loop1 is used such as 5800pir, other devices such as 5816 will use loop2. Please refer to your
# RF device programming (*56 program) to see what loop and zones are assigned to your RF devices.
# You can refer to the pdf link below for more details on loop numbers
# https://advancedsecurityllc.com/wp-content/uploads/5800%20Wireless%20Device%20List.pdf
#
# Note: These entries are used to identify and report immediate open/close/battery
# activities directly from your RF devices, bypassing the panel. This is beneficial
# since the panel only reports open events to the keypads. The firmware will work fine
# without these entries except you will have a delay of TTL milliseconds before
# the report of closed zones.
rfseriallookup: "0019994:2:66,0818433:4:22,0123456:1:55,0399512:1:17" # serial1:loop#:zone1,serial2:loop#:zone2
defaultpartition: "1" #set to your main partition
vistadebuglevel: "3" #component debug level for messages
#Assign a new virtual keypad address to each active partition using programs *190 - *196
#and enter it below. For unused partitions, use 0 as the keypad address below.
keypadaddr1: "17" #partition 1 virtual keyapd
keypadaddr2: "0" #partition 2 virtual keypad. set to 0 to disable
keypadaddr3: "0" #partition 3 virtual keypad. set to 0 to disable
#AUI address from program field *189 to use for zone status queries (open/close and bypass).
#Ensure it is not assigned to a real keypad or to Total Connect 2.0. For those panels, you can select auiaddr: 5 or 6.
#As a final option, you can assign it to the same address as your existing AUI display address of 1
#Note: Older vista20 panels only have addresses 1 and 2 while newer will have 1,2,5 and 6. For Vista128,Vista250 commercial panels, ensure the address used is setup as an AUI keypad in program #93, device programming
auiaddr: "2" #use auiaddr: 5 or 6 if you already have address 2 assigned to Total Connect or another keypad
##esp32
rxpin: "22" #GPIO pin to use for data receive (yellow line)
txpin: "21" #GPIO pin to use for data transmit (green line)
monitorpin: "18" #GPIO pin to use for monitoring module traffic such as RF or Expanders . Set to -1 to disable
#input mode control
invert_mon: "true"
invert_rx: "true"
invert_tx: "true"
input_mode_rx: INPUT
input_mode_mon: INPUT
##esp8266
#rxpin: "5" #GPIO pin to use for data receive (yellow line)
#txpin: "4" #GPIO pin to use for data transmit (green line)
#monitorpin: "14" #GPIO pin to use for monitoring module traffic such as RF or Expanders . Set to -1 to disable
##rp2040
#rxpin: "21" #GPIO pin to use for data receive (yellow line)
#txpin: "20" #GPIO pin to use for data transmit (green line)
#monitorpin: "18" #GPIO pin to use for monitoring module traffic such as RF or Expanders . Set to -1 to disable
#note for the vista128 and vista250, the expanderaddr and relayaddr addresses must be 0
# module addresses:
# 07 4229 zone expander zones 9-16
# 08 4229 zone expander zones 17-24
# 09 4229 zone expander zones 25-32
# 10 4229 zone expander zones 33-40
# 11 4229 zone expander zones 41 48
# 12 4204 relay module
# 13 4204 relay module
# 14 4204 relay module
# 15 4204 relay module
expanderaddr1: "0" # 1st zone expander emulator (4229) address to use . Set to 0 to disable.
expanderaddr2: "0" # 2nd expander emulator address to use . Set to 0 to disable.
relayaddr1: "0" # relay module emulation (4204) addresses. Set to 0 to disable
relayaddr2: "0"
relayaddr3: "0"
relayaddr4: "0"
ttl: "30000" # time to live in ms for zone/fire status before expiring;
quickarm: "false"
lrrsupervisor: "false" # set to true if we don't have an LRR monitoring supervisor we can emulate one to get the statuses
#enable use of second esp32 core for async polling of panel data. default: true
# set to false if you get watchdog errors
use_async_polling: true
clean_build: "false" #default is false. only set to true if getting duplication errors in linking step. Once you compile, reset it back to false.
esp32:
board: nodemcu-32s
framework:
type: arduino
version: recommended
#esp8266:
#board: nodemcuv2
#framework:
#version: recommended
#rp2040:
#board: rpipicow
#framework:
#platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
#location of alarm panel code. You can use the github release version or
#copy the code to directory "my_components" in your main esphome directory
# see here for more info: https://esphome.io/components/external_components
external_components:
- source: github://Dilbert66/esphome-components@dev #uncomment to use github repository
#- source: my_components #uncomment to use local directory
components: [vista_alarm_panel,web_server,mg_lib]
refresh: 10min
## web keypad component
## each included files will be downloaded automatically and compiled within the flash.
## there will be no need for internet access when running.
#For www.js build details and source: https://github.com/Dilbert66/esphome-webserver-custom/tree/keypad
#Component source: https://github.com/Dilbert66/esphome-components/tree/keypad/components/web_keypad
### Note: this is an ESP32 only component. The esp8266 does not support the resources needed.
web_server:
port: 80
partitions: 1 # a keypad will be shown for each partition
log: false
auth: #this section is optional. Enable if you need authentication/encryption
username: test
password: test
encryption: true #set true to use AES256HMAC encryption/auth for sent keys and returned LCD messages
#set to false to use Digest authentication - no encryption
config_url: https://dilbert66.github.io/config_files/config_vista.yml
js_url: https://dilbert66.github.io/js_files/www_v3.js
version: 3
sorting_groups:
- id: partition1
name: "Partition 1 Status"
sorting_weight: 1
- id: partition2
name: "Partition 2 Status"
sorting_weight: 2
- id: panel
name: "Panel Status"
sorting_weight: 3
- id: zones
name: "Zones"
sorting_weight: 4
## If you prefer to use locally hosted compile time files comment two lines above and uncomment below
#config_local: ./config_vista.yml
#js_local: ./www.js
## custom function call to send keypresses if other than dsc/vista components are used. Parmeters are a string keys and int partition
#service_lambda: |-
#$panelId->alarm_keypress_partition(keys,partition);
#you can remove/disable this section if you don't want your panel time updated automatically.
#interval:
#- interval: 7200s
# then:
# - lambda: |-
# $panelId->set_panel_time();
esphome:
name: $name
friendly_name: $friendlyName
#Example of how to set the panel time from the esp time on bootup
#on_boot:
#priority: 600
#then:
#- lambda: |-
# $panelId->set_panel_time();
# output sympols to output.map for debugging. you can remove if not needed
platformio_options:
build_flags:
- "-Wl,-Map,output.map"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "$name"
password: !secret wifi_password
logger:
baud_rate: 115200
level: debug
api:
encryption:
key: !secret encryption_key
custom_services: true
#to use mqtt disable the api: section above. This enables you to use esphome with
#non homeassistant systems
#modify the mqtt section to your needs
#See: https://esphome.io/components/mqtt.html
#mqtt:
#broker: 192.168.2.175
#port: 1883
#username: mqttuser
#password: mqttuser
#discovery_prefix: "homeassistant"
#topic_prefix: $name
safe_mode:
ota:
password: !secret ota_password
platform: esphome
#on_begin: #disabled due to bug in esphome
#switch.turn_off: connection_status_switch
time:
- platform: sntp
########################################################################
# Edit binary and text sensors below to suit your alarm setup.
# You can safely add or remove any sensor as needed.
# The id code is entered using the "id:" tag. Alternatively you can
# add the id code in round brackets at the end of the sensor name: eg. (z1)
binary_sensor:
### zone sensors ###
# open/close status for each zone
# zone id code = z+zone number
- platform: vista_alarm_panel
id: z1
name: "Front door z1"
device_class: door
web_server:
sorting_weight: 1
sorting_group_id: zones
- platform: vista_alarm_panel
id: z2
name: "Garage door z2"
device_class: door
web_server:
sorting_weight: 2
sorting_group_id: zones
- platform: vista_alarm_panel
name: "Back door z3"
id: z3
device_class: door
web_server:
sorting_weight: 3
sorting_group_id: zones
- platform: vista_alarm_panel
id: z4
name: "Living room window z4"
device_class: window
web_server:
sorting_weight: 4
sorting_group_id: zones
- platform: vista_alarm_panel
id: z5
name: "Dining room window z5"
device_class: window
web_server:
sorting_weight: 5
sorting_group_id: zones
- platform: vista_alarm_panel
id: z6
name: "Family room window LF z6"
device_class: window
web_server:
sorting_weight: 6
sorting_group_id: zones
- platform: vista_alarm_panel
id: z7
name: "Family room window RF z7"
device_class: window
web_server:
sorting_weight: 7
sorting_group_id: zones
- platform: vista_alarm_panel
id: z8
name: "Basement windows z8"
device_class: window
web_server:
sorting_weight: 8
sorting_group_id: zones
- platform: vista_alarm_panel
id: z10
name: "Basement windows z10"
device_class: window
web_server:
sorting_weight: 10
sorting_group_id: zones
- platform: vista_alarm_panel
id: z17
name: "zone 17 z17"
device_class: window
web_server:
sorting_weight: 17
sorting_group_id: zones
# you can also add fields to show fault statuses of other devices you have. The id will be 1 + device address.
#relay addresses are 12/13/14/15
- platform: vista_alarm_panel
id: z112
name: "check relay 12"
device_class: problem
web_server:
sorting_weight: 112
sorting_group_id: zones
#zone expander device addresses are 07/08/09/10/11
- platform: vista_alarm_panel
id: z108
name: "check expander 08"
device_class: problem
web_server:
sorting_weight: 108
sorting_group_id: zones
#comm device address such as Alarmnet/LRR is 03
- platform: vista_alarm_panel
id: z103
name: "check comm device"
device_class: problem
web_server:
sorting_weight: 103
sorting_group_id: zones
### non zone sensors ###
# partition ready status
# ready id code = rdy_ + partition number
- platform: vista_alarm_panel
id: rdy_1
name: "Ready partiton 1"
web_server:
sorting_weight: 1
sorting_group_id: partition1
#Partition 2 example
- platform: vista_alarm_panel
id: rdy_2
name: "Ready partition 2"
web_server:
sorting_weight: 1
sorting_group_id: partition2
# partition/panel trouble status
# trouble id code = trbl_ + partition number
- platform: vista_alarm_panel
id: trbl_1
name: "Trouble partition 1"
device_class: problem
web_server:
sorting_weight: 2
sorting_group_id: partition1
#Partition 2 example
- platform: vista_alarm_panel
id: trbl_2
name: "Trouble partition 2"
device_class: problem
web_server:
sorting_weight: 2
sorting_group_id: partition2
# bypass zones active status
# bypass id code = byp_ + partition number
- platform: vista_alarm_panel
id: byp_1
name: "Bypass partition 1"
web_server:
sorting_weight: 3
sorting_group_id: partition1
#Partition 2 example
- platform: vista_alarm_panel
id: byp_2
name: "Bypass partition 2"
web_server:
sorting_weight: 3
sorting_group_id: partition2
# armed away status
# armed away id code = arma_ + partition number
- platform: vista_alarm_panel
name: "Away partition 1"
web_server:
sorting_weight: 4
sorting_group_id: partition1
#Partition 2 example
- platform: vista_alarm_panel
id: arma_2
name: "Away partition 2"
web_server:
sorting_weight: 4
sorting_group_id: partition2
# armed status
# armed id code = arm_ + partition number
- platform: vista_alarm_panel
id: arm_1
name: "Armed partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: arma_1
name: "Armed partition 2"
# armed stay status
# armed stay id code = arms_ + partition number
- platform: vista_alarm_panel
id: arms_1
name: "Stay partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: arms_2
name: "Stay partition 2"
# armed instant status
# armed instant id code = armi_ + partition number
- platform: vista_alarm_panel
id: armi_1
name: "Instant partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: armi_2
name: "Instant partition 2"
# armed night status
# armed night id code = armn_ + partition number
- platform: vista_alarm_panel
id: armn_1
name: "Night partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: armi_2
name: "Instant partition 2"
# ac status
# ac id code = (ac)
- platform: vista_alarm_panel
id: ac
name: "AC Status"
device_class: plug
# chime status
# chime id code = chm_ + partition number
- platform: vista_alarm_panel
id: chm_1
name: "Chime partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: chm_2
name: "Chime partition 2"
# alarm status
# alarm id code = alm_ + partition number
- platform: vista_alarm_panel
id: alm_1
name: "Alarm partition 1"
#Partition 2 example
- platform: vista_alarm_panel
id: alm_2
name: "Alarm partition 2"
# battery status
# battery id code = bat
- platform: vista_alarm_panel
id: bat
name: "Battery Status"
device_class: problem
web_server:
sorting_weight: 1
sorting_group_id: panel
# fire alarm status
# fire alarm id code = fire_ + partition number
- platform: vista_alarm_panel
id: fire_1
name: "Fire partition 1"
device_class: smoke
#Partition 2 example
- platform: vista_alarm_panel
id: fire_2
name: "Fire partition 2"
device_class: smoke
# relay status
# relay id code = r + address + channel
- platform: vista_alarm_panel
id: r121
name: "Relay1"
- platform: vista_alarm_panel
id: r122
name: "Relay2"
#### text sensors ####
text_sensor:
#alternative zone status as a text sensor. Values: O=open, B=bypass,T=trbl or check,A=alarm
# zone id code = z+zone number
- platform: vista_alarm_panel
name: "Front door zone z1"
id: z1x
web_server:
sorting_weight: 21
sorting_group_id: zones
# system status messages
# system status id code = ss_ + partition number
- platform: vista_alarm_panel
id: ss_1
name: "System Status partition 1"
icon: "mdi:shield"
# sample filter to change "not_ready" status to "disarmed" for use in HA Alarm Panel
# filters:
# - lambda: |-
# if (x == "not_ready") x="disarmed";
# return x;
#Partition 2 example
- platform: vista_alarm_panel
id: ss_2
name: "System Status partition 2"
icon: "mdi:shield"
# long range radio messages
# lrr id code = lrr
- platform: vista_alarm_panel
id: lrr
name: "Lrr Msg"
icon: "mdi:alert-box"
# RF zone messages
# RF id code = rf
- platform: vista_alarm_panel
id: rf
name: "RF Msg"
icon: "mdi:alert-box"
web_server:
sorting_weight: 2
sorting_group_id: panel
# virtual lcd keypad line1 and line2 messages for each partition
# partition line1 id code = ln1_ + partition number
# partition line2 id code = ln2_ + partition number
# partition 1
- platform: vista_alarm_panel
name: "Line1 partition 1"
id: ln1_1
- platform: vista_alarm_panel
name: "Line2 partition 1"
id: ln2_1
# partition 2
- platform: vista_alarm_panel
name: "Line1 partition 2"
id: ln1_2
- platform: vista_alarm_panel
name: "Line2 partition 2"
id: ln2_2
# zone status messages bypas/open/alarm
# zone status id code = zs
- platform: vista_alarm_panel
name: "Zone Status"
id: zs
web_server:
sorting_weight: 4
sorting_group_id: panel
# system beeps
# beeps id code = bp_ + partition number
- platform: vista_alarm_panel
name: "Beeps partition 1"
id: bp_1
#Partition 2 example
- platform: vista_alarm_panel
name: "Beeps partition 2"
id: bp_2
#optional cmd button example. Send any keypad keys
button:
- platform: vista_alarm_panel
name: Gate Button
id: gate1
icon: "mdi:emoticon-outline"
on_press:
- lambda: |-
$panelId->alarm_keypress_partition("${accesscode}#701",1);
#- platform: gpio #example use of pin d8 as a zone trigger port for the emulated zone expander
# pin: D8
# id: pind8
# device_class: window
# on_press: #zone,on/off
# - lambda: |-
# $panelId->setZoneFault(17,1);
# on_release:
# - lambda: |-
# $panelId->setZoneFault(17,0);
# end of panel sensor setup - no need to edit anything below.
##############################################################################
switch:
- platform: template
name: "$name Connection"
id: connection_status_switch
restore_mode: DISABLED
optimistic: true
lambda: |-
return $panelId->connected();
icon: "mdi:shield-link-variant"
turn_on_action:
- switch.toggle: restart_switch
turn_off_action:
- lambda: |-
$panelId->stop();
- platform: restart
id: restart_switch
- platform: safe_mode
name: "Safe Mode"
debug:
update_interval: 300s
sensor:
- platform: debug
free:
name: "Heap Free"
block:
name: "Heap Max Block"
loop_time:
name: "Loop Time"
#fragmentation: #esp8266 only
# name: "Heap Fragmentation"