Neo Coolcam PIR

Though it does have the name in the info bit:

old_entity_id: binary_sensor.neo_coolcam_battery_powered_pir_sensor_sensor_9_0
new_entity_id: binary_sensor.neo_coolcam_battery_powered_pir_sensor_sensor
friendly_name: Neo CoolCam Battery Powered PIR Sensor Sensor

Donā€™t edit the Z-wave config, use the entity register instead.

OK so to rename sensors thatā€™s the place to use?

Correct. That way you donā€™t have to mess with friendly_name in your code or duplicates.

1 Like

Oh nice, thanks!

Actually Iā€™m still a bit confused :slight_smile:

I renamed the devices in entity_register, so now the sensor is called

sensor.neo_coolcam_pir_kitchen_luminance

However it still has attributes like this:

old_entity_id: sensor.neo_coolcam_battery_powered_pir_sensor_luminance_9_3
new_entity_id: sensor.neo_coolcam_battery_powered_pir_sensor_luminance
friendly_name: Neo CoolCam Battery Powered PIR Sensor Luminance 

Which still seem to be based on the original detection. I donā€™t use those old/new entity ids though, Iā€™m using the new one I set in entity_registry, and where is that friendly name coming from?

Iā€™ve just started using this PIR in Home Assistant (iā€™ve been using it ok in my Fibaro HC2 before) but Iā€™m getting false positives on the motions sensorā€¦

Anybody else experiencing false positives?

Where and how did you enter the command to get the battery_level?

I used the template engine, itā€™s available among the developer tools in HASS (the icon looks like a grey paper with <> on it). The resulting template can be used in sensors or automations at your will.

See my post above for an explanation.

{{ states. zwave.neo_coolcam_battery_powered_pir_sensor.attributes.battery_level }}

Thanks for the fast reply. Iā€™ve found it. But how can i add the value to the frontend?

The easiest way is probably to create a template sensor with the state string above as the value_template. Something like this :

sensor:
  - platform: template
    sensors:
      battery_pir:
        friendly_name: 'Battery level'
        value_template: "{{states. zwave.neo_coolcam_battery_powered_pir_sensor.attributes.battery_level |int }}"
        unit_of_measurement: '%'
1 Like

Thank you thatā€™s what i thougt and your example works!

I have 4 of these PIRs (oneā€™s still in the box. I also have Door/Window sensors from the same manufacturer) and like you, theyā€™re named like yours are. What I did was go into the Z-Wave configuration and renamed mine (rather than entity register) by modifying the node value:

From there, I simply use it like so:

#### PIR
  - platform: template
    sensors:
      neo_coolcam_battery_powered_pir_sensor_mudroom_motion:
        friendly_name: Motion
        value_template: >-
          {{ is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_mudroom', 'on') }}
        icon_template: >-
          {% if is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_mudroom', 'on') %}
            mdi:run-fast
          {% else %}
            mdi:walk
          {% endif %}
  - platform: template
    sensors:
      neo_coolcam_battery_powered_pir_sensor_livingroom_motion:
        friendly_name: Motion
        value_template: >-
          {{ is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_livingroom', 'on') }}
        icon_template: >-
          {% if is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_livingroom', 'on') %}
            mdi:run-fast
          {% else %}
            mdi:walk
          {% endif %}
  - platform: template
    sensors:
      neo_coolcam_battery_powered_pir_sensor_hallway_motion:
        friendly_name: Motion
        value_template: >-
          {{ is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_hallway', 'on') }}
        icon_template: >-
          {% if is_state('binary_sensor.neo_coolcam_battery_powered_pir_sensor_hallway', 'on') %}
            mdi:run-fast
          {% else %}
            mdi:walk
          {% endif %}

And one of my automations around it (I have several):

#### Motion
- alias: Motion Away Notify
  trigger:
    - platform: state
      entity_id: binary_sensor.neo_coolcam_battery_powered_pir_sensor_hallway
      from: 'off'
      to: 'on'
    - platform: state
      entity_id: binary_sensor.neo_coolcam_battery_powered_pir_sensor_mudroom
      from: 'off'
      to: 'on'
    - platform: state
      entity_id: binary_sensor.neo_coolcam_battery_powered_pir_sensor_livingroom
      from: 'off'
      to: 'on'
  condition:
    - condition: state
      entity_id: group.people
      state: 'off'
    - condition: and
      conditions:
        - condition: state
          entity_id: input_select.chris_status_dropdown
          state: 'Away'
        - condition: state
          entity_id: input_select.val_status_dropdown
          state: 'Away'
  action:
    - service: notify.fbmsg
      data_template:
         message: "{{ trigger.to_state.attributes.friendly_name }} motion detected at {{ now().strftime('%Y-%m-%d %H:%M') }}"
         target:
           - !secret fbmsg_chris
           - !secret fbmsg_val

Like @bonterra mentioned, I use a template for battery level:

#### PIR Battery
  - platform: template
    sensors:
      neo_coolcam_battery_powered_pir_sensor_mudroom_battery:
        friendly_name: 'Battery'
        unit_of_measurement: '%'
        entity_id: zwave.neo_coolcam_battery_powered_pir_sensor
        value_template: >-
          {% if states.zwave.neo_coolcam_battery_powered_pir_sensor %}
            {{ states.zwave.neo_coolcam_battery_powered_pir_sensor.attributes.battery_level }}
          {% else %}
            '0'
          {% endif %}

(repeated X# of time per PIR and Door/Window sensor.)

I could have done more work to make the naming more friendly but since I only had to do the automations once and Iā€™ve type neo_coolcam_battery_powered_pir_sensor (and variations) only about a billion times, Iā€™m OK with it :slight_smile:

ymmv

Wow this helpas a lot awesome. Can you also change the config values. I canā€™t get mine to work. Thereā€™s no drop down in the z-wave panel even if iā€™ve pressed the button on the pir three times.

I didnā€™t illustrate how I got there. For the sake of completeness:

  1. Configuration
  2. Z-Wave
  3. Near the top of the page, choose your Z-Wave node:

  1. From there, about half-way down, select the Node Value drop-down. I canā€™t remember what these sensors say by default but I changed all mine to match location (ie: Mudroom, Hallway, Livingroom):

Now in order for the devices to update, you either need to wait X amount of time or if youā€™re like me and have no patience, press the button on the PIR (inside) 3 times once you click ā€œRename Valueā€:

image

The device should then update. Youā€™ll probably need to restart HASS. Also, I found that deleting entity_registry.yaml before restarting HASS (I use systemctl to start/stop it) helped a great deal as well (it gets rebuilt.)

Hope this helps!

EDIT: I just noticed you said thereā€™s no drop-down; are your devices being detected? Did you make the same mistake I did and try to add the device via the Z-Stick? If so, no need, you can use the Z-Wave control panel to do this. Click ā€œAdd Nodeā€ at the top of the page and press the button 3 times on the device, it should show up once registered. If youā€™re having problems with duplicates/etc, try deleting entity_registry.yaml and restart HASS and see if it gets picked up then.

I have a zwave.me mini usb stick. So no button to pair z-wave devices. Iā€™m as youā€™re saying using the Z-wave panel to pair the devices. And the pir connects fine i can also detect motion and list the attributes. However i canā€™t change any config parameters.

The device has to be awake before making config changes. You can do this by pressing the button on the PIR 3 times and then save your new settings.

I know however that doesnā€™t work sadly. One thing i forgot to mention is that it also shows up as unknwon device. It detects motion, lux and temperature fine but it shows up as unknown.

Iā€™ve managed to fix this by adding the manufacturer specific xml of the motion detector to the zwcfg*.cfg

Where in HA is available Control Panel to zwave as you show on screen ?