Many interesting JSON strings can be fetched from the device by HTTP GET calls. The content can also be read if you enter the indicated URL in a browser.
In the following, <ams_hostname>
is device IP-address or Hostname (as defined in Config screen / General).
The following calls are available:
/data.json | Latest payload from meter |
/dayplot.json | Values displayed in Day chart |
/monthplot.json | Values displayed in Month chart |
/energyprice.json | Day-ahead energy prices |
/sysinfo.json | Various system data |
/tariff.json | Values displayed in “Tariff peaks” graph |
/priceconfig.json | User settings in “Configure price” |
/configuration.json | Configuration settings |
/temperature.json | Data from optional temperature sensor |
http://<ams_hostname>/data.json
{
"im" : 0, # Maximum power consuption (calculated from fuse size)
"om" : 0, # Maximum power production
"mf" : 0, # Main fuse size
"i" : 0, # Active import
"e" : 0, # Active export
"w" : 0, # Combined active import and export
"ri" : 0, # Reactive import
"re" : 0, # Reactive export
"ic" : 0.0, # Accumulated import
"ec" : 0.0, # Accumulated export
"ric" : 0.0, # Accumulated reactive import
"rec" : 0.0, # Accumulated reactive export
"l1" : { # Phase 1
"u" : 0.00, # Voltage
"i" : 0.00, # Amperage
"p" : 0, # Active Power
"q" : 0, # Reactive power
"f" : 0.00 # Power factor
},
"l2" : { # Phase 2
"u" : 0.00, # Voltage
"i" : 0.00, # Amperage
"p" : 0, # Active Power
"q" : 0, # Reactive power
"f" : 0.00, # Power factor
"e" :%s # Indicator if L2 current is present
},
"l3" : { # Phase 3
"u" : 0.00, # Voltage
"i" : 0.00, # Amperage
"p" : 0, # Active Power
"q" : 0, # Reactive power
"f" : 0.00 # Power factor
},
"f" : 0.00, # Power factor
"v" : 0.00, # ESP voltage
"r" : 0, # WiFi RSSI
"t" : 0.0, # Temperature
"u" : 0, # Uptime in seconds
"m" : 0, # Free memory in bytes
"em" : 0, # ESP status
"hm" : 0, # HAN status
"wm" : 0, # WiFi status
"mm" : 0, # MQTT status
"me" : 0, # Last MQTT error
"p" : 0.00, # Current import price
"px" : 0.00, # Current export price
"mt" : 0, # Meter type
"ds" : 0, # Distribution system
"ea" : { # Energy accounting
"x" : 0.0, # Max average of configured amount of hours
"p" : [0.0, 0.0],# Peak hourly consumption this month. Relates to Norwegian tariff
"t" : 0, # Current active month threshold
"h" : { # Real time calculation this hour
"u" : 0.00, # Consumption
"c" : 0.00, # Cost
"p" : 0.00, # Production
"i" : 0.00 # Income
},
"d" : { # Real time calculation today
"u" : 0.00, # Consumption
"c" : 0.00, # Cost
"p" : 0.00, # Production
"i" : 0.00 # Income
},
"m" : { # Real time calculation this month
"u" : 0.00, # Consumption
"c" : 0.00, # Cost
"p" : 0.00, # Production
"i" : 0.00 # Income
}
},
"c" : 0 # Clock
}
http://<ams_hostname>/dayplot.json
{
"unit": "kwh",
"i00": 3.48, # Import at UTC hour 0, CET hour 1, CEST hour 2
"e00": 0, # Export at UTC hour 0, CET hour 1, CEST hour 2
"i01": 1.6, # Import at UTC hour 1
"e01": 0, # Export at UTC hour 1
"i02": 3.06, # and so on...
"e02": 0,
"i03": 2.92,
"e03": 0,
"i04": 2.5,
"e04": 0,
"i05": 3.68,
"e05": 0,
"i06": 4.76,
"e06": 0,
"i07": 5.4,
"e07": 0,
"i08": 4.12,
"e08": 0,
"i09": 4.52,
"e09": 0,
"i10": 3.52,
"e10": 0,
"i11": 4.2,
"e11": 0,
"i12": 3.34,
"e12": 0,
"i13": 4.46,
"e13": 0,
"i14": 3.78,
"e14": 0,
"i15": 4.14,
"e15": 0,
"i16": 2.48,
"e16": 0,
"i17": 5.04,
"e17": 0,
"i18": 5.12,
"e18": 0,
"i19": 5,
"e19": 0,
"i20": 5.3,
"e20": 0,
"i21": 2.5,
"e21": 0,
"i22": 3.34,
"e22": 0,
"i23": 3.14,
"e23": 0
}
http://<ams_hostname>/monthplot.json
{
"unit": "kwh", # Unit
"i01": 71.3, # Import for first day of the month
"e01": 0, # Export for first day of the month
"i02": 96.4, # Import for the second day
"e02": 0, # Export for the second day
"i03": 131.11, # and so on...
"e03": 0,
"i04": 130.6,
"e04": 0,
"i05": 125.5,
"e05": 0,
"i06": 112.6,
"e06": 0,
"i07": 111.78,
"e07": 0,
"i08": 92.42,
"e08": 0,
"i09": 107.81,
"e09": 0,
"i10": 100.18,
"e10": 0,
"i11": 95.32,
"e11": 0,
"i12": 102.82,
"e12": 0,
"i13": 98.04,
"e13": 0,
"i14": 100,
"e14": 0,
"i15": 100.12,
"e15": 0,
"i16": 120.4,
"e16": 0,
"i17": 113.88,
"e17": 0,
"i18": 102.42,
"e18": 0,
"i19": 104.8,
"e19": 0,
"i20": 115.86,
"e20": 0,
"i21": 140.84,
"e21": 0,
"i22": 126.5,
"e22": 0,
"i23": 117.32,
"e23": 0,
"i24": 107.02,
"e24": 0,
"i25": 94.14,
"e25": 0,
"i26": 86.64,
"e26": 0,
"i27": 105.43,
"e27": 0,
"i28": 112.66,
"e28": 0,
"i29": 103.32,
"e29": 0,
"i30": 84.68,
"e30": 0,
"i31": 90.88,
"e31": 0
}
http://<ams_hostname>/energyprice.json
Note: The sequence can be different, due to the way the data are processed.
{
"currency": "NOK", # The currency unit for the prices
"source": "EOE", # What source the prices was fetched from. (EOE = ENTSO-E, EDS = Energi Data Service, HKS = Hvakosterstrommen.no)
"00": 1.3967, # Price for current hour
"01": 1.3756, # Price for next hour
"02": 1.3687, # Price in two hours
"03": 1.3586, # and so on...
"04": 1.3656,
"05": 1.3898,
"06": 1.3975,
"07": 1.3771,
"08": 1.5074,
"09": 1.5368,
"10": 1.3063,
"11": 1.2278,
"12": 1.1522,
"13": 1.0898,
"14": 0.9210,
"15": null, # Price for this hour is unknown
"16": null,
"17": null,
"18": null,
"19": null,
"20": null,
"21": null,
"22": null,
"23": null,
"24": null,
"25": null,
"26": null,
"27": null,
"28": null,
"29": null,
"30": null,
"31": null,
"32": null,
"33": null,
"34": null,
"35": null
}
http://<ams_hostname>/sysinfo.json
This call provides various system data. The ones that could be useful are explained.
{
"version": "v2.3.9", # Installed firmware version
"chip": "esp32s2", # Microcontroller version
"chipId": "4888", # Last four digits from MAC-address
"cpu": 160, # CPU speed in MHz
"mac": "48:27:E2:44:88:48", # MAC address, station mode (normal operational mode)
"apmac": "48:27:E2:44:88:49", # MAC address, access point mode
"board": 5,
"vndcfg": true,
"usrcfg": true,
"fwconsent": 1,
"hostname": "pow-k", # The hostname the user has set in Config > General
"booting": false,
"upgrading": false,
"net": {
"ip": "10.0.0.206", # Device IP address
"mask": "255.255.255.0", # Network mask (if static IP is set)
"gw": "10.0.0.3", # Gateway IP address (if static IP is set)
"dns1": "1.1.1.1", # Primary DNS (if static IP is set)
"dns2": "", # Secondary DNS (if static IP is set)
"ipv6": "",
"dns1v6": "",
"dns2v6": ""
},
"if": {
"eth": false
},
"meter": {
"mfg": 3, # Power meter manufacturer code (1:Aidon, 2:Kaifa, 3:Kamstrup, 4:Iskra, 5:Landis&Gyr, 6: Sagemcom)
"model": "6841131BN243101040", # Power meter model
"id": "1234567890000000" # Power meter serial number
},
"ui": {
"i": 1,
"e": 2,
"v": 2,
"a": 2,
"r": 0,
"c": 1,
"t": 2,
"p": 2,
"d": 1,
"m": 1,
"s": 2,
"l": 2,
"h": 2,
"f": 0,
"k": 2,
"lang": "en"
},
"security": 0,
"context": "",
"boot_reason": 3,
"ex_cause": 3,
"upgrade": {
"x": 2,
"e": 0,
"f": "v2.3.8",
"t": "v2.3.9"
},
"last_month": {
"u": 2759.8,
"c": 481.7,
"p": 0,
"i": 0
},
"clock_offset": 1,
"features": [
"rdebug",
"kmp"
]
}
http://<ams_hostname>/tariff.json
{
"t": [ # Thresholds defined by user
5,
10,
15,
20,
25,
50,
75,
100,
150,
65535
],
"p": [
{
"d": 7, # Day of month
"v": 8.64 # Highest hourly consumption [kWh] on that day
},
{
"d": 3, # Day of month
"v": 9 # Highest hourly consumption [kWh] on that day
},
{
"d": 14, # Day of month
"v": 8.84 # Highest hourly consumption [kWh] on that day
}
],
"c": 10, # Next treshold level
"m": 8.82 # Average of the 3 highest-consumption hours in 3 different days of current month [kWh]
}
http://<ams_hostname>/priceconfig.json
This user has nothing configured.
{
"o": []
}
http://<ams_hostname>/configuration.json
If any of this is useful, you'll have to figure out what the parameter means. 😉
{
"version": "v2.3.9",
"g": {
"t": "Europe/Oslo",
"h": "pow-k",
"s": 0,
"u": "",
"p": "",
"c": ""
},
"m": {
"o": 1,
"a": 0,
"b": 2400,
"p": 3,
"i": false,
"s": 512,
"d": 2,
"f": 40,
"r": 0,
"e": {
"e": false,
"k": "00000000000000000000000000000000",
"a": "00000000000000000000000000000000"
},
"m": {
"e": true,
"w": 1,
"v": 1,
"a": 1,
"c": 1
}
},
"t": {
"t": [
5,
10,
15,
20,
25,
50,
75,
100,
150,
65535
],
"h": 3
},
"w": {
"s": "JH12",
"p": "***",
"w": 19.5,
"z": 1,
"b": false
},
"n": {
"c": 1,
"m": "static",
"i": "10.0.0.206",
"s": "255.255.255.0",
"g": "10.0.0.3",
"d1": "1.1.1.1",
"d2": "",
"d": true,
"n1": "pool.ntp.org",
"h": false,
"x": false
},
"q": {
"h": "10.0.0.210",
"p": 1883,
"u": "ha_mqtt",
"a": "***",
"c": "pow-k",
"b": "AMSdata",
"m": 4,
"s": {
"e": false,
"c": false,
"r": false,
"k": false
},
"t": 0,
"d": 0,
"i": 1000,
"k": 60
},
"p": {
"e": true,
"t": "",
"r": "10YNO-3--------J",
"c": "NOK"
},
"d": {
"s": false,
"t": false,
"l": 4
},
"i": {
"h": {
"p": 16,
"u": true,
"t": 9
},
"a": 0,
"l": {
"p": null,
"i": true
},
"r": {
"r": 13,
"g": 14,
"b": null,
"i": true
},
"d": {
"d": 6,
"b": 0
},
"t": {
"d": null,
"a": null
},
"v": {
"p": 10,
"o": 0,
"m": 1,
"d": {
"v": 33,
"g": 22
},
"b": 0
}
},
"u": {
"i": 1,
"e": 2,
"v": 2,
"a": 2,
"r": 0,
"c": 1,
"t": 2,
"p": 2,
"d": 1,
"m": 1,
"s": 2,
"l": 2,
"h": 2,
"f": 0,
"k": 2,
"lang": "en"
},
"o": {
"e": 1,
"c": 5953,
"u1": 5954,
"u2": 5955,
"u3": 5956
},
"h": {
"t": "",
"h": "",
"n": ""
},
"c": {
"e": true,
"p": 1,
"es": false
}
}
http://<ams_hostname>/temperature.json
On some boards the can install a temperature sensor. If installed, this call reads the temperature.
{
"c": 0, # Temperature in degrees Celsius
"s": []
}