Hello from a HomeSeer HS4 Refugee

@slappy @kenm

So I’ve done some digging into the lock issue that @slappy has been having. The reason why it isn’t working properly is because pyhs3 expects certain responses from the HomeSeer API and these locks aren’t providing the expected data for a lock - I’m not sure if it’s because of the model of lock, or just a quirk with these specific devices, but it’s definitely on the HomeSeer side.

Every device in HomeSeer has associated “Control Pairs” that tell HomeSeer what value to send to the device to get it to operate the way you want. This data is required when making an API request from outside of HomeSeer; in a request you need to pass the value associated with the operation you want. Most devices have a pair of values for off and on. Locks are supposed to have a pair of values for lock and unlock. These are identified in the HomeSeer API response as follows for your lock that works:

{
		"ref": 563,
		"name": "Door Lock",
		"location": "Workshop",
		"location2": "Locks",
		"voice_command": "",
		"ControlPairs": [{
			"Do_Update": true,
			"SingleRangeEntry": true,
			"ControlButtonType": 0,
			"ControlButtonCustom": "",
			"CCIndex": 0,
			"Range": null,
			"Ref": 563,
			"Label": "Unlock",
			"ControlType": 5,
			"ControlLocation": {
				"Row": 0,
				"Column": 0,
				"ColumnSpan": 0
			},
			"ControlLoc_Row": 0,
			"ControlLoc_Column": 0,
			"ControlLoc_ColumnSpan": 0,
			"ControlUse": 19,
			"ControlValue": 0,
			"ControlString": "",
			"ControlStringList": null,
			"ControlStringSelected": null,
			"ControlFlag": false
		}, {
			"Do_Update": true,
			"SingleRangeEntry": true,
			"ControlButtonType": 0,
			"ControlButtonCustom": "",
			"CCIndex": 1,
			"Range": null,
			"Ref": 563,
			"Label": "Lock",
			"ControlType": 5,
			"ControlLocation": {
				"Row": 0,
				"Column": 0,
				"ColumnSpan": 0
			},
			"ControlLoc_Row": 0,
			"ControlLoc_Column": 0,
			"ControlLoc_ColumnSpan": 0,
			"ControlUse": 18,
			"ControlValue": 255,
			"ControlString": "",
			"ControlStringList": null,
			"ControlStringSelected": null,
			"ControlFlag": false
		}]
}

Drilling down into the response we can see that there is one control pair for ControlUse 18 (which corresponds to “lock” in the HS API documentation), with a ControlValue of 255, and one for ControlUse 19 (corresponding to “unlock”) with ControlValue 0. pyhs3 reads this on the startup of HA, creates a device, and stores 255 as the lock value and 0 as the unlock value. When you toggle the lock in HA, pysh3 makes an API request to HomeSeer and passes the appropriate value depending on the operation requested.

Here’s the control data for the locks that don’t work:

{
		"ref": 366,
		"name": "Door Lock",
		"location": "Detached Movie Room",
		"location2": "Locks",
		"voice_command": "",
		"ControlPairs": [{
			"Do_Update": true,
			"SingleRangeEntry": true,
			"ControlButtonType": 0,
			"ControlButtonCustom": "",
			"CCIndex": 0,
			"Range": null,
			"Ref": 366,
			"Label": "Unlock",
			"ControlType": 5,
			"ControlLocation": {
				"Row": 0,
				"Column": 0,
				"ColumnSpan": 0
			},
			"ControlLoc_Row": 0,
			"ControlLoc_Column": 0,
			"ControlLoc_ColumnSpan": 0,
			"ControlUse": 0,
			"ControlValue": 0,
			"ControlString": "",
			"ControlStringList": null,
			"ControlStringSelected": null,
			"ControlFlag": false
		}, {
			"Do_Update": true,
			"SingleRangeEntry": true,
			"ControlButtonType": 0,
			"ControlButtonCustom": "",
			"CCIndex": 1,
			"Range": null,
			"Ref": 366,
			"Label": "Lock",
			"ControlType": 5,
			"ControlLocation": {
				"Row": 0,
				"Column": 0,
				"ColumnSpan": 0
			},
			"ControlLoc_Row": 0,
			"ControlLoc_Column": 0,
			"ControlLoc_ColumnSpan": 0,
			"ControlUse": 0,
			"ControlValue": 255,
			"ControlString": "",
			"ControlStringList": null,
			"ControlStringSelected": null,
			"ControlFlag": false
		}]
}

You can see that the ControlUse for both pairs is 0, with different values of 0 and 255! ControlUse 0 is defined in the HSAPI documentation as “Not_Specified” which is unhelpful. However, the “Label” for each control pair is helpful here - “Lock” and “Unlock”.

I’ve updated pyhs3 to 0.12 including this fix, and bumped the custom component also (to 0.7). Please delete and reinstall the custom component and you should be good to go!

Hi im running hs4 as bridge for Hass ising custom hs3 integration, All Works great, but Every morning when i look at my sensors in Hass, the connection has stopped working sometime mid night. A reboot of Hass fix the problem but next morning same again. What can be wrong?? GREAT Work on the integration by the way :raised_hand_with_fingers_splayed::raised_hand_with_fingers_splayed:

I just updated the component and all is working perfectly on all locks! It’s really strange these are all the same Schlage part number… I wonder if they have different firmware or HS support changed as I purchased them a few months apart and the initially working lock was probably the last/most recent one I bought. This was one of my last “blockers” to start shifting my UI/UX to HA, and slowly start shifting over automations and make HS3 essentially my ZWave controller.

Nice work on this interface! There are a couple more ZWave devices that I’d love to see supported (the lights on the HS-WD200+ switch and the HSM-200 multi-sensor) and I’d be happy to help debug/test these and any other integrations.

Thanks again for your help and fantastic work!

No worries! Glad to hear it works. I have your device info now from the email you sent so I can take a look at the other devices. What is the ref # of the HSM-200?

Device Ref is 1012 for the root device. There are 4 children:

  1. Motion sensor (Type Z-Wave Notification)
  2. Temperature sensor (Type Z-Wave Sensor Multilevel)
  3. Light Sensor that returns a value in Lux (Type Z-Wave Sensor Multilevel)
  4. A multicolor notification light (Type Z-Wave Switch Color)

Thanks!

Mark,
I came across this thread and briefly tried to get your homeseer github info setup. I have HS4 and want to make that my zwave controller as i am sick of home assistant breaking my zwave light switches. All Zooz switches.

I need to work on it more but could not get it to work yesterday. I put the ip address of where homeseer is installed (which is weird, it is running on x.x.200.20 but when I load up the gui the address on homeseer shows x.x.50.something. I think it responds to both. does the github stuff work with HS4?

Hi @bphillips330,

Welcome. Yes, the custom component works with HS4. Regarding your ip address questions. Does your HS machine have more than one network port? In HS4, go to Setup->About, and look for Lan IP. That’s what you want to use for the component configuration.

@Slappy @kenm Can you test something for me?

Please checkout the “new-service” branch on GitHub.

When you restart HA, there should be a new Home Assistant service homeseer.control_device_by_value, which takes two arguments, “ref” and “value”, and so allows you to specify a HomeSeer ref and the value that ref should be set to.

@Slappy your Z-Wave Switch Color can’t be represented in HA directly, but this should allow you to change the colours via an automation (e.g. value 1 is red, value 2 is green, value 3 is blue, value 4 is magenta, value 5 is yellow, value 6 is cyan, value 7 is white).

Looks like it’s working on the motion sensor, of course the leak detector battery is bad so I can’t test it. Also I forgot it’s not picking up the smoke detector

I looked in setup. There is no about. I am running hs4 on Windows 10. Only thing I see on there is port 80 for network info. I looked through setup network.

@bphillips330,

Apologies. My memory sucks. Try Tools->About.

Ken

Actually I figured it out. In all my expertise, i missed the obvious… wrong user and pass… duh. lol Ok now that I have that resolved.

I see 2 or 3 of my lights showing up in Home Assistant as Homeseer entities. I read the part about the central scene. I never did get all of that in homeseer when I set it up. Learned more as I played with Home assistant. I have a bunch of zooz lightswitches. I think in the central scene. What is best way to call of of those from HA? Should I not put them in central scene in Homeseer?

@Slappy the multi sensor should be working now in the add-multilevel-sensor GitHub branch. Just looking for some testing before I merge it. Can you test?

I must confess I don’t actually know how to load a branch from github on top of my existing install.

No problem! Very easy. Stop Home Assistant, cd into your custom_components/homeseer directory, then do:

git fetch
git pull
git checkout add-multilevel-sensor

Then start Home Assistant.

I’m still pretty new to Home Assistant so sorry if this is the wrong place to ask.

I followed the instructions in the README and HA is giving me a couple of errors.

7:31:13 PM – helpers/entity.py (WARNING) - message first occurred at 7:27:33 PM and shows up 2 times

Error doing job: Unclosed connection

7:26:38 PM – runner.py (ERROR)

Error during setup of component homeseer

7:26:32 PM – custom_components/homeseer/__init__.py (ERROR)

I’m not sure how to fix this issue.

Hi @Ironzey,

Can you post the homeseer section of your configuration.yaml file? Don’t forget to xxx out your HS password.

Also, scroll up and find the post regarding enabling debug logging of the component. Send me a PM and I’ll send you an email address to send your logfile.

Ken

@kenm

thanks for the help…

Here is my Homeseer YAML config

homeseer:
  host:  192.168.1.10
  namespace: homeseer
  http_port: 80
  ascii_port: 11000
  username: MYUSERNAME
  password: 😁😁😁
  name_template: '{{ device.name }}'
  allow_events: True

I’m working of enabling debug logging…

EDIT, Does this requires pyhs3 also? I don’t have it installed and I can’t figure out how to install it.

Hi all,
I have been using this custom component for a little while now and it has been working pretty good. While doing some configuration work on my HS3 system I started wondering if now it would make more sense for me to switch my remaining HS3 devices (all -z-wave) over to HA and shut down the HS3 system. I didn’t do this before as I wanted to evaluate HA and read that it does not do Z-Wave well. Has this changed? Also has anyone made the switch? I have a Z-Net and I think I remember reading that I could not use that with HA, however if I switched I would most likely get a USB based Z-wave stick. Any insight to folks here that may have made the switch?

EDIT: also wanted to say that my Z-wave switches as the Homeseer HS-WD200+ and HS-WS200+ and I use scenes and the LED status lights on the dimmers. I read that this can be accomplished with HA but cannot find a thread that shows how.

I am not a ZWAVE expert by any stretch. But, from my own experience. I got the AEOTEC which comes recommended by a number of folks on the threads. I installed ZWAVE2MQTT in a Docker container running on a remote PI (better location for coverage). I had a real hard time getting devices to pair until I added an extension cable to the stick. Like night and day. Just a tip that I never picked up in any of the threads.