Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switchbot v1.0 API returning message "NULL" #380

Open
benjimons opened this issue Dec 18, 2024 · 0 comments
Open

Switchbot v1.0 API returning message "NULL" #380

benjimons opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@benjimons
Copy link

benjimons commented Dec 18, 2024

Analysis

Querying the Lock, Humidity and Temperature sensor results in a Message NULL response. This has been happening for two days now.

Expected Behavior

Returns temp and humidity

Steps To Reproduce

See CURL below.

Logs

curl -XGET -H 'Authorization: Bearer <redacted>' 'https://api.switch-bot.com/v1.0/devices/<redacted>/status'
{"message":null} -v

Note: Unnecessary use of -X or --request, GET is already inferred.
* Host api.switch-bot.com:443 was resolved.
* IPv6: (none)
* IPv4: 52.192.133.221, 43.206.196.170, 52.196.215.4
*   Trying 52.192.133.221:443...
* Connected to api.switch-bot.com (52.192.133.221) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=api.switchbot.net
*  start date: Dec  4 00:00:00 2024 GMT
*  expire date: Jan  3 23:59:59 2026 GMT
*  subjectAltName: host "api.switch-bot.com" matched cert's "api.switch-bot.com"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M03
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://api.switch-bot.com/v1.0/devices/DDA5F6BAA6FE/status
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: api.switch-bot.com]
* [HTTP/2] [1] [:path: /v1.0/devices/DDA5F6BAA6FE/status]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [authorization: Bearer <redact>]
> GET /v1.0/devices/<redact>/status HTTP/2
> Host: api.switch-bot.com
> User-Agent: curl/8.7.1
> Accept: */*
> Authorization: Bearer <redact>
> 
* Request completely sent off
< HTTP/2 500 
< date: Wed, 18 Dec 2024 23:27:19 GMT
< content-type: application/json
< content-length: 16
< x-amzn-requestid: a995ebcb-03e1-407d-85b8-af0be136676b
< x-amzn-errortype: AuthorizerConfigurationException
< x-amz-apigw-id: DAsNNGyCtjMEIuQ=
< 
* Connection #0 to host api.switch-bot.com left intact
{"message":null}% 

Configuration

N/A

Environment

  • OS: Ubunutu
  • Software: cURL

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants