Skip to content
sochs edited this page Oct 30, 2020 · 15 revisions

HTTP

NOTE: PUT/PATCH methods are only available with v1.0.10

Get data requests:

Set data requests:

Command requests:

  • /configreset
  • /restart
  • /stopwifi
  • /clearwifi
  • /networkscan
  • /newtoken
  • /checkupdate
  • /updatestatus
  • /update

GET /data

Description: Returns dynamic data.

Return value: JSON object with nested objects/array system, channel and pitmaster.

system: (JSON object)

  • time: (long) current unix timestamp
  • unit: (char) temperature unit ("C" = Celsius or "F" = Fahrenheit)
  • soc: (int) state of charge in % (only for models with built-in battery)
  • charge: (boolean) battery charging off/on (only for models with built-in battery)
  • rssi: (int) wifi strength in dBm
  • online: (int) cloud status (0 = not connected, 1 = standby, 2 = connected)

channel: (JSON array with nested JSON channel objects for each channel)

  • number: (int) channel id
  • name: (String) name of channel
  • typ: (int) probe type id, matching order in /settings JSON sensor array
  • temp: (float) current temperature
  • min: (float) minimum temperature alarm
  • max: (float) maximum temperature alarm
  • alarm: (int) channel alarm configuration (0 = off, 1 = push, 2 = buzzer, 3 = push + buzzer)
  • color: (String) channel color in hexadecimal
  • fixed: (boolean) fixed probe type (if true probe type cannot be changed)
  • connected: (boolean) wireless probe connection status (true = wireless probe is connected)

pitmaster: (JSON object)

  • type: (JSON array with Strings) available pitmaster states ("off" / "manual" / "auto")
  • pm: (JSON array with nested JSON pitmaster objects)
  • id: (int) pitmaster id
  • channel: (int) channel number, matching possible channels in /data JSON channel array
  • pid: (int) pid profile id, matching profile in /settings JSON pid array
  • value: (int) pitmaster value in % (only writeable in pitmaster state "manual")
  • set: (float) set temperature (only writeable in pitmaster state = "auto")
  • typ: (String) pitmaster state, matching possible states
  • set_color: (String) set value color in hexadecimal
  • value_color: (String) pitmaster value color in hexadecimal

Remarks: only wired probes are allowed for pitmaster channels.

Example:

{"system":{"time":"1598259582","unit":"C","rssi":-39,"online":2},"channel":[{"number":1,"name":"Kanal 1","typ":0,"temp":999.00,"min":10.00,"max":25.00,"alarm":2,"color":"#0C4C88","fixed":false,"connected":false},{"number":9,"name":"TypK 1","typ":15,"temp":999.00,"min":10.00,"max":35.00,"alarm":0,"color":"#00FF00","fixed":true,"connected":false},{"number":13,"name":"Meater1KT","typ":16,"temp":24.90,"min":10.00,"max":35.00,"alarm":0,"color":"#A349A4","fixed":true,"connected":true}],"pitmaster":{"type":["off","manual","auto"],"pm":[{"id":0,"channel":1,"pid":1,"value":0,"set":50.00,"typ":"off","set_color":"#ff0000","value_color":"#000000"},{"id":1,"channel":2,"pid":1,"value":0,"set":50.00,"typ":"off","set_color":"#FE2EF7","value_color":"#848484"}]}}

up


GET /settings

Description: Returns static data.

Return value: JSON object with nested objects/arrays device, system, sensors, pid, aktor, display, features, iot, hardware and notes.

device: (JSON object)

  • device: (String) device description ("nano", "mini", "link")
  • serial: (String) serial number (unique for a one device)
  • cpu: (String) cpu description
  • flash_size: (long) flash size
  • hw_version: (String) hardware version of device, matching Strings in /settings JSON hardware array
  • sw_version: (String) software version of device
  • api_version: (String) api version
  • language: (String) system language

system: (JSON object)

  • time: (long) current unix timestamp
  • unit: (char) temperature unit "C" = Celsius or "F" = Fahrenheit
  • ap: (String) AP name
  • host: (String) host name
  • language: (String) system language
  • version: (String) current firmware version
  • getupdate: (String) firmware update version, "false" if no update available
  • autoupd: (boolean) autosearch for updates disabled/enabled
  • prerelease: (boolean) autosearch incl. prerelease updates disabled/enabled
  • hwversion: (String) hardware version of device, matching Strings in /settings JSON hardware array

hardware: (JSON array with Strings) possible hardware versions

sensors: (JSON array with nested JSON sensor object for each sensor) possible temperature probes

  • type: (int) sensor id
  • name: (String) sensor name
  • fixed: (boolean) fixed sensor type (if true, this sensor type cannot be selected, is assigned by the system)

features: (JSON object with nested JSON objects for each feature) possible hardware features

  • bluetooth: (boolean) bluetooth availability
  • pitmaster: (boolean) pitmaster availability

pid: (JSON array with nested JSON pid objects for each profil)

  • name: (String) profil name
  • id: (int) profil id
  • aktor: (int) pitmaster actor, matching Strings in /settings JSON aktor array
  • Kp: (float) proportional factor
  • Ki: (float) integral factor
  • Kd: (float) differential factor
  • DCmmin: (int) duty cycle min total value [0-100] (only available for aktor = "SSR"/"FAN"/"DAMPER")
  • DCmmax: (int) duty cycle max total value [0-100] (only available for aktor = "SSR"/"FAN"/"DAMPER")
  • opl: (boolean) open lid detection enable/disable
  • SPmin: (int) servo pulse min total value (only available for aktor = "SERVO"/"DAMPER")
  • SPmax: (int) servo pulse max total value (only available for aktor = "SERVO"/"DAMPER")
  • link: (int) link process between actuators (only available for aktor = "DAMPER")
  • tune: (boolean) autotune process enable/disable (currently not in use)
  • jp: (int) jump power value [10-100]

aktor: (JSON array with Strings) possible pitmaster actuators

display: (JSON object)

  • updname: (String) display description
  • orientation: (int) display orientation

iot: (JSON object)

  • PMQhost: (String) MQTT host name
  • PMQport: (int) MQTT port
  • PMQuser: (String) MQTT user name
  • PMQpass: (String) MQTT password
  • PMQqos: (int) MQTT QoS
  • PMQon: (boolean) MQTT enable/disable
  • PMQint: (int) MQTT send interval
  • CLon: (boolean) Cloud enable/disable
  • CLtoken: (String) Cloud token
  • CLint: (int) Cloud send interval
  • CLurl: (String) Cloud url

notes: (JSON object) possible notification services

  • ext: (JSON object) external notification service
  • on: (int) notification status (0 = off, 1 = on, 2 = test message [temporary state])
  • token: (String) notification service token
  • token: (String) notification service id
  • repeat: (int) notification send replay [1-10]
  • service: (int) notification service matching order in services
  • services: (JSON array) possible external notification services

Example:

{"device":{"device":"mini","serial":"2462abc2fed8","cpu":"esp32","flash_size":16777216,"hw_version":"v2","sw_version":"v1.0.9","api_version":"1","language":"de"},"system":{"time":"1598262454","unit":"C","ap":"MINI-AP","host":"MINI-2462abc2fed8","language":"de","version":"v1.0.9","getupdate":"false","autoupd":true,"prerelease":true,"hwversion":"V2"},"hardware":["V2"],"api":{"version":"1"},"sensors":[{"type":0,"name":"1000K/Maverick","fixed":false},{"type":1,"name":"Fantast-Neu","fixed":false},{"type":2,"name":"Fantast","fixed":false},{"type":3,"name":"100K/iGrill2","fixed":false},{"type":4,"name":"ET-73","fixed":false},{"type":5,"name":"Perfektion","fixed":false},{"type":6,"name":"50K","fixed":false},{"type":7,"name":"Inkbird","fixed":false},{"type":8,"name":"100K6A1B","fixed":false},{"type":9,"name":"Weber_6743","fixed":false},{"type":10,"name":"Santos","fixed":false},{"type":11,"name":"5K3A1B","fixed":false},{"type":12,"name":"PT100","fixed":false},{"type":13,"name":"PT1000","fixed":false},{"type":14,"name":"ThermoWorks","fixed":false},{"type":15,"name":"Typ K","fixed":true},{"type":16,"name":"Bluetooth","fixed":true},{"type":17,"name":"Maverick","fixed":true}],"features":{"bluetooth":true,"pitmaster":true},"pid":[{"name":"Servo MG995","id":0,"aktor":2,"Kp":104.00,"Ki":0.20,"Kd":0.00,"DCmmin":25.00,"DCmmax":75.00,"opl":0,"SPmin":20.00,"SPmax":80.00,"link":0,"tune":0,"jp":100},{"name":"TITAN 50x50","id":1,"aktor":1,"Kp":3.80,"Ki":0.01,"Kd":128.00,"DCmmin":25.00,"DCmmax":100.00,"opl":0,"SPmin":0.00,"SPmax":0.00,"link":0,"tune":0,"jp":70},{"name":"Kamado 50x50","id":2,"aktor":1,"Kp":7.00,"Ki":0.02,"Kd":630.00,"DCmmin":25.00,"DCmmax":100.00,"opl":0,"SPmin":0.00,"SPmax":0.00,"link":0,"tune":0,"jp":70},{"name":"Damper","id":3,"aktor":3,"Kp":3.80,"Ki":0.01,"Kd":128.00,"DCmmin":25.00,"DCmmax":100.00,"opl":0,"SPmin":25.00,"SPmax":75.00,"link":0,"tune":0,"jp":70}],"aktor":["SSR","FAN","SERVO","DAMPER"],"display":{"updname":"NX3224K028-0","orientation":0},"iot":{"PMQhost":"192.168.2.1","PMQport":1883,"PMQuser":"","PMQpass":"","PMQqos":0,"PMQon":false,"PMQint":30,"CLon":true,"CLtoken":"2462abc2fed85f2f0d4f63","CLint":3,"CLurl":"dev-cloud.wlanthermo.de/index.html"},"notes":{"fcm":[],"ext":{"on":0,"token":"","id":"","repeat":1,"service":0,"services":["telegram","pushover"]}}}

up


GET /info

up


POST /networklist

Description: Returns wifi network scan data.

Return value: JSON object with nested array scan.

  • Connect: (boolean) wifi connection state
  • SSID: (String) current connected SSID
  • BSSID: (String) current connected MAC
  • IP: (String) current IP
  • Mask: (String)
  • Gate: (String)
  • RSSI: (int)
  • Enc: (boolean)

Scan: (JSON array with nested JSON wifi scan objects) found wifi networks

  • SSID: (String)
  • BSSID: (String)
  • RSSI: (int)
  • Enc: (boolean)

Example: {"Connect":true,"SSID":"WLAN-XXXXX","BSSID":"38:10:D5:D1:BC:8B","IP":"192.168.178.53","Mask":"255.255.255.0","Gate":"192.168.178.1","Scan":[{"SSID":"WLAN-XXXXX","BSSID":"38:10:D5:D1:BC:8B","RSSI":-42,"Enc":true},{"SSID":"EasyBox-767780","BSSID":"D4:60:E3:BD:BA:9C","RSSI":-66,"Enc":true},{"SSID":"FRITZ!Box 7590 LD","BSSID":"44:4E:6D:3B:0E:0F","RSSI":-76,"Enc":true}],"RSSI":-42,"Enc":true}

up


POST|PUT|PATCH /setsystem

Description: Sets system parameters.

Request Authentication: yes

Arguments (in the POST|PUT|PATCH request body): JSON system object (see /settings)

Used keys in JSON system object:

  • ap: (String: max. 13 character, UTF8) AP name
  • host: (String: max. 13 character, UTF8) host name
  • language: (String: ["de","en"]) system language
  • unit: (char: ["C", "F"]) temperature unit
  • autoupd: (boolean) autosearch for updates disabled/enabled
  • prerelease: (boolean) autosearch incl. prereleases disabled/enabled

Return value: (text/plain) true/false

Remarks: Send the whole JSON system object with all keys (PUT) or selected keys (PATCH).

Example:

{"ap":"NANO-AP","host":"myWLANThermo","language":"de","unit":"C","autoupd":true,"prerelease":false}

up


POST|PUT|(PATCH) /setchannels

Description: Sets channel parameters.

Request Authentication: yes

Arguments (in the POST|PUT|(PATCH) request body): JSON nested channel object (see /data)

Used keys in JSON channel object:

  • number: (int: [1, 24]) channel id (is used for identification data source, must always be sent)
  • name: (String: max. 10 character, UTF8) name of channel
  • typ: (int:[JSON sensors array]) probe typ id (only if "fixed" = false)
  • min: (float: [-30.0, 999.9]) minimum temperature alarm
  • max: (float: [-30.0, 999.9]) maximum temperature alarm
  • alarm: (int) channel alarm configuration (0 = off, 1 = push, 2 = buzzer, 3 = push + buzzer)
  • color: (String: woher?) channel color in hexadecimal

Return value: (text/plain) true/false

Remarks: Send only one nested JSON object from the JSON channel array. Send the whole nested JSON object with all keys (PUT) or selected keys (PATCH). But, "number" must always be sent with valide value to identify the data source.

Example:

{"number":1,"name":"Kanal 1","typ":0,"temp":24.50,"min":10.00,"max":35.00,"alarm":1,"color":"#0C4C88"}

up


POST|PUT /setpitmaster

Description: Sets pitmaster parameters.

Request Authentication: yes

Arguments (in the POST|PUT request body): JSON pitmaster array with nested pitmaster objects (see /data)

Used keys in JSON pitmaster object:

  • id: (int: [0, 1]) pitmaster id
  • channel: (int: [1, 10]) channel number, only used for typ "auto"
  • pid: (int: [JSON pid array]) pid profile id
  • value: (int: [0, 100]) pitmaster value in %, only used for "manual"
  • set: (float: [0.0, 999.9]) set temperature, only used for "auto"
  • typ: (String: ["off", "manual", "auto"]) pitmaster state

Return value: (text/plain) true/false

Remarks: Send only a complete nested JSON pitmaster object (or more objects) in the JSON array, otherwise it fails.

Example:

[{"id":0,"channel":1,"pid":0,"value":0,"set":50.00,"typ":"off"}]

up


POST|PUT|(PATCH) /setpid

Description: Sets pid parameters.

Request Authentication: yes

Arguments (in the POST request body): JSON pid array with nested objects (see /settings)

Used keys in JSON pid object:

  • name: (String: max. 10 character, UTF8) name of pid profil
  • id: (int: [0, length of [JSON pid array]) profil id
  • aktor: (int: JSON aktor array) actuator
  • Kp: (float) proportional factor
  • Ki: (float) integral factor
  • Kd: (float) differential factor
  • DCmmin: (int: [0, 100]) duty cycle min total value (only available for aktor = "SSR"/"FAN"/"DAMPER")
  • DCmmax: (int: [0, 100]) duty cycle max total value (only available for aktor = "SSR"/"FAN"/"DAMPER")
  • opl: (boolean) open lid detection enable/disable
  • SPmin: (int: [0, 100]) servo pulse min total value (only available for aktor = "SERVO"/"DAMPER")
  • SPmax: (int: [0, 100]) servo pulse max total value (only available for aktor = "SERVO"/"DAMPER")
  • link: (int: [0, 1]) link process between actuators (only available for aktor = "DAMPER")
  • tune: (boolean) autotune process enable/disable (currently not in use)
  • jp: (int: [0, 100]) jump power value

Return value: (text/plain) true/false

Remarks: Send one or more nested [JSON pid objects] in the JSON pid array, with whole nested JSON object with all keys (PUT) or selected keys (PATCH). But, "id" must always be sent with valide value to identify the data source.

Example:

[{"name":"SSR SousVide","id":0,"aktor":0,"Kp":104.00,"Ki":0.20,"Kd":0.00,"DCmmin":0.00,"DCmmax":100.00,"opl":0,"SPmin":0.00,"SPmax":0.00,"link":0,"tune":0,"jp":100}, "name":"TITAN","id":1,]

up


POST|PUT|PATCH /setIoT

Description: Sets IoT parameters.

Request Authentication: yes

Arguments (in the POST|PUT|PATCH request body): JSON IoT object (see /settings)

Return value: (text/plain) true/false

Remarks: Send the complete IoT object with all keys (PUT) or selected keys (PATCH).

Example:

{"PMQhost":"192.168.2.1","PMQport":1883,"PMQuser":"","PMQpass":"","PMQqos":0,"PMQon":false,"PMQint":30,"CLon":true,"CLtoken":"fcf5c46d64b05f3ede4810","CLint":15,"CLurl":"dev-cloud.wlanthermo.de/index.html"}

up


POST /setnetwork

Description: Starts WiFi connection test with sent network parameters (ssid, password).

Request Authentication: yes

Arguments (in the POST request body): JSON object with keys ssid and password (see Example)

Return value: (text/plain) true/false

Remarks: Sent ssid and password are only saved if Wifi connection could be established. Limit ssid to 32 characters and password to 63 characters. Possible password characters: &%_~!@#$^*()-+|={}[]:;<>?,./`Aa1234567890. Don’t use '".

Example:

{"ssid":"xxx","password":"xxx"}

up


POST /setapi

Description: Change API settings (Server-URLs, Update informations, Connection states).

Request Authentication: yes

Arguments (in the POST request body): JSON API object

Return value: (text/plain) true/false

Remarks:

Example:

coming soon

up


POST /setadmin

Description: Change password for admin profil.

Request Authentication: yes

Arguments (form-data): (char) wwwpassword, describes the new password

Return value: (text/plain) true/false

Remarks: For Request Authentication use old password.

Example:

up


POST /configreset

Description: Resets configuration to default.

Request Authentication: no

Arguments: no

Return value: true/false

up