Ametek Land SPOT+ User manual

Advanced Digital Pyrometer Series
i
SPOT+ FAMILY
REST API USER GUIDE
LANGUAGE: ENGLISH
ISSUE: 1
DATE: 13 SEPTEMBER 2023
QUALITY CUSTOMER SOLUTIONS

Health and Safety Information
Read all of the instructions in this booklet - including all the WARNINGS and CAUTIONS
- before using this product. If there is any instruction which you do not understand, DO
NOT USE THE PRODUCT.
Safety Signs
WARNING
Indicates a potentially hazardous situation which, if not avoided, could result in death or
personal injury.
CAUTION
Indicates a potentially hazardous situation which, if not avoided, could result in minor or
moderate injury to the user or users, or result in damage to the product or to property.
NOTE
Indicates a potentially hazardous situation which, if not avoided, could result in damage or loss of data.
Signs and Symbols used on equipment and Documentation
Caution, risk of electric shock.
Caution, attention to possibility of risk of damage to the product, process or surroundings. Refer
to instruction manual.
Caution, hot surface.
Protective Conductor Terminal.
Observe precautions for handling electrostatic discharge sensitive devices.
Equipment Operation
Use of this instrument in a manner not specied by AMETEK Land may be hazardous. Read and
understand the user documentation supplied before installing and operating the equipment.
The safety of any system incorporating this equipment is the responsibility of the assembler.
Protective Clothing, Face and Eye Protection
It is possible that this equipment is to be installed on, or near to, machinery or equipment operating at
high temperatures and high pressures. Suitable protective clothing, along with face and eye protection
must be worn. Refer to the health and safety guidelines for the machinery/equipment before installing
this product. If in doubt, contact AMETEK Land.
Wear Protective Gloves Wear Protective Clothing
Wear Eye Protection Wear Ear Protection
Wear Safety Boots Wear Face Protection
Electrical Power Supply
Before working on the electrical connections, all of the electrical power lines to the equipment must
be isolated. All the electrical cables and signal cables must be connected exactly as indicated in these
operating instructions. If in doubt, contact AMETEK Land.
IMPORTANT INFORMATION - PLEASE READ

Health and Safety Information
Read all of the instructions in this booklet - including all the WARNINGS and CAUTIONS
- before using this product. If there is any instruction which you do not understand, DO
NOT USE THE PRODUCT.
Safety Signs
WARNING
Indicates a potentially hazardous situation which, if not avoided, could result in death or
personal injury.
CAUTION
Indicates a potentially hazardous situation which, if not avoided, could result in minor or
moderate injury to the user or users, or result in damage to the product or to property.
NOTE
Indicates a potentially hazardous situation which, if not avoided, could result in damage or loss of data.
Signs and Symbols used on equipment and Documentation
Caution, risk of electric shock.
Caution, attention to possibility of risk of damage to the product, process or surroundings. Refer
to instruction manual.
Caution, hot surface.
Protective Conductor Terminal.
Observe precautions for handling electrostatic discharge sensitive devices.
Equipment Operation
Use of this instrument in a manner not specied by AMETEK Land may be hazardous. Read and
understand the user documentation supplied before installing and operating the equipment.
The safety of any system incorporating this equipment is the responsibility of the assembler.
Protective Clothing, Face and Eye Protection
It is possible that this equipment is to be installed on, or near to, machinery or equipment operating at
high temperatures and high pressures. Suitable protective clothing, along with face and eye protection
must be worn. Refer to the health and safety guidelines for the machinery/equipment before installing
this product. If in doubt, contact AMETEK Land.
Wear Protective Gloves Wear Protective Clothing
Wear Eye Protection Wear Ear Protection
Wear Safety Boots Wear Face Protection
Electrical Power Supply
Before working on the electrical connections, all of the electrical power lines to the equipment must
be isolated. All the electrical cables and signal cables must be connected exactly as indicated in these
operating instructions. If in doubt, contact AMETEK Land.
IMPORTANT INFORMATION - PLEASE READ
Contact Us
UK - Droneld
Land Instruments International
Tel: +44 (0) 1246 417691
USA - Pittsburgh
AMETEK Land, Inc.
Tel: +1 412 826 4444
China
AMETEK Land China Service
Tel: +86 21 5868 5111 ext 122
India
AMETEK Land India Service
Tel: +91 - 80 67823240
Email: [email protected]
Web: www.ametek-land.com
For further details on all AMETEK Land oces, distributors and representatives, please visit our website.
Storage
The instrument should be stored in its packaging, in a dry sheltered area.
The maximum storage temperature is 10 °C (18 °F) higher than the maximum operating temperature.
The minimum storage temperature is 10 °C (18 °F) lower than the minimum operating temperature.
Refer to the Technical Specication for details of the operating temperature limits.
Unpacking
Check all packages for external signs of damage. Check the contents against the packing note.
Lifting Instructions
Where items are too heavy to be lifted manually, use suitably rated lifting equipment. Refer to the
Technical Specication for weights. All lifting should be carried out in accordance with local and national
regulations.
Return of Damaged Goods
IMPORTANT If any item has been damaged in transit, this should be reported to the carrier and to the
supplier immediately. Damage caused in transit is the responsibility of the carrier not the supplier.
DO NOT RETURN a damaged instrument to the sender as the carrier will not then consider a claim. Save
the packing with the damaged article for inspection by the carrier.
Return of Goods for Repair
If you need to return goods for repair please contact our Customer Service Department for details of the
correct returns procedure.
Any item returned to AMETEK Land should be adequately packaged to prevent damage during transit.
You must include a written report of the problem together with your own name and contact information,
address, telephone number, email address etc.
Design and Manufacturing Standards
The Quality Management System of Land Instruments International is approved to BS EN ISO 9001 for
the design, manufacture and on-site servicing of combustion, environmental monitoring and non-contact
temperature measuring instrumentation.
Registered ISO 9001 Management System approvals apply in the USA.
UK Calibration Laboratory: UKAS 0034.
USA Calibration Laboratory: ANAB Accredited ISO/IEC 17025.
National Accreditation Board for Testing and Calibration Laboratories approvals apply in India.
Operation of radio transmitters, telephones or other electrical/electronic devices in close proximity
to the equipment while the enclosure doors of the instrument or its peripherals are open, may cause
interference and possible failure where the radiated emissions exceed the EMC directive.
The protection provided by this product may be invalidated if alterations or additions are made to the
structural, electrical, mechanical, pneumatic, software or rmware components of this system. Such
changes may also invalidate the standard terms of warranty.
Copyright
This manual is provided as an aid to owners of AMETEK Land’s products and contains information
proprietary to AMETEK Land. This manual may not, in whole or part, be copied, or reproduced without the
expressed written consent of AMETEK Land.

SPOT+
REST API User Guide
Contents
1 Introduction 1-1
2 Index of SPOT+ REST API Parameters
2.1 SPOT+ Key Output Values 2-1
2.2 SPOT+FastTemperatureOutputBuer 2-2
2.3 SPOT+ Camera Images. 2-2
2.4 SPOT+ Control Parameters 2-3
3 SPOT+ Command Reference
3.1 SPOT+ Key Output Values 3-1
3.1.1 Read Multiple: Mono Instruments 3-1
3.1.2 Read Multiple: Ratio Instruments 3-1
3.1.3 Read Multiple: Application Instruments 3-2
3.1.4 Temperature Measurements 3-2
3.1.5 Internal Temperature 3-2
3.1.6 Alarm Status 3-2
3.1.7 Individual Detector Readings (Ratio and Application Pyrometers only) 3-2
3.1.8 Signal % (Ratio and Application Pyrometers only) 3-3
3.1.9 Emissivity Measurements (Application Pyrometers only) 3-3
3.2 SPOT+FastTemperatureBuer 3-3
3.3 SPOT+ Camera Images 3-3
3.4 SPOT+ Control Parameters 3-4
3.4.1 Emissivity 3-4
3.4.2 Background Temperature 3-4
3.4.3 Focus Position 3-4
3.4.4 LED 3-4
3.4.5 Command Input 3-5
3.4.6 Error Code 3-5
3.4.7 Information 3-5
3.4.8 App Number (Application Pyrometers Only) 3-5
3.4.9 AppCalibrationOset(Application Pyrometers Only) 3-5
3.4.10 Reference Temperature 3-5
3.5 Error Responses 3-6
4 Ethernet Security Settings
4.1 Secure Communications 4-1
4.2 Open Communications 4-2
4.2.1 REST API Communications in Secure Mode 4-2
5 Example Javascript Code
5.1 Read All Outputs 5-1
5.2 Read a Single Output 5-1
5.3 Read the Image Stream 5-2
5.4 ReadtheTemperatureBuer 5-3
5.5 Write to a Control Input 5-4
5.5.1 Open Ethernet Communications 5-4
5.5.2 Secure Ethernet Communications 5-4

SPOT+
1 - 1REST API User Guide
INTRODUCTION
1
1.1 Introduction
This User Guide explains how to communicate with a SPOT+ pyrometer using the REST
API.
AMETEK Land’s SPOT+ range is a family of fully-featured smart pyrometers for non-
contact temperature measurements. Available in a number of temperature ranges and
models, SPOT+ pyrometers provide immediate local display and onboard analogue I/O
together with multiple communication options over Ethernet: Embedded Webserver,
Modbus TCP/IP, REST API (http) and EthernetIP.
The REST (REpresentational State Transfer) API is a protocol for ethernet
communication via http GET and POST or PUT requests. As it is the protocol used by
everywebsiteontheinternet,itisextremelyeasyandexibletouseforsoftware
development.
The SPOT+ REST API is designed to allow read and write of only those parameters
required during normal operation. The SPOT+ embedded webserver should be used for
initialinstrumentconguration–settingparameterssuchastheIPaddressorprocess
windowcorrectionthatwillremainxedafterinitialcommissioning.Informationon
congurationoftheSPOT+usingtheembeddedwebserverisgivenintheSPOT+User
Guide.
REST API commands take the form of an http PUT or GET command directed to a URL
ontheSPOT+thermometerwebserver.TheSPOT+returnsaJSONleorasingle
parameter, depending on the request.

SPOT+
1 - 2 REST API User Guide
Request Example Reply
Read multiple values GET http://ipaddress/node Formatted JSON
containing all values. Eg:=
{
“item1”:1234,
“item2”:56,
“item3”:789
}
Read single parameter GET http://ipaddress/
node?p=item1
1234
Write single parameter PUT http://ipaddress/
node?p=item1
BODY=0.567
0.567
TheSPOTAPIhasthreeJSONnodes:output,buer,control.Imagescanalsoberead
directlyfromtheSPOT+,alreadyparsedasjpgles.Availableparametersarelistedin
Section 2 and their available commands given in 3 of this document.
Before REST applications can change any parameters on the instrument during normal
operation,theethernetsecuritylevelmustbecongured.Ethernetsecuritysettingsfor
the SPOT+ are described in section 4.
ExampleJavascriptcodeisgiveninthenalsectionofthisdocument.Asample
webpage using the REST API is available to download and copy from the AMETEK Land
website, www.ametek-land.com/spot.

SPOT+
2 - 1REST API User Guide
INDEX OF
SPOT+ REST API
PARAMETERS
2
2.1 SPOT+ Key Output Values
The SPOT+ key output values can be read individually by a GET request to
http://[ipaddress]/output?p=[parameter] or collectively as a GET request to
http://[ipaddress]/output
Parameter Read Write Denition and Range
temperature 4 8
Target temperature output, after time functions and
instrument mode calculations have been applied.
Values 0-6500 in degrees C or F (depending on
instrumentconguration),reportedto1decimalplace.
Over and under-range values are transmitted as 6553.5
and 6553.4 respectively.
itemperature 4 8
Internal temperature of the instrument.
Values from 0 to 100C or 212F (depending on instrument
conguration)reportedto1decimalplace.
alarmstatus 4 8
Alarm status byte. Any value >0 causes the CMD
Out relay connections to the SPOT+ to be closed if
normally open (or vice versa, depending on instrument
conguration).
Individualbitsaresetto1ifthealarmisconguredand
the alarm threshold is exceeded:
Bit 0: low ambient temperature
Bit 1: high ambient temperature
Bit 2: low target temperature
Bit 3: high target temperature
Bit 4: low signal% *
d1temperature * 4 8
Measured temperature from the Mono1 channel of a
Ratio or Application SPOT+.
Values 0-6500 in degrees C or F (depending on
instrumentconguration),reportedto1decimalplace.
d2temperature * 4 8
Measured temperature from the Mono1 channel of a
Ratio or Application SPOT+.
Values 0-6500 in degrees C or F (depending on
instrumentconguration),reportedto1decimalplace.

SPOT+
2 - 2 REST API User Guide
Parameter Read Write Denition and Range
signalpc * 4 8
Infrared signal strength as a percentage of that expected
from a blackbody target of the same temperature as the
target. Reduced signal strength can be due to target
emissivity less than 1 or obscuration of the sight path.
Values integer % values from 0-100 %.
e1out ** 4 8
Target emissivity for the shorter wavelength channel
calculated by an Application pyrometer.
Values from 0 to 1.2 reported to 3 decimal places.
e2out ** 4 8
Target emissivity for the longer wavelength channel
calculated by an Application pyrometer.
Values from 0 to 1.2 reported to 3 decimal places.
*AvailableonRatioorApplicationspecicmodels
**AvailableonApplicationspecicmodels.
2.2 SPOT+ Fast Temperature Output Buffer
TheSPOT+temperatureoutputbuercanbereadtogetherwithitspointerasa
GETrequesttohttp://[ipaddress]/buer
Parameter Read Write Denition and Range
buer 4 8
Rolling100itembueroftemperaturemeasurements,foruse
with fast response times. Every output interval, the latest
temperature measurement is copied to the next position in
thebuer,andthispositionissavedasthebuerpointer.
Values 0-6500 in degrees C or F (depending on instrument
conguration),reportedto1decimalplace.
pointer 4 8 Positioninthebuerofthemostrecentmeasurement.
Integer values 0-99.
2.3 SPOT+ Camera Images
The latest jpg image from the SPOT+ camera can be read as a GET request to
http://[ipaddress]/image.jpg
Parameter Read Write Denition and Range
image 4 8 Most recent image from the SPOT+ visible light camera, in
jpg format.

SPOT+
2 - 3REST API User Guide
2.4 SPOT+ Control Parameters
The SPOT+ control parameters can be read and written individually as GET and
PUT requests to http://[ipaddress]/control/p=[parameter].
Parameter Read Write Denition and Range
emissivity1 4 4
User-entered emissivity value to correct measurements
of a Mono pyrometer, or the Mono1 channel of a Ratio or
Application Pyrometer.
Values from 0.05 to 1.2 in steps of 0.001
emissivity2 * 4 4
User-entered emissivity value to correct measurements
of the Mono2 channel of a Ratio of Application Pyrometer.
Values from 0.05 to 1.2 in steps of 0.001
Bgdtemperature 4 4
User-entered value of background temperature to correct
target temperature measurements.
Integer values of 0 to 6500 in degrees C or F (depending
oninstrumentconguration).
Note that background temperature correction is not
available in Ratio mode.
focus 4 4
Focus distance from the front of the instrument to the
target.
Integer values from 300 to 10000 in mm.
led 4 4
CommandtostartorstoptheLEDashing.
Writinga1willstarttheLEDashing.Writinga0will
stopitashing,ifitwasashing.Alternativelythe
LED will timeout 30s after the last instruction to start
ashing.
cmdin 4 4
Trigger command that can be used to reset the Peak
Picker or initiate Sampling, depending on instrument
conguration.
Writing a 1 will activate and writing a 0 will clear the
digital command input.
errorcode 4 8 Hexadecimal number ??
info 4 8
A string detailing instrument type, mode and current
settings, as displayed on the info page of the instrument
and webserver

SPOT+
2 - 4 REST API User Guide
Parameter Read Write Denition and Range
appnumber ** 4 4
The index of the current App Mode.
Integer values from 1 up to the number of Apps that are
installed on the instrument.
apposet** 4 4 ThecalibrationosettothecurrentApp.
Integer values from -2000 to 2000.
reftemperature 8 4
Reference temperature used to adjust the emissivity of
a Mono or Ratio pyrometer, or tune the current App of
anApplicationpyrometerbysettingacalibrationoset
value.
Integer temperature values from 0 to 6500 degrees in C
orF,dependingoninstrumentconguration.
*AvailableonRatioorApplicationspecicmodels
**AvailableonApplicationspecicmodels.

SPOT+
3 - 1REST API User Guide
3SPOT+ COMMAND
REFERENCE
3.1 SPOT+ Key Output Values
The principal measurement outputs from the SPOT+ thermometer can be read
individually or altogether in a single ‘read multiple’ request. When a ‘read
multiple’requestisused,theSPOT+returnsaformattedJSONlecontaining
all parameters relevant to the particular instrument. Example communications
are presented here for each type of instrument.
3.1.1 Read Multiple: Mono Instruments
Mono instruments use only one wavelength channel so only return target
temperature, internal instrument temperature and alarm status.
Request Example Reply
GET http://[ipaddress]/output {
“temperature”:512.1,
“itemperature”:41.2,
“alarmstatus”:0
}
3.1.2 Read Multiple: Ratio Instruments
Ratio instruments use two wavelength channels and additionally return individual
channel measurements and the measured infrared signal strength.
Request Example Reply
GET http://[ipaddress]/output {
“temperature”:512.1,
“itemperature”:41.2,
“alarmstatus”:0,
“d1temperature”:400.0,
“d2temperature”:350.5,
“signalpc”:10,
}

SPOT+
3 - 2 REST API User Guide
3.1.3 Read Multiple: Application Instruments
Applicationspecicinstrumentsadditionallymeasuretargetemissivityatboth
measurement wavelengths.
Request Example Reply
GET http://[ipaddress]/output {
“temperature”:512.1,
“itemperature”:41.2,
“alarmstatus”:0,
“d1temperature”:400.0,
“d2temperature”:350.5,
“signalpc”:10,
“e1out”:0.101,
“e2out”:0.975
}
3.1.4 Temperature Measurements
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=temperature 512.1
3.1.5 Internal Temperature
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=itemperature 41.2
3.1.6 Alarm Status
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=alarmstatus 0
3.1.7 Individual Detector Readings (Ratio and Application Pyrometers only)
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=d1temperature 400.0
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=d2temperature 350.5

SPOT+
3 - 3REST API User Guide
3.1.8 Signal % (Ratio and Application Pyrometers only)
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=signalpc 10
3.1.9 Emissivity Measurements (Application Pyrometers only)
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=e1out 0.101
Mode Request Example Reply
Read single value GET http://[ipaddress]/output?p=e2out 0.975
3.2 SPOT+ Fast Temperature Buffer
If the SPOT+ output time is set to <50ms, it is advisable to read an array of
the most recent temperature measurements from the internal measurement
buerinbatchesatintervalsof50msormore,toreducenetworktracand
avoidmissingdata.TheSPOT+temperaturebuerstructureisexplainedin
Table 2.
Thebuerpointerisrequiredatthesametimeasthearrayofrecent
temperaturemeasurementsfromthebuer,soa‘readmultiple’requestmust
be used.
In this example, the SPOT+ response time is set to 1ms, and it is looking at a
slowly cooling target. The latest measurement is the ‘510.8’ value in the fourth
position in the array.
Request Example Reply
GEThttp://[ipaddress]/buer {
“buer”:[512.1,511.7,511.2,510.8,545.2,
545.1, …]
“pointer”:3
}
3.3 SPOT+ Camera Images
Camera images can be read directly from the SPOT+ with a GET request.
Request Example Reply
GET http://[ipaddress]/image [camera image in standard jpg format]

SPOT+
3 - 4 REST API User Guide
3.4 SPOT+ Fast Temperature Buffer
SPOT+ control parameters can only be read and written individually.
The ‘lock’ function on the SPOT+ webserver can be used to prevent
unauthorized writing of SPOT+ control parameters. When the SPOT+
webserver is locked, it will be possible to read but not write to the control
parameters. [To unlock the webserver, enter password ‘230’ on the Advanced
settings page.]
3.4.1 Emissivity
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=emissivity1 1.000
Write single value PUT http://[ipaddress]/control?p=emissivity1
BODY=0.76 0.760
TheemissivityoftheMono2channelcanalsobeconguredforRatioPyrometers.
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=emissivity1 1.000
Write single value PUT http://[ipaddress]/control?p=emissivity1
BODY=0.76 0.760
3.4.2 Background Temperature
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=bgdtemperature 905
Write single value PUT http://[ipaddress]/control?p=bgdtemperature
BODY=890 890
3.4.3 Focus Position
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=focus 1000
Write single value PUT http://[ipaddress]/control?p=focus
BODY=500 500
3.4.4 LED
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=led 0
Write single value PUT http://[ipaddress]/control?p=led
BODY=1 1

SPOT+
3 - 5REST API User Guide
3.4.5 Command Input
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=cmdin 0
Write single value PUT http://[ipaddress]/control?p=cmdin
BODY=1 1
3.4.6 Error Code
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=errorcode 0x0000
3.4.7 Information
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=info SPOT+ R160 Ratio PP
3.4.8 App Number (Application Pyrometers Only)
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=appnumber 2
Write single value PUT http://[ipaddress]/control?p=appnumber
BODY=1 1
3.4.9 App Calibration Offset (Application Pyrometers Only)
Mode Request Example Reply
Read single value GEThttp://[ipaddress]/control?p=apposet -1120
Write single value PUThttp://[ipaddress]/control?p=apposet
BODY=500 500
3.4.10 Reference Temperature
Mode Request Example Reply
Read single value GET http://[ipaddress]/control?p=info SPOT+ R160 Ratio PP

SPOT+
3 - 6 REST API User Guide
3.5 Error Responses
If the SPOT+ cannot process the instruction, the appropriate http error code
will be returned in response to the GET or PUT response. The response of the
message will give additional information.
http error code Message
400 Bad Request [parameter] not recognised
401 Unauthorized Unauthorized access
403 Forbidden [value] out of range
404 Not Found [node] not recognised

SPOT+
4 - 1REST API User Guide
There are two security modes for SPOT+ Webserver and REST API communication:
Secure or Open.
‘Secure’ is the recommended setting for SPOT+ control over ethernet in secure appli-
cations. Several security features are enabled:
• A handshake is required when a control application first tries to write a pa-
rameter. The REST application must know the SPOT+ password.
• The password is hashed and used in authentication, but not transmitted in
its entirety except during password change via the webserver. The hashed
authentication code changes with every write to prevent packet copying at-
tacks.
• While one application is actively controlling a SPOT+, it allows reads but
not writes from a second source.
• Writes are limited to 1 per second to prevent password blitzing or denial of
service attacks.
• Incorrect password attempts will be counted.
SPOT+ pyrometers are shipped in the ‘Secure’ state. The security mode can be
switched via the back panel of the display, or via the webserver. In Secure Mode, a
password is required to change settings on the SPOT+. The default password is the
serial number of the instrument, but this should be changed on first use.
The operational differences between the modes are described below.
4.1 Open Communications
When the user changes to open, the SPOT+ will behave like the earlier SPOT
models, freely accepting instructions from any source.
No padlock symbol will be shown on the webserver.
4ETHERNET SECURITY
SETTINGS

SPOT+
4 - 2 REST API User Guide
4.2 Secure Communications
Unlessthepasswordisentered,theSPOT+iseectively‘ReadOnly’.All
requested data will be sent but parameters cannot be changed over ethernet,
even using the webserver. REST applications will respond to GET requests as
expected, but PUT requests will return a ‘401 Unauthorized’ error.
Before password entry, the yellow padlock symbol will be shown on each
webserver page. Clicking on the padlock symbol will route the user to the
Security page of the webserver where the password can be entered to unlock
the device. Ethernet communications can then be set to ‘Secure’ or ‘Open’ to
permit writes from REST API applications.
Once the password has been entered a green open padlock symbol will be
shown on each webserver page. Settings can be changed on the device.
4.2.1 REST API ‘Handshake’ for Secure Mode Communication
Communicationsinsecuremodeuseasimpliedformofdigestauthentication.
Both SPOT+ and the client REST application know and store the password,
but it is not directly transmitted. The password is hashed with a ‘nonce’ value
(numberusedonce)generatedbytheSPOT+duringthe‘handshake’onrst
write request, and a nonce counter managed by the client application and
incremented with each request.
The client hashes password, nonce and counter together before each PUT
request, and sends the nonce, counter and hash in the header of that request.
The SPOT+ performs its own hash using the nonce and counter received and
checks against the client hash value. The PUT request is only processed if the
nonce is recognized as an established connection, and the hashes match.
Onrstconnection,a‘handshake’isrequired.Theclient’srstPUTrequestwill
typically be using nonce and counter values of 0. Hashed values would match
but the nonce will not be recognized. The SPOT+ will generate a new nonce
and reply to the PUT request with a ‘401 Unauthorized’ error, with the new
nonce in the header. The client must update its nonce value, and hash, and
retransmit the PUT request with this new nonce, counter and hash value.
The client can use the same nonce, hashed with an incremented counter, for
subsequent PUT requests, though nonce values are time limited and lost on
power cycling, so applications must repeat the handshake periodically.
A second client application that knows the password can connect in the same
way and will be given its own nonce value. The SPOT+ can support writes from
multiple active REST connections.
GET requests do not need any authentication. ¬¬¬

SPOT+
5 - 1REST API User Guide
5EXAMPLE
JAVASCRIPT CODE
The code in this section is taken from the SPOT+ REST API Example Webpage,
available to download from www.ametek-land.com/spot
5.1 Read All Outputs
function readOutputs(){
//create a new XMLHttpRequest to read temperature measurements
var outhttp = new XMLHttpRequest();
outhttp.open(“GET”, “http://10.1.10.50/output”, true);
//conguretheheadertorequestJSONdata
outhttp.setRequestHeader(“Content-type”, “application/json;charset=utf-8”);
//write a function to handle the reply
outhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
window.alert(this.responseText);
}
};
//send the request
outhttp.send();
}
5.2 Read a Single Output
function readTemperature(){
//create a new XMLHttpRequest to read temperature measurements
var temphttp = new XMLHttpRequest();
temphttp.open(“GET”, “http://10.1.10.50/output?p=temperature”, true);
//conguretheheadertorequestJSONdata
temphttp.setRequestHeader(“Content-type”, “application/json;charset=utf-8”);
//write a function to handle the reply
temphttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//if this is the formal reply, interpret it as an integer of 10x C

SPOT+
5- 2 REST API User Guide
//format temperature to 1 decimal place or ‘----.-’ for an over- or
under-range value.
let t = parseInt(this.responseText);
//overrange values are transmitted as 65535 and under-range values as
65534
if (t>6553) t=”----.-”;
//display the latest value in the webpage
document.getElementById(“temperature”).innerHTML = t + “C”;
//call this function again in half a second’s time.
this.onreadystatechange=null;
setTimeout(readTemperature,500);
}
};
//send the request
temphttp.send();
}
5.3 Read the Image Stream
function readImage(){
//create a new XMLHttpRequest to read the next image
var imagehttp = new XMLHttpRequest();
imagehttp.open(“GET”, “http://”+ipaddress+”/image.jpg”, true);
//conguretheresponsetypetohandleimages
imagehttp.responseType =’blob’;
//write a function to handle the reply
imagehttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//if this is the formal reply, display the image in the webpage
let jpg = URL.createObjectURL(this.response);
document.getElementById(“image”).src = jpg;
//close the URL to release the memory allocation
URL.revokeObjectURL(jpg);
//The function calls itself on completion, to get the next image
readImage();
}
};
//send the request
imagehttp.send();
}
Table of contents
Other Ametek Land Measuring Instrument manuals

Ametek Land
Ametek Land 4500 MKIII User manual

Ametek Land
Ametek Land LANCOM 4 User manual

Ametek Land
Ametek Land CYCLOPS L User manual

Ametek Land
Ametek Land Lancom 200 User manual

Ametek Land
Ametek Land 4750-PM User manual

Ametek Land
Ametek Land VIRALERT 3 User manual

Ametek Land
Ametek Land LANCOM 4 User manual