Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
halacs committed Jan 31, 2024
1 parent 8dc0289 commit 22da68e
Showing 1 changed file with 14 additions and 41 deletions.
55 changes: 14 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ If all goes fine, later this repository will provide you both a GoLang SDK and a

## Usage
```
$ ./halsecur
Application to manage your Hörmann BiSecur gateway without the central cloud directly on your LAN.
Usage:
Expand All @@ -48,6 +49,7 @@ Flags:
--debug debug log level (default true)
-h, --help help for halsecur
--host string IP or host name or the Hörmann BiSecure gateway
--json use json logging format instead of human readable
--mac string MAC address of the Hörmann BiSecur gateway
--password string Valid password belongs to the given username
--port int (default 4000)
Expand All @@ -59,70 +61,41 @@ Use "halsecur [command] --help" for more information about a command.

### Ping
```bash
$ ./halsecur ping --host 192.168.3.232 --mac 54:10:EC:85:28:BB --count 3 --delay 1000
INFO[2024-01-14T10:18:54+01:00] Response 1 of 3 received in 73 ms
INFO[2024-01-14T10:18:55+01:00] Response 2 of 3 received in 75 ms
INFO[2024-01-14T10:18:56+01:00] Response 3 of 3 received in 76 ms
$ dist/halsecur ping --host 192.168.3.232 --mac 54:10:EC:85:28:BB --count 3 --delay 1000
INFO[2024-01-31T21:12:46+01:00] Response 1 of 3 received in 67 ms
INFO[2024-01-31T21:12:47+01:00] Response 2 of 3 received in 64 ms
INFO[2024-01-31T21:12:48+01:00] Response 3 of 3 received in 63 ms
```

### Get device name
```bash
$ ./dist/halsecur get-name
DEBU[2023-12-26T21:02:50+01:00] Connecting to 192.168.3.232:4000
DEBU[2023-12-26T21:02:50+01:00] Request: SrcMAC=0x000000000009, DstMAC=0x5410EC8528BB, BodyLength=0x0, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x26 (0x26), payload=[], Checksum=0x0, isResponse=false], Checksum=0x0, isResponse: false
DEBU[2023-12-26T21:02:50+01:00] Request bytes: 3030303030303030303030393534313045433835323842423030303930313739373444423537323634464346
DEBU[2023-12-26T21:02:50+01:00] Length of received bytes: 74
DEBU[2023-12-26T21:02:50+01:00] Response bytes: 5410EC8528BB0000000000060018017974DB57A64269536563757220476174657761797D11
DEBU[2023-12-26T21:02:50+01:00] Received TC: SrcMAC=0x5410EC8528BB, DstMAC=0x000000000006, BodyLength=0x18, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x26 (0xA6), payload=[GetNameResponse: BiSecur Gateway], Checksum=0x7D, isResponse=true], Checksum=0x11, isResponse: true
INFO[2023-12-26T21:02:50+01:00] Received name: BiSecur Gateway
$ dist/halsecur get-name
INFO[2024-01-31T21:08:47+01:00] Received name: BiSecur Gateway
```

### Login
```bash
$ ./dist/halsecur login --host 192.168.3.232 --mac 54:10:EC:85:28:BB --password Gabor123456789. --username app --debug
DEBU[2023-12-26T21:00:19+01:00] Connecting to 192.168.3.232:4000
DEBU[2023-12-26T21:00:19+01:00] Request: SrcMAC=0x000000000009, DstMAC=0x5410EC8528BB, BodyLength=0x0, packet=[Tag=0x1, Token=0x0, CommandID=0x10 (0x10), payload=[appGabor123456789.], Checksum=0x0, isResponse=false], Checksum=0x0, isResponse: false
DEBU[2023-12-26T21:00:19+01:00] Request bytes: 30303030303030303030303935343130454338353238424230303143303130303030303030303130303336313730373034373631363236463732333133323333333433353336333733383339324536373446
DEBU[2023-12-26T21:00:19+01:00] Length of received bytes: 54
DEBU[2023-12-26T21:00:19+01:00] Response bytes: 5410EC8528BB000000000006000E010000000090017974DB57BFC8
DEBU[2023-12-26T21:00:19+01:00] Received TC: SrcMAC=0x5410EC8528BB, DstMAC=0x000000000006, BodyLength=0xE, packet=[Tag=0x1, Token=0x0, CommandID=0x10 (0x90), payload=[SenderID: 0x1, Token: 0x7974DB57], Checksum=0xBF, isResponse=true], Checksum=0xC8, isResponse: true
INFO[2023-12-26T21:00:19+01:00] Token: 0x7974DB57
$ ./dist/halsecur login --host 192.168.3.232 --mac 54:10:EC:85:28:BB --password Gabor123456789. --username app
INFO[2024-01-31T21:09:40+01:00] Token: 0x3AC29326
INFO[2024-01-31T21:09:40+01:00] Success
```

### Get users
```bash
$ ./dist/halsecur users list
DEBU[2023-12-26T21:01:38+01:00] Connecting to 192.168.3.232:4000
DEBU[2023-12-26T21:01:38+01:00] Request: SrcMAC=0x000000000009, DstMAC=0x5410EC8528BB, BodyLength=0x0, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x6 (0x6), payload=[Jcmp: {"CMD":"GET_USERS"}], Checksum=0x0, isResponse=false], Checksum=0x0, isResponse: false
DEBU[2023-12-26T21:01:38+01:00] Request bytes: 30303030303030303030303935343130454338353238424230303143303137393734444235373036374232323433344434343232334132323437343535343546353535333435353235333232374441314431
DEBU[2023-12-26T21:01:38+01:00] Length of received bytes: 250
DEBU[2023-12-26T21:01:38+01:00] Response bytes: 5410EC8528BB0000000000060070017974DB57865B7B226964223A302C226E616D65223A2261646D696E222C22697341646D696E223A747275652C2267726F757073223A5B5D7D2C7B226964223A312C226E616D65223A22617070222C22697341646D696E223A66616C73652C2267726F757073223A5B305D7D5D26EF
DEBU[2023-12-26T21:01:38+01:00] Received TC: SrcMAC=0x5410EC8528BB, DstMAC=0x000000000006, BodyLength=0x70, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x6 (0x86), payload=[Jcmp: [{"id":0,"name":"admin","isAdmin":true,"groups":[]},{"id":1,"name":"app","isAdmin":false,"groups":[0]}]], Checksum=0x26, isResponse=true], Checksum=0xEF, isResponse: true
INFO[2023-12-26T21:01:38+01:00] Users: [ID=0, Name="admin", IsAdmin=true, Groups:[]][ID=1, Name="app", IsAdmin=false, Groups:[0]]
INFO[2024-01-31T21:10:20+01:00] Users: [ID=0, Name="admin", IsAdmin=true, Groups:[]][ID=1, Name="app", IsAdmin=false, Groups:[0]]
```
### Get groups
```bash
$ ./dist/halsecur groups list
DEBU[2023-12-26T21:02:20+01:00] Connecting to 192.168.3.232:4000
DEBU[2023-12-26T21:02:20+01:00] Request: SrcMAC=0x000000000009, DstMAC=0x5410EC8528BB, BodyLength=0x0, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x6 (0x6), payload=[Jcmp: {"CMD":"GET_GROUPS"}], Checksum=0x0, isResponse=false], Checksum=0x0, isResponse: false
DEBU[2023-12-26T21:02:20+01:00] Request bytes: 303030303030303030303039353431304543383532384242303031443031373937344442353730363742323234333444343432323341323234373435353435463437353234463535353035333232374446303446
DEBU[2023-12-26T21:02:20+01:00] Length of received bytes: 152
DEBU[2023-12-26T21:02:20+01:00] Response bytes: 5410EC8528BB000000000006003F017974DB57865B7B226964223A302C226E616D65223A22676172617A73222C22706F727473223A5B7B226964223A302C2274797065223A317D5D7D5DD1EF
DEBU[2023-12-26T21:02:20+01:00] Received TC: SrcMAC=0x5410EC8528BB, DstMAC=0x000000000006, BodyLength=0x3F, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x6 (0x86), payload=[Jcmp: [{"id":0,"name":"garazs","ports":[{"id":0,"type":1}]}]], Checksum=0xD1, isResponse=true], Checksum=0xEF, isResponse: true
INFO[2023-12-26T21:02:20+01:00] Groups: ID=0 Name="garazs" Ports=[ID=0 Type=IMPULS]
INFO[2024-01-31T21:10:46+01:00] Groups: ID=0 Name="garazs" Ports=[ID=0 Type=IMPULS]
```
### Get door status
```bash
$ ./dist/halsecur status --devicePort 0
DEBU[2023-12-26T21:03:45+01:00] Connecting to 192.168.3.232:4000
DEBU[2023-12-26T21:03:45+01:00] Request: SrcMAC=0x000000000009, DstMAC=0x5410EC8528BB, BodyLength=0x0, packet=[Tag=0x1, Token=0x7974DB57, CommandID=0x70 (0x70), payload=[HmGetTransition], Checksum=0x0, isResponse=false], Checksum=0x0, isResponse: false
DEBU[2023-12-26T21:03:45+01:00] Request bytes: 30303030303030303030303935343130454338353238424230303041303137393734444235373730303039413336
DEBU[2023-12-26T21:03:46+01:00] Length of received bytes: 76
DEBU[2023-12-26T21:03:46+01:00] Response bytes: 5410EC8528BB00000000000600190100000000F000000000010102020000000000000000107B
DEBU[2023-12-26T21:03:46+01:00] Received TC: SrcMAC=0x5410EC8528BB, DstMAC=0x000000000006, BodyLength=0x19, packet=[Tag=0x1, Token=0x0, CommandID=0x70 (0xF0), payload=[HmGetTransitionResponse[StateInPercent: 0, DesiredStateInPerced: 0, Error: false, AutoClose: false, DriveTime: 0, Gk: 257, Hcp: HCP[PositionOpen: false, PositionClose: true, OptionRelais: false, LightBarrier: false, Error: false, DrivingToClose: false, Driving: false, HalfOpened: false, ForecastLeadTime: false, Learned: true, NotReferenced: false], Exst: [0 0 0 0 0 0 0 0], Time: 2023-12-26 21:03:46.233468596 +0100 CET m=+0.797944431]], Checksum=0x10, isResponse=true], Checksum=0x7B, isResponse: true
INFO[2023-12-26T21:03:46+01:00] Transition: HmGetTransitionResponse[StateInPercent: 0, DesiredStateInPerced: 0, Error: false, AutoClose: false, DriveTime: 0, Gk: 257, Hcp: HCP[PositionOpen: false, PositionClose: true, OptionRelais: false, LightBarrier: false, Error: false, DrivingToClose: false, Driving: false, HalfOpened: false, ForecastLeadTime: false, Learned: true, NotReferenced: false], Exst: [0 0 0 0 0 0 0 0], Time: 2023-12-26 21:03:46.233468596 +0100 CET m=+0.797944431]
INFO[2024-01-31T21:11:25+01:00] Transition: HmGetTransitionResponse[StateInPercent: 0, DesiredStateInPerced: 0, Error: false, AutoClose: false, DriveTime: 0, Gk: 257, Hcp: HCP[PositionOpen: false, PositionClose: true, OptionRelais: false, LightBarrier: false, Error: false, DrivingToClose: false, Driving: false, HalfOpened: false, ForecastLeadTime: false, Learned: true, NotReferenced: false], Exst: [0 0 0 0 0 0 0 0], Time: 2024-01-31 21:11:25.143422907 +0100 CET m=+1.916999818]
```
### Open/close door
Expand Down

0 comments on commit 22da68e

Please sign in to comment.