Skip to content

Instantly share code, notes, and snippets.

@carlism
Created March 11, 2013 14:33
Show Gist options
  • Save carlism/5134652 to your computer and use it in GitHub Desktop.
Save carlism/5134652 to your computer and use it in GitHub Desktop.
Sample Ruby interaction with redis and my zwave bridge
require 'redis'
r = Redis.new
nodes = r.keys "zw_node:*"
nodes.each do |node|
name = r.hget node, "nodeName"
value = r.hget node, "v_Basic"
puts "Node: #{name} has value: #{value}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment