Skip to content

Commit 67033c3

Browse files
author
Jo Rhett
committed
v1.0.1 HPM manifest and logging improvements
Move logging of mode change request prior to sending to make Abode websocket delays visible Minor rewording of other log messages
1 parent 09c0b60 commit 67033c3

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed

.markdownlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
headers:
3+
allow_different_nesting: true
4+
line_length: false

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# Changelog
2-
All notable changes to this project will be documented in this file.
2+
3+
All notable changes to this project will be documented in this file.
34
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
45

56
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
67

8+
## 2020-04-25 Release 1.0.1
9+
10+
### Added
11+
12+
- Hubitat Package Manager manifest
13+
14+
### Changed
15+
16+
- Move logging of mode change request prior to sending to make Abode websocket delays visible
17+
- Reformat log messages for easier understanding when debug is disabled.
18+
_Author had never run it with debug logging disabled_. :stuck_out_tongue_winking_eye:
19+
720
## 2020-04-25 Release 1.0
821

922
No changes

drivers/AbodeAlarm.groovy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ private clearLoginState() {
205205
private changeMode(String new_mode) {
206206
if(new_mode != device.currentValue('gatewayMode')) {
207207
// Only update area 1 since area is not returned in event messages
208+
log.info "Sending request to change Abode gateway mode to ${new_mode}"
208209
reply = doHttpRequest('PUT','/api/v1/panel/mode/1/' + new_mode)
209210
if (reply['area'] == '1') {
210-
log.info "Sent request to change Abode gateway mode to ${new_mode}"
211211
state.localModeChange = new_mode
212212
}
213213
} else {
@@ -533,7 +533,7 @@ def parseEvent(String event_text) {
533533
break
534534

535535
default:
536-
log.warn "Event ${event_class} has unknown data format: ${event_data}"
536+
log.warn "Abode event ${event_class} has unknown data format: ${event_data}"
537537
message = event_data
538538
break
539539
}
@@ -582,11 +582,11 @@ def parseEvent(String event_text) {
582582
break
583583

584584
default:
585-
if (logDebug) log.debug "Ignoring Event ${event_class} ${message}"
585+
if (logDebug) log.debug "Ignoring event ${event_class} ${message}"
586586
break
587587
}
588588
} else {
589-
log.warn "Unparseable Event message: ${event_text}"
589+
log.warn "Unparseable Abode event message: ${event_text}"
590590
}
591591
}
592592

@@ -630,12 +630,12 @@ def parse(String message) {
630630
message_data = packet_data.substring(1)
631631
switch(message_type) {
632632
case '0':
633-
log.info 'webSocket message = Event socket connected'
633+
log.info 'Abode event socket connected'
634634
runInMillis(state.webSocketPingInterval, sendPing)
635635
break
636636

637637
case '1':
638-
log.info 'webSocket message = Event socket disconnected'
638+
log.info 'webSocket message = event socket disconnected'
639639
break
640640

641641
case '2':
@@ -686,13 +686,13 @@ def webSocketStatus(String message) {
686686
break
687687

688688
case ~/^failure:(.*)$/:
689-
log.warn 'Event socket connection: ' + message
689+
log.warn 'Abode event socket connection: ' + message
690690
state.webSocketConnected = false
691691
state.webSocketConnectAttempt += 1
692692
break
693693

694694
default:
695-
log.warn 'Event socket sent unexpected message: ' + message
695+
log.warn 'Abode event socket sent unexpected message: ' + message
696696
state.webSocketConnected = false
697697
state.webSocketConnectAttempt += 1
698698
}

packageManifest.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"packageName": "Abode Alarm",
3+
"minimumHEVersion": "2.1.0",
4+
"author": "Jo Rhett",
5+
"version": "1.0.1",
6+
"dateReleased": "2020-07-18",
7+
"licenseFile": "https://github.com/jorhett/hubitat-abode/blob/master/LICENSE",
8+
"releaseNotes": "https://github.com/jorhett/hubitat-abode/blob/master/CHANGELOG.md",
9+
"apps" : [],
10+
"drivers" : [
11+
{
12+
"id" : "a3f88dd8-474c-4fe7-a226-521f44638d87",
13+
"name": "Abode Alarm",
14+
"namespace": "jorhett",
15+
"location": "https://raw.githubusercontent.com/jorhett/hubitat-abode/v1.0.1/drivers/AbodeAlarm.groovy",
16+
"required": true
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)