awtrix/AWTRIX2.0-Controller

awtrix api bug?

learnman1994 opened this issue · 1 comments

Every time when I use python to call the api, the call ends, awtrix will freeze, and then keep checking the host...

This is my python code:

import requests
import json

url = 'http://api.openweathermap.org/data/2.5/weather'
data = {
'units': 'metric',
'id': 'xxxxx',
'appid': 'xxxxxxxxxxxxxxx'
}
response = requests.get(url, params=data)
content = json.loads(response.text)
types = content['weather'][0]['main']
url1 = 'http://x.x.x.x:7000/api/v3/notify'
data = {
"name": "weather",
"force": True,
"icon": 433,
"moveIcon": False,
"repeat": 1,
"scrollSpeed": 0,
"text": types,
"color": [
0,
255,
0
]
}
response = requests.post(url1, json=data)

This is not a controller related problem. Please open a bug report in the official discord channel