How to add sensor that displays numbers of persons in a room?

Moderator: leecollings

Post Reply
burton666
Posts: 85
Joined: Monday 17 August 2015 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

How to add sensor that displays numbers of persons in a room?

Post by burton666 »

I am experementing and have built a very simple sensors with two ir beams that is placed in a row near a door. When I walk through from one side it registers a variable+=1 and when I walk the other way it registers - =1. My plan is to use something similar to be able to register if a room is occupied and also the number of persons in that room.

If I already have the sensor how do I integrate that functionality into domoticz? I guess the occupied/unoccupied part could be solved by the sensor itself by acting like a switch and report "on" or similar when number of occupants in the room is greater than zero. But it would be nicer if it was also possible to get the actual number of persons and maybe something other than a on/off switch - icon.

And if I have a room with multiple doorways it will not work very well as I need to be able to have multiple sensors that can modify the same variable.

Is there some way that I can add a custom variable in domoticz called for example "livingroom" and have sensors that update the same variable on change. Like : sensor 1-> livingroom +=1, Trigger some switch to livingroom occupied then sensor 2-> livingroom -=1, triggers the same switch to unoccupied.

Is this possible? And how would I register those sensors to domoticz and what do I send to be able to modify the domoticz custom variable?
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: How to add sensor that displays numbers of persons in a room?

Post by Evelen »

I don't think this will work.
Uten navn.png
Uten navn.png (22.34 KiB) Viewed 1357 times
burton666
Posts: 85
Joined: Monday 17 August 2015 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to add sensor that displays numbers of persons in a room?

Post by burton666 »

Haha, nice paint skillz :) But the hardware part is not important, I just want to know if/how it is possible to make this scenario work.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: How to add sensor that displays numbers of persons in a room?

Post by Thomasdc »

i think you could just send everytime an "on" command when someone enters the room to domoticz, and an "off" command when someone leaves?
or make them work als 2 different puls switches

and then make a script in domoticz with a user variable; everytime you get the on-signal do the uservariable +1 and everytime you get an off- signal you can do uservariable -1 (or use the 2 different switches to do +1 and -1) and then you can represent this uservariable in a sensor on the dashboard or something
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest