Drayton Wiser Home Assistant Integration

A quick reinstall seems to have fixed, I thought I’d already tried that but its working without errors now.

It’s a great integration :slight_smile:

Thanks

Awesome, thanks for letting me know

This is working great now, but just wondered if I should be seeing a value for the Battery value as they all show zero. I’d like to use this to be able to alert on low battery.

I’ll check tonight, I think I get the value from the payload so if its zero there… its zero… but it may be a bug… we have those too :slight_smile:

Thanks :slight_smile:

Hi @Angelo_Santagata Im still having issues running up the wiser integration via hacs. Can you offer any advise (Im a bit of a noob and cant see where Im going wrong) Thanks in advance
heres my configuration.yaml


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
 - platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

wiser:
 host: 192.168.0.13
 password: !secret wiser_passkey
 scan_interval: 300
 minimum: -5
 boost_temp: 2
 boost_time: 30

 # Example configuration.yaml entry
bmw_connected_drive:
 name:
  username: !secret bmw_un
  password: !secret bmw_pw
  region: rest_of_world
   
   # Example configuration.yaml entry
sensor:
 - platform: bitcoin
   display_options:
     - exchangerate
     - trade_volume_btc
   currency: GBP
   

I get these errors

Error while setting up wiser platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/wiser/sensor.py", line 27, in setup_platform
    hub_data = handler.get_hub_data()
  File "/config/custom_components/wiser/__init__.py", line 87, in get_hub_data
    self.wiserHubInstance = wiserHub.wiserHub(self.ip, self.secret)
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 50, in __init__
    self.refreshData()          # Issue first refresh in init
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 90, in refreshData
    self.hubIP), headers=self.headers, timeout=TIMEOUT).json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Log Details (ERROR)
Sat Feb 08 2020 21:09:44 GMT+0000 (Greenwich Mean Time)
Error while setting up wiser platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/wiser/switch.py", line 17, in setup_platform
    entities.append(WiserAwaySwitch(handler))
  File "/config/custom_components/wiser/switch.py", line 34, in __init__
    self.overrideType = self.handler.get_hub_data().getSystem(). \
  File "/config/custom_components/wiser/__init__.py", line 87, in get_hub_data
    self.wiserHubInstance = wiserHub.wiserHub(self.ip, self.secret)
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 50, in __init__
    self.refreshData()          # Issue first refresh in init
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 90, in refreshData
    self.hubIP), headers=self.headers, timeout=TIMEOUT).json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Log Details (ERROR)
Sat Feb 08 2020 21:09:44 GMT+0000 (Greenwich Mean Time)
Error while setting up wiser platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/wiser/climate.py", line 56, in setup_platform
    handler.update()
  File "/config/custom_components/wiser/__init__.py", line 106, in update
    self.wiserHubInstance = wiserHub.wiserHub(self.ip, self.secret)
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 50, in __init__
    self.refreshData()          # Issue first refresh in init
  File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 90, in refreshData
    self.hubIP), headers=self.headers, timeout=TIMEOUT).json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

hey sorry not responded earlier. I just noticed this…

mmm not sure. are you sure 192.168.0.13 is your wiser hub? Have you been able to query data using curl or postman?

Also are you using the latest master or the prerelease R1.9Dev branch?

All,

FYI, we’re working on releasing R1.9 soon, the code can be found in the R1.9Dev branch, and we’d love all to test it out…

If you already have the integration installed using HACS all you need to do is

a) git clone https://github.com/asantaga/wiserHomeAssistantPlatform.git
b) git checkout R1.9DEV
c) manually replace the files in the custom_components/wiser directory

thanks, should be out soon anyway, just fixing a few niggles…

Hey all, just made 1.9 a HACS release with a nice and lengthy readme!.

Hope all is good

2.0 We’ll focus on two things
a) Including the component into Home Assistant as a native component
b) Configuration via the new device config UI

1 Like

Hi,

Just updated to R1.9 and this switch seems to have disappeared.

Switch platforms - Allows the switching of various system switches including EcoMode, ComfortMode, AwayMode, Valve Protection and AwayModeAffectsWater

It does not show up in Dev/States.
Anybody else have this or am I missing something?

Hey Duke,

I just did a clean install and the switches are all there for me… Are there any errors in the logs?
Also check for unused entities it might be that we changed some of the entity Ids/names during the 1.9 release…

From my system

and its definitively 1.9 because I can see the NodeId/ParentNodeId in the TRVs…

LMK

Had same issue with the missing switches, not all files had downloaded and one was truncated. Fix was to just reinstall and restart.

Hi Angelo,

I have re-installed twice now as Fulch suggested but still do not have the switch.
I have an error:

Mon Feb 24 2020 12:59:14 GMT+0000 (Greenwich Mean Time) Error while setting up wiser platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/wiser/switch.py", line 45, in async_setup_platform WiserSmartPlug(hass, data, plug.get("id"), plug.get("Name")) for plug in data.wiserhub.getSmartPlugs() TypeError: 'NoneType' object is not iterable

Any help appreciated.
Thanks

I know whats wrong. I bet u dont have any smart plugs right?

HI Angelo,

BTW, I am running Hass.io (or I believe it is called Home Assistant now - confusing) on a raspberry Pi 4 64gb with 2 gb of RAM if that helps with the time out issue in the error message.

I never had this error before R1.9

Thanks

Hi Angelo,

Correct - I don’t!

Drat i was toying with making r1.9 hacs a prerelease. Ill fix it later and send u a patch file.

It will be a one line fix.

OK thanks

If it helps I will buy a smartplug :slight_smile:

1 Like

Well, it would help :slight_smile: but not needed

Ive patched it in the dev branch, can you navigate to the custom_components/wiser directory and replace the switch.py file with this one

https://raw.githubusercontent.com/asantaga/wiserHomeAssistantPlatform/dev/custom_components/wiser/switch.py
i.e.

cd custom_components/wiser
wget https://raw.githubusercontent.com/asantaga/wiserHomeAssistantPlatform/dev/custom_components/wiser/switch.py

Let me know if it fixes it and i’ll merge to master

Hi,

Yep - that did it.

All the switches are there now :slight_smile:

Thanks

1 Like