Xively trigger ... need help

Hi,

I am trying to set a variable on my device via a lively trigger. For instance, I have working on a smoker regulator and want to be able to set my smoker target temperature.

I have been able to post channels to but not read from it.

I have created a trigger on my SmokerTargetTemp with a change condition.

Agent Code
`API_Key <- “my key”; //Type your Xively API Key
Feed_ID <- “my feed” //Type your Feed ID

client <- Xively.Client(API_Key);

function requestHandler(request, response) {
try {

// Trigger from Xively
if ("TargetTempXively" in request.query) {
    
    tempChannel <- Xively.Channel("SmokerTargetTemp");
    feed <- Xively.Feed(Feed_ID,[tempChannel]);
    
    //Pull from Xively
    local temperature = client.Get(feed);
    server.log("Xively trigger received: " + temperature);        
    device.send("TargetTemp", temperature);
}

// send a response back saying everything was OK.
response.send(200, "OK");

} catch (ex) {
response.send(500, "Internal Server Error: " + ex);
}
}

// register the HTTP handler
http.onrequest(requestHandler);`

What I get from the server log is:
2014-12-28 17:19:18 UTC-5 [Agent] Xively trigger received: (instance : 0x7fa2b6d00dd0) 2014-12-28 17:19:18 UTC-5 [Device] Target temp now at (null : 0x0)

This is where I get stuck, I see that I receive the trigger. Then I want to read the channel and get that instance : 0x7fa2b6d00dd0. How can I interpret that? Is there a way to get a integer value?

Thanks for your help.

With only a single channel in the feed the following wo uld get the current value of your channel
local temperature = client.Get(feed).Channels[0].current_value;
in place of your
local temperature = client.Get(feed);
the client.Get returns the feed, not the current value.