Project

homewizard

0.0
The project is in a healthy, maintained state
A Ruby wrapper for the HomeWizard APIs (readonly)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 0.3.0
 Project Readme

Hudu API

Version

This is a wrapper for the HomeWizard rest API.

Installation

Add this line to your application's Gemfile:

gem 'homewizard'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install homewizard

Usage

Before you start making the requests to API provide the endpoint using the configuration wrapping.

require 'homewizard'
require 'logger'

# use do block
HomeWizard.configure do |config|
  config.endpoint = ENV['HOMEWIZARD_P1_API_HOST'].downcase
end

# or configure with options hash
client = HomeWizard.client({ logger: Logger.new('debug.log) })

# check api version
return unless if client.device_info.api_version.eql? 'v1'

# get last data
data = client.recent_data

if data.active_power_w < 0
  # do something to use energy

end

Resources

Endpoint for data related requests

Resource API endpoint
.recent_data /api/v1/data
.socket_state /api/v1/state
.telegram /api/v1/telegram
.identify /api/v1/identify

Publishing

  1. Update version in version.rb.
  2. Add release to CHANGELOG.md
  3. Commit.
  4. Test build.
> rake build

  1. Release
> rake release

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jancotanis/homewizard.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).