Article ID: 150323sab
Last Reviewed: June 27 2018
The information in this article applies to:
- PMGateway version 3.0.1 and later when used to provide remote access to one of the Power Master Loggers
- NOTE: PMGateway was previously called PmRemoteAgent in older releases.
Target Audience.
This article is aimed at:
- All users of PMGateway who wish to remotely control a Power Master Logger
Summary.
PMGateway is an application that runs on a phone or tablet running the Android operating system. It provides timed remote download and control of a Power Master Logger. Remote control of PMGateway and the Logger is achieved by sending an SMS message to the phone or tablet which PMGateway receives, interprets and performs the command requested.
Before you start.
You will need all of the following:
1) An Android device to which you can send SMS messages.
2) A copy of PMGateway installed on the Android device.
3) A Power Master PM1000, PM2000, PM3000 or PM7000 with a Bluetooth, USB or Ethernet interface.
4) A device from which to send SMS messages.
Command Format.
All commands have a common format and follow these conventions:
1) A command starts with the period / dot character “.”
2) A single command word immediately follows the period/dot character.
3) The parameters (if required) follow the command word and are space separated.
4) A parameter containing spaces must be enclosed in double quotes.
5) A final optional parameter determines where any response generated should be sent.
6) Commands are not case sensitive so .start .START and .stART are all considered the same.
Command quick reference.
Command | Parameter 1 | Parameter 2 | Parameter 3 |
.login | [phone number] | [email | sms | none] | |
.logout | [phone number] | [email | sms | none] | |
.response | [email | sms | none] | ||
.start | [email | sms | none] | ||
.stop | [email | sms | none] | ||
.restart | [email | sms | none] | ||
.status | [email | sms | none] | ||
.values | [email | sms | none] | ||
.registers | <location> | <count> | [email | sms | none] |
New commands added in PMGateway 3.0.12
Command | Parameter 1 | Parameter 2 | Parameter 3 |
.numbers | [email | sms | none] | ||
.settings | [email | sms | none] | ||
<user>@<domain.com> | [email | sms | none] | ||
.pollinterval | <minutes> | [email | sms | none] | |
.pollstart | [email | sms | none] | ||
.pollstop | [email | sms | none] | ||
.scan | [email | sms | none] | ||
.logger | <Logger SN> | [email | sms | none] | |
.config | [email | sms | none] |
New commands added in PMGateway 3.0.17
Command | Parameter 1 | Parameter 2 | Parameter 3 |
.alertenable | [email | sms | none] | ||
.alertdisable | [email | sms | none] | ||
.alertemail | <user>@<domain.com> | [email | sms | none] | |
.configupload | http(s)://<domain>/<filename>.zip | [email | sms | none] | |
.configlist | [email | sms | none] | ||
.configload | <filename>.plc | [email | sms | none] |
Command descriptions.
.Login Command
For security and data integrity reasons PMGateway ignores messages received from a number/phone that is not authorised. The .login command adds a number to the list of authorised numbers. This command needs to be used once for each number/phone authorised to control PMGateway.
There are two ways to use this command to authorise a number.
1) When next to the device running PMGateway, ensure PMGateway is running in the foreground and send the .login command without any parameters from the device you wish to authorise. PMGateway presents a dialog on the screen requesting confirmation. Click Yes to add the number to the authorised number list.
2) When not near the device running PMGateway a number can be authorised, from a second previously authorised number, by sending the .login command followed by the number of the phone to be authorised.
Examples:
.login 012345678910 email Adds 012345678910 to the authorised numbers list and send response back over email.
.login Add this phones number to the authorised numbers list, local access to the device running PMGateway required to accept.
.Logout Command
Removes a number from the list of authorised numbers.
Examples
.logout 012345678910 Deletes 012345678910 from the list of authorised numbers (this can be sent from 012345678910 but would be the last command accepted from that number).
.Response Command
Sets the default response method, this is how PMGateway is to respond when a command is sent that does not have: <email>, <sms> or <none> appended.
Examples
.response email SMS commands received from now on will by default respond over email.
.response none no response will be returned from SMS commands.
.Start Command
Starts the Logger recording. If the Logger is already recording this has no effect.
Examples
.start email Start the Logger recording, sending the result over email
.start sms Start the Logger recording, sending the result back in an SMS
.Stop Command
Stops the Logger recording. If the Logger is not recording this has no effect. Examples
.stop email Stop the Logger recording, sending the result over email
.stop sms Stop the Logger recording, sending the result back in an SMS
.Restart Command
Stops and then starts the Logger recording. If the Logger is not recording this will start the Logger recording.
Examples
.restart email Stop the current recording and start the next session, sending the result over email
.restart sms Stop the current recording and start the next session, sending the result back in an SMS
.Status Command
Reads the Loggers status and returns the results.
Examples
.status email Get the Logger status, sending the result back in an email
.status sms Get the Logger status, sending the result back in an SMS
Example Response
PM1S0651
Status: Recording
Battery Volts: 5.979 V
Ambient Temp: 32.8 deg
Firmware: 1.025
Free Memory: 3.89 %
.Values Command
Reads the Loggers channel values and returns the results.
Examples .values email Get the channel values and send the results back over email
.values sms Get the channel values and send the results back over SMS
Example Response
Channels:
01=230.8 Vac
02= 8.1 Aac
03= 2.0%
04= 2.2 Aac
05= 0.00 Pfs
06= 1.00 Flg
07= 0.37 Pst
08= 0.33 Plt
09= 0.49 Vac
10=50.05 Hz
.Registers Command
reserved for development not for use by end users.
.Numbers Command
returns a list of registered phone numbers.
Examples
.numbers email return list of registered number by email
.Settings Command
returns the current settings for PMGateway.
Examples
.settings email return PMGateway settings by email
Example Response
poll.period=15
email.address=<user>@<domain.com>
email.interval=every hour
upload=email
PM7S0363.connection=bluetooth
.Email Command
specifies the e-mail to send data and responses too.
Examples.
.email john.doe@example.com sets the email for results to: john.doe@example.com
.Pollinterval command
specifies the interval in minutes at which to poll the logger.
Examples.
.pollinterval 15 sets the poll interval to 15 minutes
.PollStart command
starts PMGateway polling the Logger.
Examples.
.pollstart First poll will occur on the next interval boundary
.PollStop Command
stops PMGateway polling the Logger.
Examples.
.pollstop Finish any poll in progress then do no more polling
.Scan Command
Performs a Bluetooth scan and report any Loggers found.
Examples.
.scan PMGateway will scan for nearby loggers (unless a poll is in progress).
Example Response
Bluetooth devices detected:
PM7000sn0501
PM7000sn1107
PM7000sn1065
PM7000sn0363
PM3000sn0850
.Logger Command
Select which Logger to use for further commands.
Examples.
.logger PM7S0123 Select PM7000 serial number 0123 for any subsequent commands.
.Config Command
Extracts the current configuration from the Logger and sends it to the registered email address.
Examples.
.config send the current configuration from the selected Logger to the registered e-mail address.
.AlertEnable Command
Some Loggers include an Alert flag which is checked when the Logger is polled. If enabled and the alert flag is set when a poll occurs an e-mail is sent immediately, rather than waiting for the next email interval.
Examples.
.alertenable turn on alert e-mails.
.AlertDisable Command
Turns off alert emails.
If supported the alert status is still checked and reported with the normal e-mails.
Examples.
.alertdisable turn off alert emails.
.AlertEmail Command
Sets a different e-mail to which to send alert e-mails.
Examples.
.alertemail jane.doe@example.com sets the email for alerts to: jane.doe@example.com
.ConfigUpload Command
Allows a configuration to be uploaded from a URL.
The URL must point to a zip file containing a single .plc file and must be accessible by the PMGateway device using http or https.
URL’s containing spaces must be quoted.
Examples.
.configupload “http://www.example.com/loggers/3p4wYconfig.zip” download the zip file from the specified URL to the phone, unzip it and transfer the included .plc file to the Logger.
.ConfigList Command
Get a list of configs present in the Logger and send it to the registered email address.
Examples.
.configlist send a list of configurations by email.
.ConfigLoad Command
Load a specified configuration into the Logger.
Examples.
.configload “3p4w Y Std PQ 8MB 400A 7day.plc” load the specified configuration into the Logger.