Hello from a HomeSeer HS4 Refugee

Hi Taylor,

No, that code has not changed. A central scene controller in HS3 will create and fire HA events.

ken,

Do you know if the pyhs3 solution, rebconnects after it lost connection to HS3. Since i need to reboot hs3 a lot, i see sometimes that i cant control my hs3 based devices anymore, until i restart HA.

Bart

Hi Bart,

There’s two parts to pyhs3, the ASCII listener and the JSON request handler.

The ASCII listener periodically sends a “vr” command to the ASCII interface and expects a response. If no response is received, the connection is closed, which starts a reconnect loop with 10 second retries.

For device control, there’s no persistent connection, since the JSON interface is used for control. If control is failing, you should see an ERROR message in the log. Either “Timeout while requesting HomeSeer data from host:port” or HomeSeer HTTP Request error: <error_message>"

If you aren’t seeing any ERROR messages, we can take the next steps and enable DEBUG logging for pyhs3 and the component.

I will report back once it will happen again

Hello all - I am also becoming an HS refugee. Do I need to apply? :slight_smile: - So, I started with HS3 last year - I chose HS because of the $$ and ease of setup. I am an IT professional but I only play a developer in C or D movies - My forte is Powershell as I am an Exchange/EXO admin. Anyway I too have a Z-wave Plus controller and it interesting to read about how it works - I’m not sure I want to deal with ser2net challenge. I see @SentryBot2281is using the ZOOZ stick - How has that been working for you? Also, I am not to familiar with MQTT - I have mostly HS-WD200* switches and a couple HS fan switches - I also love my ‘sensitive’ contacts - anyway - I will follow this thread closely - I have removed all my automation from my apartment (yes I replaced all the switches in the apartment - who wouldn’t) as I am moving - so basically I am starting over - Thanks to @kenm for starting this thread .

Welcome to the group and to HA. I’d recommend sticking with HS3 for ZWave and use the HS3 Custom Component in HA. In my experience, both the OpenZwave Beta and Zwave2MQTT are not as stable as HS3. Last week, I switched 45 ZWave devices back to HS3 on the ZNET controller. I had all these devices on HA using an Aeotec Z-Stick Gen 5 controller on Zwave2MQTT. The switch back to HS3 for ZWave has made it a lot more stable. For everything else, HA is awesome.

Hi @kenm your pyhs3 solution has been running well for over a month now and I have converted all my non z-wave devices to HA now. I am having an issue on the HS3 side with one of my switches and I may have to remove and re-add it back to HS3. I was wondering what will happen on the HA side with the old entity for this switch if I have to do that. Will I need to remove it manually or will this happen automatically?

Hi Andy,

Glad to hear it’s working well for you. Just want to clarify that I’m just a cheerleader and minor contributor to this solution. @marthocoo is the developer and creative mind behind it.

As for your question, each entity is assigned a unique ID which is a combination of the namespace parameter and the device reference from HS. Since removing and re-adding a Z-Wave device will create a new dev ref in HS, the old entity in HA will be abandoned and a new one will be created. You’ll have to delete the abandoned entity manually and also fix up any automations that were using the old entity.

Andy: just to jump in on this, as @kenm said when you remove and re-add the device to HS3 it will be assigned a new device ref. A new entity will be created in Home Assistant after you restart HA once the device is added to HS3.

If you delete the old entity in Home Assistant, you can rename the new entity and entity id to the same name and id as the old one (through the HA web interface) and then you won’t need to adjust any automations (as they will still reference the entity id).

Thanks Ken and Mark. I was able to delete the old switch from HS and remove it from HA. I then added the switch back to HS with the same name and the entity was automatically created with the same name as the previous one so everything is working fine!

I’ve just jumped across from HS4 into HA and am loving the integrations nad slicker front-end.
I’ve managed to get the HS3 custom_component up and running and it adds most of the entities, but always gives me an error when setting up the platform for lights/switches. I’m not too sure what it means, but hopefully someone here can point me in the right direction to fix. The error message is:

Error while setting up homeseer platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 192, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 474, in _async_add_entity
    entity.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 305, in _async_write_ha_state
    sstate = self.state
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 595, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/config/custom_components/homeseer/light.py", line 80, in is_on
    return self._device.is_on
  File "/usr/local/lib/python3.8/site-packages/pyhs3/zwave.py", line 119, in is_on
    return self.value > self._off_value
TypeError: '>' not supported between instances of 'float' and 'NoneType'

Hi @britkat,

Welcome to the fun. I haven’t tested this with HS4 yet, so not sure what may or may not be working. Since I don’t have an instance of HS4 running, I’m not going to be able to debug it directly. If you put the following into your configuration.yaml file and restart HA, you should get a lot of detailed debug info.

logger:
  default: info
  logs:
    homeassistant.core: debug
    asyncio: debug
    custom_components.homeseer: debug
    pyhs3: debug

I’m not sure how well this forum supports attachments but send me a PM and I"ll give you an email address so you can send me the logfile.

Ken

Ken, thanks, it failed in the same way when I spun up an Hs3 instance, so might be something specific in my setup.
Should the component add devices, or just entities?
I’ll PM and send across the logs

Hi @britkat,

The component only creates entities.

Can you confirm what version of HS3 you are running?

The reason I ask is because here’s what the response header looks like for me with HS3:

“Name”:“HomeSeer Devices”,“Version”:“1.0”,“Devices”:

While your log shows: {“Name”:“HomeSeer Devices”,“Version”:“1.1”,“TempFormatF”:false,“Devices”:

I’m running HS3 3.0.0.548

Ken

I’m running HS4 Standard Edition 4.1.5.0 (Linux), but it threw the same error on 3.0.0.548

Please capture a debug log while connected to HS3 and email it to me.

Since I have HS3 runnning I’ll try and reproduce it. Also, what version of HA are you running and in what environment, venv or supervised?

Thanks,
Ken

I’m getting the following error:

Invalid config

The following integrations and platforms could not be set up:

  • homeseer.scene

Please check your config.

All I did was change False to True in allow_events:. Everything else seems to be working OK. This was actually working before, but I changed it to False because I didn’t want all the event at that time. However, I’ve also changed a lot since then, such as move to an SSD drive on my pi and move HS3 into a docker on a separate VM on my Proxmox system.

Also getting this in the log:

ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform homeseer.scene: Platform not found (No module named ‘custom_components.homeseer.scene’).

Unfortunately, I don’t have an HA instance running and it will be the weekend before I can get to it. A power outage took out the HW and I won’t have a new Pi until tomorrow.

In the meantime, scroll up a bit to find the settings, add the debug logging settings to your configuration, and restart HA. Send me a PM and I’ll give you an email address so you can send me the log.

Also, what version of HA are you running?

Ken

@zippy15 Hi Les,

I’ve tested the component with 0.113.3 through 0.114.4 and I can’t reproduce this error. Well, that’s not exactly true. I cheated and looked at the core code that generates the message and I can get the same error by deleting the custom_components/homeseer/scene.py module file.

Can you check that file to make sure it’s present, not corrupted, and has reasonable permissions?

Ken

@britkat Hi Mark,

Unfortunately, I’m not seeing anything in your log file that would cause your failure. I’m going to need to put some additional debug statements into pyhs3 so we can figure out exactly what HS device is causing the exception to be thrown.

Are you running HA in a virtual environment or are you running supervised in Docker? It makes a difference as to how I can deliver the debug library to you.

Ken