openhab-addons: [meater] Bad response from API

I don’t know if this is bug, something changed in the service, or just a temporary issue, but nevertheless sharing it quickly in case something needs to be done on our side before release 4.2.

I noticed this in my logs today:

2024-07-02 22:47:37.205 [TRACE] [ng.meater.internal.api.MeaterRestAPI] - API response: {"status":"Bad Request","statusCode":400,"message":"Invalid JSON","help":"https://github.com/apption-labs/meater-cloud-public-rest-api"}
2024-07-02 22:47:37.206 [DEBUG] [ng.meater.internal.api.MeaterRestAPI] - getFromApi failed, HTTP status: 400
2024-07-02 22:47:37.206 [WARN ] [ng.meater.internal.api.MeaterRestAPI] - Failed to refresh! Failed to fetch class="afterFrom marked"> from API!

My meaterapi Thing is therefore offline.

Expected Behavior

Binding should be able to communicate with the cloud API.

Current Behavior

See above.

Possible Solution

Not yet known.

Steps to Reproduce

I don’t know if anything particular is needed. I have a Meater Block with four probes.

Context

We are close to 4.2RC.

Your Environment

  • Version used: 4.1.3 (but no PR’s for 4.2 that could cause this)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (19 by maintainers)

Commits related to this issue

Most upvoted comments

In this post I see mainly the Meater Block discussed and would be glad if your solution also covers the Meater+.

The fix is for the cloud communication which is broken for any product supported by the binding.

I was 30 min too late 😃

image

After fix:

image

Ha! Jinx ! (we posted the same time)

hmmm, this is odd, looks like there are 2 duplicate Content-Type entries, thats not right, i wonder if my caddy is cleaning that up on the way out… i bet that might be it

 "request": {
        "remote_ip": "192.168.91.10",
        "remote_port": "36326",
        "client_ip": "192.168.91.10",
        "proto": "HTTP/1.1",
        "method": "POST",
        "host": "xxxxxxxx",
        "uri": "/v1/login",
        "headers": {
            "Accept-Encoding": [
                "gzip"
            ],
            "User-Agent": [
                "Jetty/9.4.54.v20240208"
            ],
            "Accept": [
                "application/json"
            ],
            "Content-Type": [
                "application/json",
                "application/json"
            ],
            "Content-Length": [
                "63"
            ]
        },
        "tls": {
            "resumed": false,
            "version": 772,
            "cipher_suite": 4865,
            "proto": "",
            "server_name": "xxxxxxxx"
        }
    }

Good thing i’m just grilling burgers for Independence day tomorrow and not steaks! I depend on my Alexa to tell me when their ready!