more G-Labs products

Author Topic: What I've done so far..Texecom, DD-WRT.. And an occupancy question..  (Read 2850 times)

October 10, 2015, 10:27:26 AM
Read 2850 times

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Hi,

Finally been activated on the forum so thought I would put a quick post of where I am with my install so far..

I've got a texecom Premier 24 integrating with homegenie providing real time updates on sensors based on activity from the zones.

I've got presence detection working via looking at the association list for my mac address using Wifi from my router (running dd-wrt).

So, next question is, how are people controlling occupancy based on inputs that arent latching..

for example, I want occupancy in a room to start a timer for a configurable value - say 15 mins.

If occupancy is detected again, I want to reset that timer back at 15 mins.

Above these I want a timer for the house, IE House is occupied if any of the rooms are occupied.

Next steps, port my code I wrote in python for Nest interaction and Get the Alarm Ouputs mapped along with the area status..

Thanks

David

October 10, 2015, 09:29:07 PM
Reply #1

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,
Welcome !

You can take a look at he following code : "configure" -> "programs" -> "Light" -> "Smart Light", there is a management of a timeout.
But you can probably use "LastOn", "LastOff" or "HistoryArray" ....
https://github.com/genielabs/HomeGenie/issues/228

Bye

October 12, 2015, 05:26:30 PM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
In the Advanced Smart Lights code, I used HistoryArray elements 0 and 1 to determine the time between motion events among other things.  Depending on how you have things set up, LastOn and LastOff might work for your needs (as nolio suggested).

October 13, 2015, 06:15:55 PM
Reply #3

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Thanks, I've just installed your advanced smartlights plugin, and eventually got it working once I realised there was a tick box to enable smartlight control duh..   ::)

However if I keep moving for the PIR the light still turns off despite me keeping it 'occupied' Any ideas as to what I've done wrong?

October 14, 2015, 04:51:03 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
The code looks for motion on and motion off.  If you have it set up to only use motion on, keeping the motion activated will not keep the timer from turning off the light.  Any time a motion on is received, the code should restart the timer.  My guess would be that you have a short timeout set and you are not starting the timer on motion off.

October 15, 2015, 01:53:06 PM
Reply #5

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Ahh, got you - that makes sense - will have another play :)

November 12, 2015, 07:27:05 AM
Reply #6

Hoke

  • *
  • Information
  • Newbie
  • Posts: 10
Hi David

I've got a texecom Premier 24 integrating with homegenie providing real time updates on sensors based on activity from the zones.

How are you integrating with your Texecom? Presumably through COMIP module or serial?

My com port is being used by something else so I'm looking to link up to my Texecom Premier 412 by emulating a keypad on the 485 bus, but am not sure at this stage if it's encrypted or reverse engineerable. Anyone got any insights on this?

November 12, 2015, 02:11:42 PM
Reply #7

Maximo

  • ***
  • Information
  • Full Member
  • Posts: 84
Hi David,

I'm interested to understand how you've achieved this.

Quote
I've got presence detection working via looking at the association list for my mac address using Wifi from my router (running dd-wrt).

Sounds like a better way of detecting when a phone connects to the network than doing a ping against the IP.

Thanks

Garry

November 12, 2015, 08:28:12 PM
Reply #8

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Quote
I've got presence detection working via looking at the association list for my mac address using Wifi from my router (running dd-wrt).
Sounds like a better way of detecting when a phone connects to the network than doing a ping against the IP.
You will not have mac address on your router, if the phone is not connected with an ip. So nearly the same ...

November 12, 2015, 11:23:09 PM
Reply #9

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Yeah but a phone isn't guaranteed to respond to ICMP :) also Mac address table is more efficient and don't have to worry about reservations or host names.

As for the Texecom, you have more than one serial port onboard. I have a com-ip but I'm not using that I just use a cp2102 USB TTL adaptor, ping me an email for more info :)

November 12, 2015, 11:30:01 PM
Reply #10

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
To add to above, don't want to share too much info at moment as I signed an NDA with Texecom - so will check the docs and scope before I publish anything sketchy :)

I can say that I didn't need the NDA :) as most of the info is on the net especially sia protocol which I  intercept from the com-ip for my old python Script that sets the nest to away when the alarm sets,  which given time I'm porting to homegenie