Tutorial: Connecting SketchUp to Pachube v0.2

In this tutorial we will explain how to connect a pachube enabled component inside of SketchUp to a live pachube stream. Version 0.2 of the plug-in has be rewritten from scratch so that a user can simply add pachube enabled components to a SketchUp file without having to code how they work. This tutorial demonstrates how this process works. There will be more tutorials uploaded covering how to create new pachube-enabled components.

A video of this tutorial can be found here:
http://www.youtube.com/watch?v=QhzA5_oFKuA

1. Software installation

1.1. Installing Google SketchUp

For this tutorial you will need Google SketchUp installed. This is free from: http://sketchup.google.com/download/
(the pachube plugin has been tested on versions 6 and 7 for Mac and PC)

1.2. Install the plugin

Download the Pachube2Sketchup plugin from here: http://sketchup.pachube.com/plugin/files/v02/pachube2sketchup.zip

Unzip the Pachube2SketchUp folder and put it in the sketchUp plugins folder which can be found:
On a Windows PC:
C:\Program Files\Google\Google Sketchup 7\Plugins\

On a Mac:
Macintosh HD/Library/Application Support/Google SketchUp 7/SketchUp/plugins

Its important the files are in a separate folder or the plugin will load by default which may cause problems. If you have previously installed Pachube2SketchUp you'll need to delete or move the old version.

1.3. Download the Tutorial Scene.

Download the SketchUp scene for this tutorial: http://sketchup.pachube.com/tutorial_scenes/pachube2sketchup_v02_demo.skp

2. Connecting to Pachube

Once the plug-in is installed, open SketchUp, and load the tutorial scene mentioned above.

It should look something like this:

We'll now load and start the Pachube2SketchUp plugin.
Open the Ruby Console window from the menu Window>Ruby Console.

In the console type:
load 'pachube2sketchup/start.rb'

A new window should pop up with the plug-in inside.

Activating an Environment

Select the pachube flag so that the whole pachube component appears selected, which should look like this:

Click on 'Activate Environment' to have the plugin connect to pachube and retrieve the feed data. The first time you do this, an authentication dialog will pop up to ask for your Pachube username and password.

Wait until the data has fully loaded from Pachube and then you should be able to use the buttons to flick though the pachube historic data.

Known Issues

  • In Mac OSX the Pachube2SketchUp interface can get hidden behind the main sketchup window. Use CMD+~ to bring it to the front.

Tutorial Resources

References

Comments

mkal on July 22nd, 2009

greaaaaaaaaaat

Re: Tutorial: Connecting SketchUp to Pachube v0.2

reddoor on November 17th, 2010

I cannot get this to work. I've installed the plugin, downloaded the tutorial file. Loaded the script via the ruby window. Put in my log in details and this is what happens:

> load 'pachube2sketchup/start.rb'
true
------------------------------
Reading Pachube Environment...
Active Environment is: 1
It Contains 8 Pachube Enabled Components

Object 0:
Type: static
Connected to Pachube Feed: 1908, Stream Number: 0

Object 1:
Type: scaler
Connected to Pachube Feed: 1908, Stream Number: 2

Object 2:
Type: scaler
Connected to Pachube Feed: 1908, Stream Number: 3

Object 3:
Type: scaler
Connected to Pachube Feed: 1908, Stream Number: 0

Object 4:
Type: scaler
Connected to Pachube Feed: 1908, Stream Number: 6

Object 5:
Type: static
Connected to Pachube Feed: 0, Stream Number: 0

Object 6:
Type: static
Connected to Pachube Feed: 0, Stream Number: 0

Object 7:
Type: static
Connected to Pachube Feed: 0, Stream Number: 0

----------------------
Matching Entities...
Logo Detected
PachubeLogo ...Match Found
pObj1#1 ...Match Found
pObj2#1 ...Match Found
pObj3#1 ...Match Found
pObj4 ...Match Found
pObj5 ...Match Found
pObj6 ...Match Found
pObj7 ...Match Found
----------------------
Loading Object 1 Data...

And it just sits here forever.

Any suggestions?

I would love some more information on how to further use this plugin. I looks very very interesting.

Thanks

Re: Tutorial: Connecting SketchUp to Pachube v0.2

c.burman@pachube on November 23rd, 2010

Hi reddoor

This is Chris from pachube. I'm actually getting the same problem - looks like something is going a bit wrong. I'll investigate and post an update asap.

Chris

Re: Tutorial: Connecting SketchUp to Pachube v0.2

stef0wens on July 21st, 2011

Hi Chris from Pachube,

I am on MAC OSX 10.6.3 laptop and having exact same issue as reddoor above. What seems to be the issue?

thx

Re: Tutorial: Connecting SketchUp to Pachube v0.2

cjflyn on November 17th, 2011

PLEASE HELP!!

Everything was going great until I loaded the script via the Sketchup Ruby console. I got the exact same result as above 'loading Object 1 Data' and it just sits there indefinitely. Any ideas as to the source of the problem? I see this was first raised in 2010 so I guess its been around for a while. For info I am also on a Mac (OSX 10.6.8).

Any help would be greatly appreciated. Apart from this, loving Pachube !

Connecting SketchUp to Pachube v0.2

cjflyn on November 18th, 2011

Just to update you on loading the script via the ruby console. To see is this a Mac OSX specific issue, I have also tried this on windows 7 using both sketchup 7 and 8 with the same result, however, on Windows it does throw up the following script error:

Line: 128
Char: 9
Error: 'pJ.datastream[...].value.min_value' is null or not an object
Code: 0
URL: http://sketchup.pachube.com/plugin/sketchup.js

Any ideas what's causing this and how it can be resolved?

Thanks

Connecting SketchUp to Pachube v0.2