Best thing in the world if using a Fire tablet for indigo

Posted on
Wed Nov 28, 2018 2:07 pm
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

noel1983 wrote:
roussell wrote:
Image

Something I’m working on at the moment, not settled on the BG image and placement yet, but this is the idea. Everything is done in Apple Keynote; I almost always use that or MS PowerPoint to design control pages.

Terry


Sent from my iPhone using Tapatalk


Lovely and clean!
How do you do the little ‘range’ bars for the temperature?


Sent from my iPad using Tapatalk



Thanks! It’s a script I wrote that pulls a free widget from Darksky, converts it to an image and crops it to show just that info. I posted it a while ago but can find it at the moment. Later tonight I’ll dig up that post, or repost the script.

Terry


Sent from my iPhone using Tapatalk

Posted on
Wed Nov 28, 2018 2:08 pm
noel1983 offline
Posts: 446
Joined: Oct 17, 2014

Re: Best thing in the world if using a Fire tablet for indig

Now that’s a script and a half!! Nice!!

I’ll stick to just getting my first control page Live lol


Sent from my iPhone using Tapatalk

Posted on
Wed Nov 28, 2018 2:28 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Best thing in the world if using a Fire tablet for indig

Embed a tiny web page - that is very interesting. I have been playing around with web stuff for ~the past 2 months (my other hobby is making pizza). Terry, could you explain how to embed a web page if you have time.

BTW, you can check out my web page(s) here. I'm still learning so pls don't make fun of them :-)

www.mypizzamaster.com

_______
Norm

Posted on
Wed Nov 28, 2018 6:08 pm
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

norcoscia wrote:
Embed a tiny web page - that is very interesting. I have been playing around with web stuff for ~the past 2 months (my other hobby is making pizza). Terry, could you explain how to embed a web page if you have time.

BTW, you can check out my web page(s) here. I'm still learning so pls don't make fun of them :-)

http://www.mypizzamaster.com



That website is awesome! I need to something like that for BBQ! We love our smoked meats in Alabama!

The beta (alpha?) version of DP supports embedding webpages, it's pretty freaking great! Adam has a post about it here: viewtopic.php?f=73&t=21240

Terry

Posted on
Wed Nov 28, 2018 6:16 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Best thing in the world if using a Fire tablet for indig

Before I retired I worked with some great people that I met in Huntsville - pizza and BBQ - that is as good as it gets.....

PS. this brisket I smoked made my eyes roll back in my head...
Attachments
2018-11-28_16-15-33.jpeg
2018-11-28_16-15-33.jpeg (406.88 KiB) Viewed 2584 times
2018-11-28_16-15-21.jpeg
2018-11-28_16-15-21.jpeg (439.81 KiB) Viewed 2584 times

_______
Norm

Posted on
Wed Nov 28, 2018 6:44 pm
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

norcoscia wrote:
Before I retired I worked with some great people that I met in Huntsville - pizza and BBQ - that is as good as it gets.....

PS. this brisket I smoked made my eyes roll back in my head...


That sir, it a fine looking brisket, the smoke ring alone made my mouth water! I just told my wife I'll be busy this weekend with brisket and pork shoulder!

Terry

Posted on
Wed Nov 28, 2018 7:04 pm
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

noel1983 wrote:
Now that’s a script and a half!! Nice!!


Ha thanks, it's actually not that bad - and to be honest, with Domopad now I could probably skip most of this and just embed the widget as a live control page.

As it stands today there are two files that I created, a bit convoluted and I could probably trim this down a good bit, but it works soooooo...

It relies on a beautiful little command line tool called webkit2png, that as the name suggests, converts a webpage to a png image. It's not on the mac by default so you'll have to install it using homebrew. Assuming you have loaded homebrew on your Indigo server, run this to install webkit2png
Code: Select all
brew install webkit2png

As I mentioned earlier, Darksky makes available several nice widgets that you can embed on your personal webpage: https://darksky.net/widgets

This particular widget is no longer listed on the above page, but it still works, here is a blog post referencing the one I use: https://blog.darksky.net/forecast-embeds/

Because I wanted the webpage that will be converted to an image to be a specific size, rather than point webkit2png directly at the widget URL, I created a local HTML file to size everything as I wanted:
Code: Select all
<!DOCTYPE html>
<html>
<head>
    <style>
        #timeline {
   width: 800px;
   height: 210px;
   background-color:transparent;
   border: 0px none;
   margin-top: -50px;
   margin-left: -24px;
}
    </style>
    </head>
<body>
    <iframe id="timeline" src="https://forecast.io/embed/#lat=33.39&lon=-86.71" scrolling="no" frameborder="0" ></iframe>
    <script type="text/javascript">
       
    </script>
</body>
</html>

I named that HTML file "forecast.html" and I made sure that it worked like I wanted by opening it in Safari. When I was happy with it put it in my Indigo scripts folder along with the following shell script:
Code: Select all
!/bin/sh

/usr/local/bin/webkit2png -F /Library/Application\ Support/Perceptive\ Automation/Scripts/forecast.html --transparent -D /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/IndigoWebServer/static/ -o forecast --delay=3

All that script does is call webkit2png with my local webpage as an input, it creates the image and places it in the proper directory for the control page to fetch as a refreshing image. I use --delay=3 to make webkit2png wait 3 seconds to give the page time to render the webpage fully before creating the image. likewise the --transparent option created the PNG with a transparent background.

Once you can run that command from the terminal and successfully create images, it's just a matter of creating a schedule in Indigo to run the command at whatever interval you want, and then of course designing the control pages, which is the really hard part for me...

Terry

Posted on
Wed Nov 28, 2018 8:16 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Best thing in the world if using a Fire tablet for indig

Terry that is an awesome implementation I will steal if I am brave enough to install homebrew.

Posted on
Thu Nov 29, 2018 3:55 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Best thing in the world if using a Fire tablet for indig

Sod control pages and tablets.. I want wall mounted briskets which auto refresh themselves! Who wants to write the plugin?

Also I’m cagey on my rates because I need time to get into your bank accounts to work out how much I can fleece you for.


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Thu Nov 29, 2018 4:22 am
noel1983 offline
Posts: 446
Joined: Oct 17, 2014

Re: Best thing in the world if using a Fire tablet for indig

roussell wrote:
noel1983 wrote:
Now that’s a script and a half!! Nice!!


Ha thanks, it's actually not that bad - and to be honest, with Domopad now I could probably skip most of this and just embed the widget as a live control page.

As it stands today there are two files that I created, a bit convoluted and I could probably trim this down a good bit, but it works soooooo...

It relies on a beautiful little command line tool called webkit2png, that as the name suggests, converts a webpage to a png image.

Terry


I’ve just realised this solves a long outstanding challenge I’ve had of displaying tide times!! Genius!!


Sent from my iPhone using Tapatalk

Posted on
Thu Nov 29, 2018 6:17 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

durosity wrote:
Sod control pages and tablets.. I want wall mounted briskets which auto refresh themselves! Who wants to write the plugin?


We might be brothers separated at birth. That idea has been placed In your dome by God himself. Wall mounted briskets, Genius!

Terry


Sent from my iPhone using Tapatalk

Posted on
Thu Nov 29, 2018 6:56 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Best thing in the world if using a Fire tablet for indig

Mounted at mouth level, of course.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Nov 29, 2018 7:24 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Best thing in the world if using a Fire tablet for indig

DaveL17 wrote:
Mounted at mouth level, of course.


I’m envisioning automatic sauce-squirters and face washers. This could be the beginning of something great.


Sent from my iPhone using Tapatalk

Posted on
Thu Nov 29, 2018 7:29 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Best thing in the world if using a Fire tablet for indig

I'm really upset, none of you have considered automating the wall mounted brisket yet!

I suggest a blind controller with a hand-towel on two sprockets, one motorised that drys your face after the water dispenser.

Late 2018 mini 10.14

Posted on
Thu Nov 29, 2018 7:34 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Best thing in the world if using a Fire tablet for indig

Hat mounted face windshield wiper w/ apple watch app to spry water as needed - deluxe model has camera to activate wiper only one face sauce threshold is exceeded. Version 2 will support butts and briskets :D

_______
Norm

Who is online

Users browsing this forum: No registered users and 3 guests