External URL for tile?


#8

Interesting… I could surely see benefits to having that capability. I think the challenge would be where to store the png files so they could be called into third party apps. My two cents would be to also let the png files be referenced by others, so only one piston would need to do the ‘work’, yet others could benefit from the visual data. (providing they knew the url reference to the png file)

Man, this would be revolutionary where I could have all my extensive pistons running behind the scenes, yet my 2nd instance dashboard would only need to display images. Goodbye lag!!


#9

Yeah, my thought was to run a cron job on my own server that uses curl to pull down a PNG of the tile every X amount of seconds… From there, I can hit my own server to retrieve the PNG and use it how I see fit…


#10

This is very unlikely to be supported by the current version of the dashboard but I could imagine a browser extension or userscript that works with the dashboard to capture and upload those images somewhere. Would you be able to leave a “source” dashboard open in a browser tab at all times for a browser extension to watch the dashboard, or is that a nonstarter?


#11

Browser extensions are a no-go… . I’m looking at another alternative which is a script that returns json data into a file and uses imagemagick to write the values of the data returned to an image on an apache server. From there, I’ll pull the data into ActionTiles…
I did start messing around with @Robin DTH of SmartTiles, which shows up as a switch in ActionTiles… May need to hack around with it a bit in order to return things like Value1, Value2, etc…


#12

It’s called Value Tiles… @CosmicPuppy (Terry) wouldn’t be too happy if i called it SmartTiles haha… and they aren’t ‘smart’ tiles in my handler anyway, they just show values (hence the name).


#13

Yeah, sorry “value tiles”… For anyone interested, I got around this problem without using webcore at all.

#!/bin/bash
cd /var/www/html;/usr/bin/convert -size 160x160 xc:white -pointsize 24 -gravity Center label:"Time to Work:\n`curl -s 'https://maps.googleapis.com/maps/api/distancematrix/json?departure_time=now&origins=<MyOrigin>&destinations=<MyDesination>&key=<MY_API_KEY>'|jq '.rows[0] .elements[0].duration_in_traffic.text'`\nas of `date +"%I:%M %p"`" convert.jpg >/dev/null 2>&1

Uses ImageMagic’s ‘convert’ command to create the image
Labels it by pulling the json data from google maps api
Uses ‘jq’ to parse the json
Finally writes it an image on my webserver
(Obviously replace MyOrigin, MyDestination, and MyAPIKey with proper values.

edit: Then setup a cron job to run every minute during the 7am hour and execute this script


#14

Interesting. So what is this giving you exactly? Your commute time leveraging Google maps?


#15

That’s correct. The current travel time from one address to another. It just creates a small jpeg image file that looks like this:

webcore


#16

@allrak , were you able to do this with WebCoRE tiles as well? Your example is for google maps. On my ‘someday todo list’ is experimenting with ImageMagic and a web server on my pi to scrape some web data and turn it into a image for ActionTiles (custom weather tile for example).


#17

Yep, certainly able to do it with webcore tiles. The reason I had to use imagemagick and create my own tiles is exactly what you said… ActionTiles.
There’s currently no way (that I know of) to pull a WC tile into an ActionTiles “media” resource.

Here’s an example of generating the WC tile:

Credit for the original piston goes to @Equis
https://community.webcore.co/t/daily-commute-traffic-in-lights/5403


#18

I wasn’t clear… are you able to run the ImageMagic script on a WebCore tile? For example create/expose an image of a custom WebCore presence tile so that could be displayed in ActionTiles?

Thanks!


#19

Nope. ImageMagik is a binary/program that has to be installed somewhere.


#20

But on your server where you run the bash script… oh I see the part I was overlooking. ImageMagik doesn’t load the webpage and create image, you are supplying text to ImageMagik to create image.

We need a web page to image tool :slight_smile:


#21

I am able to pull a webcore presence into ActionTiles by using a piston to POST the presence to a server side script. The script grabs the status from various variables and stores it in a mySQL database. In ActionTiles I just create a media tile with a URL pointing to a script on my web server that pulls the status from the DB adds it to the profile pic and then spits out a PNG in real time that ActionTiles can read and display.

Here’s how my Action Tiles panel looks:

Here’s the link to another post on here I created in regards to the piston that does it all.

Using this approach you can pretty much interface with anything on WebCore, not just for presence stuff.

I was planning releasing this publicly to the community but with the current unreliable state of WebCore presence I’m holding off for the time being. Hopefully webCoRE app will get fixed soon.


#22

So if I wanted to do a countdown timer in webore of days until vacation and post that tile on my ActionTiles, could I do it this way? Currently, I am using a work-around for this but ActionTiles adds script at the bottom of my tile…
Illum-counter

Can I automatically (with webcore) pull an image from my google account daily, edit it, and post that on my ActionTiles without the “illum (lx)” ?


#23

The only way I’ve found to get external data like that (without repurposing a tile) is to use a media tile with shields.io. This thread has a ton of details and examples (and it ain’t all pretty!): https://support.actiontiles.com/communities/12/topics/2707-live-traffic-travel-time-tile-image-from-query-text-using-shieldsio


#24

can you tell me how you got the photos in the tiles. I have my photos stored on my web server and I’m using the following url but it’s not pulling the photo into the tile:

https://mysite.com/folder1/200x200/333333/fffff&name=dad&detail=1&bgalpha=0


#25

If you are referring to getting pics into ActionTiles, it has nothing to do with webCoRE.

I would try searching on their forum.


#26

No, I was referring to pulling the photo into the presence tile like you have for “Dad, Megan, and Ryile”

I am getting the tile with the colored ring but my photo does not come into the circle.


#28

My apologies… Just to clarify:

  • That screenshot is ActionTiles, not webCoRE.
  • The complexity is with the server script, not webCoRE…

In this example, the only thing that webCoRE does is to send a one line command to the server to execute the script.


To say this another way, the “brains” behind this is in the server script, and the final images are displayed via ActionTiles.

Searching on the appropriate forum is likely the best place to get answers.