Recently, I started using Nature Remo and found it convenient, so I made a gem called nature_remo_api of Nature Remo's API Client. This is my first time to make a gem, so I would appreciate it if you could comment if it would be easier to use.
Excerpt from the official
Smart remote control that allows you to operate home appliances such as air conditioners and TVs with your smartphone
And that.
Until now, it was necessary to manage the remote control for each home appliance, but with Nature Remo, it can be completed with just a smartphone. Recently, the number of home appliances that are connected to the Internet is increasing, but I personally think that Nature Remo is a gadget that can update existing home appliances so that they can be connected to the Internet in a pseudo manner. For details on how to use it, please refer to the Official Site.
This is for rubygems! (Because it was my first time to make a gem, I was impressed when it appeared on this page ... lol) https://rubygems.org/gems/nature_remo_api
First of all, please get an access token from this page. (There is a link to the page to get an access token in the description of OAuth2)
Set environment variables
echo 'export NATURE_REMO_ACCESS_TOKEN="Set the acquired token"' >> ~/.bash_profile
Reflect environment variables
source ~/.bash_profile
NatureRemoApi::Client.configure do | config |
config.access_token = ENV['NATURE_REMO_ACCESS_TOKEN']
end
client = NatureRemoApi::Client.new
client.user_me
client.update_user_me(nickname: <nickname>)
client.devices
client.update_device(device_id: <device_id>, name: <name>)
client.appliances
client.signals(appliance_id: <appliance_id>)
client.send_signal(signal_id: <signal_id>)
It's still under development, so I'd like to continue to support more APIs!
Recommended Posts