Zigbee Bed occupancy sensor

Sorry another picture of the sensor

what does the ends look like

do you have a continuity tester

i would use that to test each patten

This is what ends look like.
I bought this https://www.ebay.co.uk/itm/263819604399
No i do not own a continuity tester

if you dont have a tester

you could pair it test it with the magnet (working :slight_smile: )

then

do

1 to A
2 to B
stand on it does work

3 to A
4 to B
stand on it does work

3 Likes

Thank you, I will try this now.
What do you mean pair test it with magnet. Without wires attached, I put magnet next to circuit board and it blinks blue light.

Is it suppose to do something else when wires attached?

I have this same mat. I connect to pins on an esp instead thought it should be the same for you zigbee device.

I’m using the two wires furthest from the corner of your mat. I can’t see you whole mat from your photo but I hope that makes sense. Then as mentioned above solder those to A and B (shouldn’t matter which is which).

1 Like

In this case the mat acts like you putting a magnet near the reed switch on the door sensor, its completing/closing the circuit when you stand on it.
So, solder it then stand on it and it should behave in the same way as when you bring the magnet near it.

1 Like

Thanks bro for jumping and helping

2 Likes

This is whole mat. Thank you all for your assist, sorry If I ask silly questions. So wire 1 and 2 solder to copper connections?

1 Like

i would just twist then on first and do the testing once you know it work then take the leap and soilder it

1 Like

Not silly at all, saves a bit of time if you don’t have a multimeter. Yes, I have 1 and 2 attached as in your photo (the other two are loose on mine, they are only ever connected when the mat is broken somehow as far as I know.)

Though I would agree with @myle that if you can just press them against the pads and test first by standing on it while pressing the contacts you can make sure before you do any soldering.

Here’s how my one looks - 1 and 2 are snaking under the bed to the esp while 3 and 4 are loose

2 Likes

Fantastic! Thank you. Going to drive to b&q now (UK DIY store) to get solder wire as lost mine. Be back in a bit and report back.

P.s. thanks Myles for the project!!

BUY A TESTER ALSO

image

then watch you tube to lean to drive it

@myle @Gergo.io It works guys! Thank you for all your help. The only thing that doesn’t work well is under a memory foam mattress [I’m 185lbs]. So I have to have it at pillow end under the mattress topper and bed sheet. Not the end of the world, but glad to get this cool cheap project working!

Now I’m going to read the thread on how to change Open and Close status, as I would like ON bed to be OPEN.

1 Like

@jellytotz
I created a other sensor

      in_bed_his_side:
        friendly_name: "In bed his side"
        value_template: >-
          {{not is_state("binary_sensor.bed_his_side",'on')}}
        device_class: motion

but read it with the not so open comes closed and closed comes open

where binary_sensor.bed_his_side is the zigbee sensor under the bed

Where do you enter this? Sorry I’m only 4 days into Home Assistant so very new to how it works.
My binary sensor is called this:

Gordon Bed
entity id binary_sensor.gordon_bed

all good bro we all start in the same place

As it a binary_sensor we a making
we just want to know a on/off status ( open/closed)

put in the binary_sensor: section of the config file

if you have

binary_sensor: !include binarysensor.yaml

then it goes in that file

gordon_in_bed:
        friendly_name: "Gordon in bed"
        value_template: >-
          {{not is_state("binary_sensor.gordon_bed",'on')}}
        device_class: motion

if you want to change the look of the device_class read this

1 Like

No I didn’t have include binarysensor. I created a new file just now. Added the include binary sensor. Added the code into binarysensor file and I get this error:

Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:420
Integration: Home Assistant Supervisor ([documentation](https://www.home-assistant.io/hassio), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+hassio%22))
First occurred: 23:41:07 (1 occurrences)
Last logged: 23:41:07

Invalid config for [binary_sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 23).

My binary config

gordon_in_bed:
        friendly_name: "Gordon in bed"
        value_template: >-
          {{not is_state("binary_sensor.gordon_bed",'on')}}
        device_class: motion

my main config file:

# Example configuration.yaml entry
sensor:
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_utc'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'
      - 'beat'
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
binary_sensor: !include binarysensor.yaml

light:
  - platform: group
    name: Gordon Bedroom Lights
    entities:
      - light.bedroom_corner
      - light.bedroom_ceiling
      - light.bedroom_desktop
      - light.bedroom_computer
      - light.bedroom_plant_light
      
  - platform: group
    name: Mum Bedroom Lights
    entities:
      - light.mum_ceiling

  - platform: group
    name: Main Lights
    entities:
      - light.main_landing
      - light.main_hallway
      
  - platform: group
    name: Living Room Lights
    entities:
      - light.livingroom_light1
      - light.livingroom_light2
      
  - platform: group
    name: Small Bedroom Lights
    entities:
      - light.smallbedroom_ceiling
      
  - platform: group
    name: Gordon Work Lights
    entities:
      - light.bedroom_corner
      - light.bedroom_ceiling
      - light.bedroom_desktop
      - light.bedroom_computer

it be the spacing ( a pain in the ass)
here

1 Like

I just fixed this 10 seconds before you posted. Bro you’ve been great and so helpful, very grateful.
It now works!!

This is what I did:
binary

And now off bed shows as blue! Good news:

Can I donate you beer/coffee funds? For the great cheap project and all the help given :slight_smile: