Closed nodecentral closed 11 years ago
I think open is a file method. Try using methods for sending http get commands.
You might have a look here: https://github.com/kreynolds/ruby-mios
Google search is an amazing thing!
Thanks Elvis, being a novice on linux, i had exhausted google and Bing but no joy, however (and this is for anyone else looking) I was helped by Micasaverde forum, who told me to add
require 'open-uri'
at the beginning of my .rb file
Genius !
Next thing to find out is how I get Siriproxy to stay running in the background on my PI rather than close whenever the terminal window closes .. (I work solely on an iPad, and the terminal window closes frequently when switching screens/apps.
Glad you got it working.
I launch SiriProxy automatically upon boot using init.d scripts. Head to my YouTube page for a how to if interested.
Elvis
On May 6, 2013, at 13:28, nodecentral notifications@github.com wrote:
Thanks Elvis, being a novice on linux, i had exhausted google and Bing but no joy, however (and this is for anyone else looking) I was helped by Micasaverde forum, who told me to add
require 'open-uri'
at the beginning of my .rb file
Genius !
Next thing to find out is how I get Siriproxy to stay running in the background on my PI rather than close whenever the terminal window closes .. (I work solely on an iPad, and the terminal window closes frequently when switching screens/apps.
— Reply to this email directly or view it on GitHub.
Hi
I am trying to integrate siriproxy with my Micasaverde Vera home automation system and I have the following problem issue.
While is have added the following to /usr/local/rvm/gems/ruby-2.0.0-p0/gems/siriproxy-0.5.2/plugins/siriproxy-example/lib/siriproxy-example.rb
listen_for /\b(What is|give me)(?: the)? living room temperature?/i do |state| ltemp = open("http://192.168.100.53:49451/data_request?id=lu_variableget&DeviceNum=23&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature") say "The living Room temperature is #{ltemp.read} degrees." request_completed end
But it gives me this.
[Info - Plugin Manager] Applicable states: [Info - Plugin Manager] Current state: [Info - Plugin Manager] Matches, executing block [Info - Plugin Manager] Plugin Crashed: No such file or directory - http://192.168.100.53:49451/data_request?id=lu_variableget&DeviceNum=23&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature
If it helps I am running this from the latest image for the Raspberry Pi and have DNSMASQ set up to run. The http request would normally return a 2 digit number
Any help would be greatly appreciated.