All Projects → asantaga → Wiserhomeassistantplatform

asantaga / Wiserhomeassistantplatform

Licence: mit
Platform and related climate/sensors to support the Drayton Wiser Home Heating System

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Wiserhomeassistantplatform

Ha Airx
airx的ha插件
Stars: ✭ 13 (-80%)
Mutual labels:  homeassistant
Hass Yaap
Yet another alarm (control) panel for Home Assistant.
Stars: ✭ 44 (-32.31%)
Mutual labels:  homeassistant
Addon Adb
Android Debug Bridge - Home Assistant Community Add-ons
Stars: ✭ 58 (-10.77%)
Mutual labels:  homeassistant
Smarthome
SmartHome: firmware per ESP8266 - Casa domotica
Stars: ✭ 28 (-56.92%)
Mutual labels:  homeassistant
Hadashboard Widgets
Widgets for HADashboard / Appdaemon
Stars: ✭ 40 (-38.46%)
Mutual labels:  homeassistant
Home Assistant Z Wave Graph
Graph your Z-Wave mesh automatically from within Home Assistant.
Stars: ✭ 51 (-21.54%)
Mutual labels:  homeassistant
Homeassistant Openmediavault
OpenMediaVault integration for Home Assistant
Stars: ✭ 27 (-58.46%)
Mutual labels:  homeassistant
Lovelace Time Picker Card
🕰️ Time Picker Card for Home Assistant's Lovelace UI
Stars: ✭ 63 (-3.08%)
Mutual labels:  homeassistant
Repository Edge
EDGE - Home Assistant Community Add-ons
Stars: ✭ 42 (-35.38%)
Mutual labels:  homeassistant
Tasmota Irhvac
Home Assistant platform for controlling IR Air Conditioners via Tasmota IRHVAC command and compatible harware
Stars: ✭ 58 (-10.77%)
Mutual labels:  homeassistant
Yahoofinance
Home Assistant component which allows you to get stock updates from Yahoo finance.
Stars: ✭ 28 (-56.92%)
Mutual labels:  homeassistant
Homeassistant Skodaconnect
Skoda Connect - An home assistant plugin to add integration with your car
Stars: ✭ 38 (-41.54%)
Mutual labels:  homeassistant
Esphome Config
My ESPHome configuration files for my ESP8266 / ESP32 plugs and boards for use with Home Assistant.
Stars: ✭ 53 (-18.46%)
Mutual labels:  homeassistant
Hass Components
My Home Assistant custom components
Stars: ✭ 21 (-67.69%)
Mutual labels:  homeassistant
Addon Spotify Connect
Spotify Connect - Home Assistant Community Add-ons
Stars: ✭ 60 (-7.69%)
Mutual labels:  homeassistant
Homeassistant
Example Home Assistant Configs
Stars: ✭ 846 (+1201.54%)
Mutual labels:  homeassistant
Home Assistant Config
🏠 My Home Assistant configuration, a bit different that others :) Be sure to 🌟 this repository for updates!
Stars: ✭ 1,050 (+1515.38%)
Mutual labels:  homeassistant
Audi connect ha
Adds an audi connect integration to home assistant
Stars: ✭ 63 (-3.08%)
Mutual labels:  homeassistant
Addon Ide
IDE - Home Assistant Community Add-ons
Stars: ✭ 61 (-6.15%)
Mutual labels:  homeassistant
Addon Zwave2mqtt
Z-Wave to MQTT - Home Assistant Community Add-ons
Stars: ✭ 58 (-10.77%)
Mutual labels:  homeassistant

Wiser Home Assistant Platform v2.5

This repository contains a Home Assistant component + platforms, for the awesome Drayton Wiser Heating solution.

For the latest version of the Wiser Home Assistant Platform please use the master branch or better still install via HACS. if you want bleeding edge then checkout the dev branch, or look out for beta releases via HACS. Depending on what you choose you may need to use the Manual Code Installation described below.

For more information checkout the AMAZING community thread available on https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965

Functionality

  • Support for Home Assistant Component Store

  • Support for Native Home Assistant Configurations (no more editing YAML!)

  • Support for Wiser TRVs, Hub and SmartPlugs

  • Climate platforms

    • List of climate entities for each Room
    • Animated icons for the Rooms to let you know which rooms are actually being heated (credit @msp1974)
    • Allows setting of temperatures from HA
    • Allows setting of boost temperature using Home Assistant Presets
    • Displays icon if radiator is heating (heat flowing) or not
  • Service to set heating boost

    • Services to get, set and copy heating schedules (See instructions below)**
  • Switch platform(s)

    • Allows the switching of various system switches including EcoMode, ComfortMode, AwayMode, Valve Protection and AwayModeAffectsWater
    • Allows the switching of the wiser system smartplugs
  • Sensor Platforms

    • TRV Sensor
      • Each TRV is represented by a Sensor platform. Many attributes are exposed including extensive information about the device, such as WIFI Signal strength, firmware version, battery levels and zigbee information (including if connection to hub is direct or via repeater) etc
    • Room Thermostats Sensors
      • Displayed attributes include battery levels, humidity etc
    • Smartplug displayed as a sensor, firmware etc
      • Service providing ability to turn smartplug on, off or set to auto schedule
    • Heathub sensor
    • Drayton Wiser Cloud Status Sensor
      • Nice to be able to have automation when things aren't working
    • Heating Relay status Sensor
      • Nice to know when the heating is on/off.
        • This is nice to use in conjunction with the Climate platform when graphing data using Grafana
    • Hot Water relay status Sensor
      • Nice to know when the hot water is on/off.
      • Also a service which allows you to modify the state of the hotwater
    • Operation Mode Sensor (aka away sensor)
      • This sensor returns the away status of the heathub, being either away or normal.
    • Battery Sensors for all the battery devices
  • Services

    • Following services are available for use with automation
    • Service boost_heating : Provides ability to boost the heating in a particular room
    • Service get_schedule/set_schedule: Provides ability to get/set schedules for rooms, hot water and smartplugs
    • Service set_smartplug_mode: Provides ability to set the mode of a specific smartplug. It can be set to either manual or auto , the latter means it follows any schedule set.
      • NB : Setting the smartplug "state" is done by setting the state of the switch component.
    • Service set_hotwater_mode: Provides ability to turn a hot water on/off or auto. Valid values include on, off or auto Setting it to auto makes it follow the current schedule
  • Support for Heathubs with No Hot Water Control

  • Fully async operation

Sample Images

Code Installation

We highly recommend using HACS Home Assistant Community Store, for more information on how to install HACS please see their documentation website at https://hacs.xyz/

Manual Code Installation

This method is best used when you want to play with the "latest and greatest" from the repository. Moving forward (post 1.9) , the github repository will contain two primary branches, master and dev. Master is the latest released, and hopefully most stable branch, whereas dev is the branch that we're currently working on.

  1. On your server clone the github repository into a suitable directory using the following command git clone https://github.com/asantaga/wiserHomeAssistantPlatform.git

  2. Switch to either the master or dev branch as per your requirements. e.g. git checkout master or git checkout dev

  3. Create a custom_components directory within your Home Assistant directory config directory

  4. Within the custom components directory copy the wiser folder, from the directory where you github cloned the wiser component, to your installations custom components directory.

Configuration

Find your HeatHub Secret key

Reference https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system

Before you can use the component you need to find the HeatHub secret key, this involves a couple of steps.

  1. Press the setup button on your HeatHub, the light will start flashing

  2. Look for the Wi-Fi network (SSID) called ‘WiserHeatXXX’ where XXX is random

  3. Connect to the network from a Windows/Linux/Mac machine

  4. Execute the following REST call

    • For Windows use Invoke-RestMethod -Method Get -UseBasicParsing -Uri http://192.168.8.1/secret/
    • For Linux (or Windows WSL) use curl http://192.168.8.1/secret

    This will return a string which will contain your system secret, obviously dont share this...

  5. Press the setup button on the HeatHub again and it will go back to normal operations

  6. Copy the secret and save it somewhere.

  7. Find Your HEATHUB IP Using your router, or some other method, identify the IP address of your HeatHub. On many routers it usually identifies itself as the something like WiserHeatXXXXXX

    We recommend you configure your router so that it assigns a FIXED IP address to the Wiser HeatHub. Whilst it "shouldnt" change IP address some people have noticed it has/does, perhaps when wiser issue a firmware update. Most routers allow you to reserve an IP address to a MAC address, this setting is often (like on Virgin Media Routers) done in the DHCP section.

  8. Configure using Home Assistant Configuration Assistant "Set up new integration"

  9. This will then show the config screen for Wiser Heat Hub, now configure it appropriately.

    minimum is the bottom minimum temperature to be recorded, the default is -5

    boost_temp is the delta temperature the radiator should be set to when boosted, default is 2

    boost_time is the time (in seconds) for which a boost should be active for, default is 30mins

  10. When added, you should something like see this in integrations

  11. Clicking on it should show you this and you can now add the devices to your Home Assistant Lovelace UI as you please

  12. Alternatively you can also configure the integration using YAML. Here is a sample config, replace the HEATHUB AND PASSWORD appropriately.

wiser:
  host: <ENTER YOUR HEATHUB IP HERE>
  password: <ENTER YOUR SECRET TOKEN, OBTAINED FROM STEP THREE HERE>
  scan_interval: 300
  minimum: -5
  boost_temp: 2
  boost_time: 30

Managing Schedules with Home Assistant

Getting a Schedule

Use the service wiser.get_schedule

This will require you to provide the entity ID of the wiser device and a file to copy this schedule to. It is recommended to create a directory in your config directory to store these.
See below for information on selecting the correct entity.

Note : If you are running HA within a docker container then the directory will be absolute to the container, if you have mapped the config directory to a local directory then all is good but the directory name given to the service must be a docker container address.

E.g. if you specify the filename as /config/schedule.yaml then get_schedule writes the file into the directory within the container. Providing you have mapped the config directory (using the -v or volumes: in docker-compose) then you can read this from a host directory (e.g. /home/haconfig.

Setting a Schedule

Use the service wiser.set_schedule

This will require you to provide the entity ID of the wiser device and a file containing the schedule.
See below for information on selecting the correct entity.

A good place to start is to get a schedule from a device and see the file structure. You can add times and temps within each day as you see fit. As file created using the wiser.get_schedule service looks like below:

Name: Dining Room
Description: Schedule for Dining Room
Type: Heating
Monday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Tuesday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Wednesday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Thursday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Friday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Saturday:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20
  - Time: 23:00
    Temp: 15
Sunday:
  - Time: 08:30
    Temp: 21

If you are creating your own file (or editing one you have copied from a wiser device), you can use the 2 special day names of 'Weekdays' and 'Weekends' instead of listing individual days.

e.g.

Name: Test Room
Description: Schedule for Test Room
Type: Heating
Weekdays:
  - Time: 07:30
    Temp: 21.5
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Weekends:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20.5
  - Time: 23:00
    Temp: 15

You can also use a mixture of these special day names and normal days to override a specific day (providing the specific days names are below these special ones!).

Name: Test Room
Description: Schedule for Test Room
Type: Heating
Weekdays:
  - Time: 07:30
    Temp: 21.5
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Weekends:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20.5
  - Time: 23:00
    Temp: 15
Tuesday:
  - Time: 08:00
    Temp: 21.5
  - Time: 20:00
    Temp: 18.0

For hotwater and smartplugs (to make reading the schedule file easier) you can use time and state keys like below. Note for both hot water and smartplugs, the Type parameter must be set to HotWater in your file.

Name: Hot Water
Description: Schedule for Hot Water
Type: HotWater
Weekdays:
  - Time: 06:30
    State: On
  - Time: 10:30
    State: Off
  - Time: 16:30
    State: On
  - Time: 22:30
    State: Off
Weekends:
  - Time: 06:30
    State: On
  - Time: 10:30
    State: Off
  - Time: 16:30
    State: On
  - Time: 22:30
    State: Off
Tuesday:
  - Time: 08:00
    State: On
  - Time: 20:00
    State: Off

Copying a Schedule

Use the service wiser.copy_schedule

This will require you to provide an entity ID of the device to copy from and the entity ID of the device to copy to and will copy the schedule between them.

What Entity Should I Choose?

  • Room heating schedules - use the climate entity of the room. eg climate.lounge
  • Hot water on/off schedule - use the sensor.hotwater entity
  • Smartplug on/off schedules - use the switch entity of the smart plug eg switch.smartplug1

Network Topology

With V1.9 for TRVs you can now determine if the TRV is connected to the heathub directly or via a smartplug repeater.

Each TRV sensor now has three special network related attributes

Attribute Meaning
node_id The node Id of the device
parent_node_id If this value is zero (0) then the device is connected direct to the heathub. A non zero value points to the smartplug/repeater for which this device is being routed through. Smartplugs always have this value as zero
hub_route Calculated convenience attribute which the evaluates to either direct or repeater based on if the device is connected direct or not to the heathub

Battery Values

For each battery driven device sensor the following attributes are available battery_voltage, battery_percentage and battery_level. From conversations with Wiser technical support they recommend changing the batteries for any TRV when it reaches battery voltage of "26" or OneThird battery level. Given that RoomStats do not need to drive a valve, their battery levels can be lower.

An obvious ideal candidate for a Home Assistant automation to remind you to change the batteries :-)

Note : If you power cycle your HomeHub, with more than a minute or so when it is off, we've noticed that the devices will not have the battery info for a short period of time (maybe 30mins to 1hr) , just wait and the battery values will appear.

Community

I've been totally amazed at the community which has sprung up contributing and supporting this component. The recipes following page contains some community contributed ideas / YAML files for Home Assistant.

Checkout the community thread on https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965 for loads of input, comment and participate in our community

Run, Play

Run, Play and let us know if there are any bugs, enhancements etc via the github issues system

Special thanks for many contributors to this project!

Angelo and Team

Contributors

Special thanks to all the contributors to this project. Special shout to

  • @msp1974 : Animated graphics showing which rooms are being heated, Display Presets, support boost (PR38), Async Mode rewrite and loads more! Mark is now part of the core team helping me out whilst I deal with screaming babies wanting food :-)
  • @angrycamel : Home/Away Sensor
  • @jchasey : Doc changes and support for custom component updater
  • @sjtbham : Debugging
  • @djbanks : Home/Away switch (v 1.31)
  • @nofuse : Constantly helping people out on the community thread

Moving forward (post 1.9) there will be two primary branches, master and dev . Master will be the primary "production" branch and "dev" will be the branch used for development. Other branches will likely exist where we build code into and then merge into dev, which in turn gets merged into master when all is good and dandy.

Change log

  • 2.5

    • Added water scheduling support
    • Fixed wiserhub doesnt update on server start
    • Upgraded to wiserapi 1.0.10
    • Added some new recipies to docs
  • 2.4

    • Fixed deprecated devices
    • code changes to support publishing as a native HA component
    • Fixed issues with older firmware
    • Fixed issues with hubs with no rooms (new installs)
    • Added ability to manage schedules for all device types - rooms, hot water, smart plugs
    • Implemented new attribute on climate entities to show remaining boost duration
    • Improved handling of hub connection errors at startup
    • Fixed issue where component does not request update from wiser hub at startup
  • 2.3

    • Fix for error given by latest HA highlighting that I/O Detected in event loop (issue 97)[https://github.com/asantaga/wiserHomeAssistantPlatform/issues/97]
    • Fix for climate graph not showing true state (issue 98)[https://github.com/asantaga/wiserHomeAssistantPlatform/issues/98]
    • Fixed heating boost (issue 101)[https://github.com/asantaga/wiserHomeAssistantPlatform/issues/101]
  • 2.2

    • Battery voltage across sensor types now consistent (1 decimal place no v)
    • Implemented what we think is correct battery percentages depending on device (itrv or roomstat)
    • Regression of itrv sensors not having battery voltage fixed
  • 2.1

    • Minor bug fixes and documentation fixes
  • 2.0

    • Now supports Home Assistant Config Flow (credit @msp1974)
    • Fix/error for when there is no smartplug present, also error if smartplug exists but offline
    • Documented some community inspired (non obvious) recepies
    • Uptake of new wiser-heating-api (1.7.1)
  • 1.9

    • Component rewritten to use Async to ensure the component is more robust and HA friendly

    • Ability to control SmartPlugs

    • Zigbee Network info now available

    • Ability to control hotwater (using a service)

    • Ability to get/set schedule using services

    • Ability to set/get system settings , like auto mode, eco mode etc

    • and Many more

      BREAKING CHANGE : We no longer support the custom component updater, please use HACS instead

  • 1.8.1

    • Multiple fixes to timeouts, boost and upgrade to wiserapi 1.0.3
  • 1.7

    • Presets and now supports delta boosts (thanks @msp1974)
    • BREAKING CHANGE : boost temp is now a delta and not a specific value e.g.. now is 2C vs previously 20C
  • 1.6.1

    • Fixed setting temperature bugs
  • 1.6

    • Merged functionality where it now shows which rooms are being heated by an icon
  • 1.5.1

    • Minor bump to fix home/away issue and bring versions inline
  • 1.5

    • Now supports HACS
  • 1.4

  • 1.3.1

    • Merged djbanks Home/Away switch
  • 1.3

    • Added ability to set temperature
    • Added ability to set room mode (auto,boost,manual)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].