i backed a project on Kickstarter Called LaMetric. it's basiclly an LED display that shows all kind of info from different sources.
it can display a couple of letter (i think around 12) and an icon image in RGB colors. please have a look https://lametric.com
they have a developer platform so you can create your own feed and send whatever text you want to the device, its a neat idea and i think with the power of eventghost you can do quite a lot with it.
if you create an account on (https://lametric.com/creators) (it will take less than a minute) then you can create your own feeds
they provide you with a simple code, i'm try to turn this code into Python script and have the text field fed with different info from EG, but for some reason i keep getting errors when i try to test it. the code i modified is below, please have a look and let me know why its not working?
this is the sameple code they give you
Code: Select all
curl -X POST \
-H "Accept: application/json" \
-H "X-Access-Token: [MY-TOKEN]" \
-H "Cache-Control: no-cache" \
-d '{
"frames": [
{
"index": 0,
"text": "xxx",
"icon": "a87"
}
]
}' \
https://developer.lametric.com/api/V1/dev/widget/update/com.lametric.(API)/1
and this is my code turned into Python
Code: Select all
import requests
headers = {
'Accept': 'application/json',
'X-Access-Token': 'MY-TOKEN',
'Cache-Control': 'no-cache'
}
payload = {
"frames": [
{
"index": 0,
"text": "<TEXT FROM EG GOES HERE>",
"icon": "null"
}
]
}
requests.post('https://developer.lametric.com/api/V1/dev/widget/update/com.lametric.(API)/1', headers=headers, json=payload)
if anyone have any clue please let me know, maybe in the future we could create a plugin, it's very handy at displaying quick info
Thank you in advance