"Invalid SN." Retrieving data via Rest API

  Hello,


I'm retrieving data from my meter using rest API and everything is working fine till couple of days ago.

No I got this message:

{

"data": null,

"successful": false,

"message": "Invalid SN."

}

This is the call:

https://www.iammeter.com/api/v1/site/meterdata/"SN"

and I pass my authorization token in the header.


the "SN" is correct and is the same as before (and the same I can check in my personal area in iammeter web app).

Anyone can helps?


Thread Status
3
95
3
1
0

Sort replies by:

Please contact us in our feedback system

https://www.iammeter.com/docs/feedback-and-notification

and let me know which is the specific SN you used.


please do not post the SN in public forrum.

Hello,

ok thanks I'm on my way.


Lorenzo

What application are you calling the API from?

for example I use this yaml in home assistant configuration.yaml file to call the local API, maybe this can help?  (The code indents don't show below, sorry).  This is for a WEM3080T and requesting the phase A+B+C grid flow in watts.

  - platform: rest
name: "iammeter API Grid"
resource: http://192.168.1.244/api/monitorjson
method: GET
authentication: basic
username: if default the user is 'admin'
password: if default the pass is 'admin'
scan_interval: 6
json_attributes:
- Data
value_template: "{{ value_json.Datas.3[2] }}"
force_update: true

Similarly for a WEM3080 as follows

  - platform: rest
name: "iammeter API battery"
resource: http://192.168.1.243/api/monitorjson
method: GET
authentication: basic
username: if default the user is 'admin'
password: if default the pass is 'admin'
scan_interval: 6
json_attributes:
- Data
value_template: "{{ 0 - value_json.Data[2] }}"
force_update: true

and for another WEM3080

  - platform: rest
name: "iammeter API Solar 1"
resource: http://192.168.1.241/api/monitorjson
method: GET
authentication: basic
username: if default the user is 'admin'
password: if default the pass is 'admin'
scan_interval: 6
json_attributes:
- Data
value_template: "{{ value_json.Data[2] }}"
force_update: true

Hello,ok thanks I'm on my way.Lorenzo
Looks like you are new here. Register for free, learn and contribute.