Neo Coolcam PIR

zwave
Tags: #<Tag:0x00007f1b9a72d7a8>

#62

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

#63

Don’t edit the Z-wave config, use the entity register instead.


#64

OK so to rename sensors that’s the place to use?


#65

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


#66

Oh nice, thanks!


#67

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?


#68

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?


#70

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


#71

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 }}


#72

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


#73

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: '%'

#74

Thank you that’s what i thougt and your example works!


#75

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


#76

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.


#77

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.


#78

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.


#80

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.


#81

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.


#82

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


#83

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