Start a new topic

get base64 for icons from library

I'd like to use the device API to update the icon on my clock face.


I have the icons in the library, but

https://lametric:4343/api/v2/device/apps/com.lametric.clock/widgets/clock.clockface/actions

requires a base64 encoding of the image.


What is the best way to get the base64?


Thanks

Chris




1 person has this question

BTW: Updating just the icon at the clock face using icon ID is currently possible via IFTTT triggers, but they become way too expensive for such a simple thing.

So I am wondering how IFTTT can do it, but it's not possible via API.

I als want this, and dom’t want to pay for IFTT. Want to steer this with my Homey

Hi guys!


If you want to get base64 code please try the next steps:


1)Save your icon in .png format (it looks like this one: https://developer.lametric.com/content/apps/icon_thumbs/31786.png );
3)Drag and drop it in the needed field;
4)When you see your icon loaded, tap 'Convert to Base64!';
5)Copy all code (plese note that it should start like this data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAYAAAC...)
6)Paste this code in your app frame in icon line


 ("icon": "<icon id or base64 encoded data>")


7)Save all changes


 We hope this helps. If you have any other questions, please drop an email on support@lametric.com.


Best wishes,

LaMetric Team

Hi,


Thanks for the guide but do you still plan to allow the use of IDs instead of base64? When interacting with a widget?

Login or Signup to post a comment