Difference between revisions of "WorkMan HVS - IP Protocol"

From WorkManSoft Wiki
Jump to navigationJump to search
Line 73: Line 73:
 
|}
 
|}
  
 +
=== Wakeup ===
 +
 +
{| class="wikitable" {{table }}
 +
| style="background-color:#ffffcc;" |'''Command'''||WAKEUP
 +
|-
 +
| style="background-color:#ffffcc;" | '''Protocolversion'''||1
 +
|-
 +
| style="background-color:#ffffcc;" | '''Direction'''||HS to HVS
 +
|-
 +
| style="background-color:#ffffcc;" | '''Mandatory'''||No.
 +
|-
 +
| style="background-color:#ffffcc;" | '''Structure'''||WAKEUP;<roomid>;<wakeuptime>
 +
|-
 +
| style="background-color:#ffffcc;" | '''Response'''||OK;WAKEUP
 +
|-
 +
| style="background-color:#ffffcc;" | '''Example sender'''||WAKEUP;123;0645 ''Schedules a wakeupcall at 6:45 AM''<br>WAKEUP;123; ''Clears a scheduled wakeup''
 +
|-
 +
| style="background-color:#ffffcc;" | '''Example response'''||OK;WAKEUP
 +
|-
 +
| style="background-color:#ffffcc;" | '''About'''||Creates or clears a wakeupcall in HVS.
 +
|}
 +
 +
<wakeuptime> can be either a time in 24hour format (hhmm) or blank to clear.
 +
 +
Note that only one wakeupcall can be registered.
 +
 +
=== Wakeup Sent ===
 +
 +
{| class="wikitable" {{table }}
 +
| style="background-color:#ffffcc;" |'''Command'''||WAKEUPSTATUS
 +
|-
 +
| style="background-color:#ffffcc;" | '''Protocolversion'''||1
 +
|-
 +
| style="background-color:#ffffcc;" | '''Direction'''||HVS to HS
 +
|-
 +
| style="background-color:#ffffcc;" | '''Mandatory'''||No.
 +
|-
 +
| style="background-color:#ffffcc;" | '''Structure'''||WAKEUPSTATUS;<roomid>;<wakeuptime>;<wakeupstatuscode>
 +
|-
 +
| style="background-color:#ffffcc;" | '''Response'''||OK;WAKEUPSTATUS
 +
|-
 +
| style="background-color:#ffffcc;" | '''Example sender'''||WAKEUPSTATUS;123;0645;ANSWERED
 +
|-
 +
| style="background-color:#ffffcc;" | '''Example response'''||OK;WAKEUPSTATUS
 +
|-
 +
| style="background-color:#ffffcc;" | '''About'''||Send info to HS about a wakeupcall.
 +
|}
 +
 +
This is sent to HS when a wakeup is sent and considered finished and no retries will be made.
 +
 +
<wakeupstatuscode> can have the following values:
 +
 +
ANSWERED = wakeupcall was answered.<br>
 +
BUSY = busytone was detected and no more retries will be made.<br>
 +
TIMEOUT = No answer was made after x retries.
  
 
=== Check In ===
 
=== Check In ===

Revision as of 16:26, 31 August 2012

About

This protocol is our own protocol and can be used if no other protocol is in place.

The protocol works over TCP/IP and is linebased with CR+LF (#13#10) as a end of command terminator. WorkMan HVS can work both as a client and as a server so it's up to the hotelsystem to decide which way they prefer.

HS = Hotel System HVS = Our system (Hotel Växel System)

Commands

The first parameter is always the name of the command and the response to it always follows the form OK;<name of command> where OK is considered the command. The server/client should only send one command at a time and then wait for a response. If an answer hasn't been received within 10 seconds the connection should be considered down and a reconnect should be made.

Example:

HVS sends a welcome to a HS client that is connecting

 WELCOME;1

The HS-client responds

 OK;WELCOME

Common variables

<protocolversion> means what version of the protocol that support this. The current version is 1 only.

<roomid> the actual roomid that exists in the HS. Roomid of R1234 might have a extension 1234 in the PBX but might also be completely different. This is the roomid of th HS!

List over commands

Welcome

Command WELCOME
Protocolversion 1
Direction Server to client
Mandatory Yes
Structure WELCOME;<protocolversion>
Response OK;WELCOME
Example sender WELCOME;1
Example response OK;WELCOME
About Sends a welcome from the server to connecting client.

Keep-alive

Command ALIVE
Protocolversion 1
Direction HVS to HS
Mandatory No, only HVS in clientmode sends this.
Structure ALIVE
Response OK;ALIVE
Example sender ALIVE
Example response OK;ALIVE
About Sends an ALIVE-signal to the server to see that connection is up.

Wakeup

Command WAKEUP
Protocolversion 1
Direction HS to HVS
Mandatory No.
Structure WAKEUP;<roomid>;<wakeuptime>
Response OK;WAKEUP
Example sender WAKEUP;123;0645 Schedules a wakeupcall at 6:45 AM
WAKEUP;123; Clears a scheduled wakeup
Example response OK;WAKEUP
About Creates or clears a wakeupcall in HVS.

<wakeuptime> can be either a time in 24hour format (hhmm) or blank to clear.

Note that only one wakeupcall can be registered.

Wakeup Sent

Command WAKEUPSTATUS
Protocolversion 1
Direction HVS to HS
Mandatory No.
Structure WAKEUPSTATUS;<roomid>;<wakeuptime>;<wakeupstatuscode>
Response OK;WAKEUPSTATUS
Example sender WAKEUPSTATUS;123;0645;ANSWERED
Example response OK;WAKEUPSTATUS
About Send info to HS about a wakeupcall.

This is sent to HS when a wakeup is sent and considered finished and no retries will be made.

<wakeupstatuscode> can have the following values:

ANSWERED = wakeupcall was answered.
BUSY = busytone was detected and no more retries will be made.
TIMEOUT = No answer was made after x retries.

Check In

Command CHECKIN
Protocolversion 1
Direction HS to HVS
Mandatory No, but then all room must be manually checked in.
Structure CHECKIN;<roomid>;?????????????????
Response OK;CHECKIN
Example sender CHECKIN;123
Example response OK;CHECKIN
About


Check out

TBA

Extension lock/unlock

TBA

Room status

Command ROOMSTATUS
Protocolversion 1
Direction HVS to HS
Mandatory Yes, HS should be able to handle the message and send OK back.
Structure ROOMSTATUS;<roomid>;<roomstatuscode>
Response OK;ROOMSTATUS
Example sender ROOMSTATUS;123;1
Example response OK;ROOMSTATUS
About Sends information about what condition the room is in.

Roomstatuscode

The digit 0-9 that the maid registered. The meaning of this is dependant on the HS-system but here is a typical lineup.

  1. Dirty/Vacant (DIV)
  2. Dirty/Occupied (DIO)
  3. Clean/Vacant (CLV)
  4. Clean/Occupied (CLO)
  5. Inspected/Vacant (ISV)
  6. Inspected/Occupied (ISO)
  7.  ?
  8.  ?
  9.  ?

Call charge

Command CALLCHARGE
Protocolversion 1
Direction HVS to HS
Mandatory Yes, HS should be able to handle this.
Structure CALL;<roomid>;<callednumber>;<talked time in seconds>;<amount>
Response OK;CALLCHARGE
Example sender CALLCHARGE;123;0046708656820;35;0
Example response OK;CALLCHARGE
About Sends a callcharge to HS. Note that amount is included in the protocol but the current version of HVS (as of 31st of august 2012) doesn't send an actual amount but only sends 0 as amount. Note that the amount is also in a 100th fraction of the currency e.g. 1100 in amount is 11 SEK (or EUR or whatever currency that the system uses).