Climate problems, error during setup of zwave

Hello

I’ve these problems and i have no idea sometimes it works sometimes i get this:

16-11-08 18:31:14 homeassistant.components.climate: Error while setting up platform zwave
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 67, in setup_platform
    add_devices([ZWaveClimate(value, temp_unit)])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 95, in __init__
    self.update_properties()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 171, in update_properties
    self._target_temperature = int(self._current_temperature)
TypeError: int() argument must be a string or a number, not 'NoneType'

Do you have some configuration to post with this? Somewhere in your setup that you reference climate (other than its ocnfiguration setup)?

Sometimes, if you check the status of a sensor before it’s defined, you’ll get an error (you can test that in your template language to make sure the sensor exists first).

Config

zwave:
  usb_path: /dev/ttyUSB-ZStick-5G
  config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
  polling_interval: 40000

and automation

- alias: 'Set heat 21c at 07:00'
  trigger:
    platform: time
    after: "07:00:00"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.termostat_heating_1_2_1
        temperature: 21
        operation_mode: Heat

- alias: 'Set heat 16c at 22:30'
  trigger:
    platform: time
    after: "22:30:00"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.termostat_heating_1_2_1
        temperature: 16
        operation_mode: Heat

You had an error at 18:31:14

That didn’t correspond to a time when one of these automations triggered - did the error happen at startup? Or when you tried to set the heat via the HASS web interface? Or was it just random?

Just checking - the plugin uses “termostat” instead of “thermostat” when it creates entities? Or is that named derived from your OpenZwave settings?

Hello

happens at startup:

16-11-09 14:02:37 homeassistant.components.climate: Error while setting up platform zwave
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 67, in setup_platform
    add_devices([ZWaveClimate(value, temp_unit)])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 95, in __init__
    self.update_properties()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 171, in update_properties
    self._target_temperature = int(self._current_temperature)
TypeError: int() argument must be a string or a number, not 'NoneType'

That appears to be a problem with the thermostat’s set point. I don’t have one of these, so I’m not sure how they behave, but do you have a way to configure a set point within HASS?

Hey

Im new here, the config works sometimes, but what do you mean with set point? set temperature?

Right. The component calls it “setpoint”, but I imagine that means the target temperature. That error you’re getting happens when COMMAND_CLASS_THERMOSTAT_SETPOINT returns a zero.

Hello

Just tested it in the openzwave control panel works fine there, but what can do about it?

Also

The funny thing now it works in HA, and it will continue to do that for some time, and then will receive the same error.

Might be an issue with Zwave thermostats.

Okay after a reboot i get,

16-11-11 17:09:44 homeassistant.components.climate: Error while setting up platform zwave
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 67, in setup_platform
    add_devices([ZWaveClimate(value, temp_unit)])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 95, in __init__
    self.update_properties()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/climate/zwave.py", line 171, in update_properties
    self._target_temperature = int(self._current_temperature)
TypeError: int() argument must be a string or a number, not 'NoneType'

if i start openzwave control panel and Initialize it, and then shut it down and start ha it works strange?

Could you provide the node entry in zwcfg_[home_id].xml for the device?

Is this what your looking for?

<Node id="2" name="" location="" basic="4" generic="8" specific="4" type="Setpoint Thermostat" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Probe">
        <Manufacturer id="0" name="">
            <Product type="0" id="0" name="" />
        </Manufacturer>
        <CommandClasses>
            <CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" mapping="67">
                <Instance index="1" />
            </CommandClass>
            <CommandClass id="67" name="COMMAND_CLASS_THERMOSTAT_SETPOINT" version="1" request_flags="2" base="1">
                <Instance index="1" />
            </CommandClass>
            <CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="2">
                <Instance index="1" />
            </CommandClass>
            <CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="1" request_flags="2">
                <Instance index="1" />
                <Value type="int" genre="system" instance="1" index="0" label="Wake-up Interval" units="Seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3600" />
            </CommandClass>
            <CommandClass id="134" name="COMMAND_CLASS_VERSION" version="1" request_flags="2">
                <Instance index="1" />
                <Value type="string" genre="system" instance="1" index="0" label="Library Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="Unknown" />
                <Value type="string" genre="system" instance="1" index="1" label="Protocol Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="Unknown" />
                <Value type="string" genre="system" instance="1" index="2" label="Application Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="Unknown" />
            </CommandClass>
            <CommandClass id="143" name="COMMAND_CLASS_MULTI_CMD" version="1">
                <Instance index="1" />
            </CommandClass><a class="attachment" href="//community-assets.home-assistant.io/original/2X/f/fdddf5b037198a4732c76b9fe55d5e7b82161018.xml">zwcfg_0xe51c2d37.xml</a> (5.9 KB)

        </CommandClasses>
    </Node>

Ok. Your node is not fully initialized to the zwave network.
Here is what you should do:
Stop Hass.
Open up ozwcp, and wait until Node status(rightmost text in the node list) for the node have Ready as text. If it is stuck at Probe og Sleeping, wake the device as per user manual. Repeat this until Status is Ready.
Then hit the save button on top in ozwcp.
Close connection and exit ozwcp and copy the zwcfg_[home_id].xml from the ozwcp directory into hass’s config dir.
Start Hass.

Hey Turbo

Woke it up like 40 times, the same with the Smoke Alarm??

Hey

I tried to copy the file over it works for now, but what if i reboot my pi?

That image shows that things are now OK. If you can see all config parameters node is completely initialized.
You can safely reboot the pi now with the new file in place. But I would recommend that HASS is shut down first, because that file is saved on each shutdown of HASS too.

Really hope this works, i had some many problems with it :slight_smile: