Use homeseer with hass over rest

I have a zwave network at home with 8 qubino devices(switches/blinds control)/aeotec smartswich 6/aeotec multisensor 6 and polycontrol btz125 lock.

I started with homeseer as a test platform but it is seriously limited support for devices that I want to use, but it works stable and fast.
I have setup a secure inclusion with the correct network key so I can control the lock.
The network key is the same in homeseer as in homeassistant so I can control the lock and other devices.

So far so good.
The z-wave network is working fine with homeseer but not with homeassistant.
the problems I have:

  • updates manually set by the buttons on the zwave switches do not get reflected on the interface, so this means inconsistant states.
  • when I flip a switch on the gui of homeassistant it takes ages to change the status aka 30secs or more. I set the switch to on, then it goes off again and after a while the light goes on and the switch reflects that value.

For me this makes homeassistant as zwave controller unusable.

My idea was to use homeseer as z-wave controller and address it through homeseer json rest interface.

The ideal would be to build an interface to talk to homeseer and be able to control all the devices.
This will lead me to far at this moment as my program skill’s aren’t sufficient.

I would like to start with a simple rest call and see how that works, but i’m kinda stuck with the rest platform function.

getting the status

I can call the following: http://172.16.0.27/JSON?&request=getstatus&ref=200
this provides me the following json response:
> {
“Name”: “HomeSeer Devices”,
“Version”: “1.0”,
“Devices”: [{
“ref”: 200,
“name”: “Switch Binary”,
“location”: “Z-Wave”,
“location2”: “Node 12”,
“value”: 255,
“status”: “On”,
“device_type_string”: “Z-Wave Switch Binary”,
“last_change”: “/Date(1481133505276)/”,
“relationship”: 4,
“hide_from_view”: false,
“associated_devices”: [197],
“device_type”: {
“Device_API”: 4,
“Device_API_Description”: “Plug-In API”,
“Device_Type”: 0,
“Device_Type_Description”: “Plug-In Type 0”,
“Device_SubType”: 37,
“Device_SubType_Description”: “”
},
“device_image”: “”,
“UserNote”: “”,
“UserAccess”: “Any”,
“status_image”: “/images/HomeSeer/status/on.gif”
}]
}

I just don’t know how to extract data from it as it isn’t a simple key value array but the value that need is in the device section.(status and/or value)

setting the status

I can change the status sending the following post request with data:

{‘action’ : ‘controlbyvalue’, ‘deviceref’ : ‘200’, ‘value’ : ‘255’}

I need to figure out the body_on and body_off statements.

Help is much appreciated.

Here’s something that you can look at in the template dev tool. It’ll show you the path to the data you want. You should be able to work that into a value_template or whatever you need.

{% set json = {
“Name”: “HomeSeer Devices”,
“Version”: “1.0”,
“Devices”: [{
“ref”: 200,
“name”: “Switch Binary”,
“location”: “Z-Wave”,
“location2”: “Node 12”,
“value”: 255,
“status”: “On”,
“device_type_string”: “Z-Wave Switch Binary”,
“last_change”: “/Date(1481133505276)/”,
“relationship”: 4,
“hide_from_view”: false,
“associated_devices”: [197],
“device_type”: {
“Device_API”: 4,
“Device_API_Description”: “Plug-In API”,
“Device_Type”: 0,
“Device_Type_Description”: “Plug-In Type 0”,
“Device_SubType”: 37,
“Device_SubType_Description”: “”
},
“device_image”: “”,
“UserNote”: “”,
“UserAccess”: “Any”,
“status_image”: “/images/HomeSeer/status/on.gif”
}]
} %}
value={{ json.Devices[0].value }}
status={{ json.Devices[0].status }}