Author Topic: [Solved] Input switches  (Read 8223 times)

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
[Solved] Input switches
« on: October 02, 2011, 05:13:49 pm »
Hey,

My installation is working with all EIB interface. All my lighting interfaces and power outlets are in linuxmce. And with an orbiter, i can nicely light up or shutdown the lights.
Now i'm wondering how (where) i should add a light switch (input relay). Is this the same as a light bulb (output relay)?

What's the best approach for this?


« Last Edit: August 13, 2012, 08:36:03 pm by brononius »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches and 'sleeping scenario'
« Reply #1 on: October 02, 2011, 06:20:06 pm »
If you want to have something happen within LinuxMCE when you press the switch, you need to add it as a sensor in the security area.

EDIT: And of course, our wiki has the details as well: http://wiki.linuxmce.org/index.php/EIB/KNX_with_eibd#Adding_a_motion_sensor_.28or_any_type_of_sensor.29
« Last Edit: October 02, 2011, 06:38:07 pm by posde »

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches and 'sleeping scenario'
« Reply #2 on: October 03, 2011, 08:37:36 am »
sensor in the security area.

Ah, sensor, that 'definition' i didn't tried...  ???
I'll give it a try this evening...

Thanks!
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches and 'sleeping scenario'
« Reply #3 on: October 03, 2011, 09:19:23 am »
And using Respond To Events you can do stuff in LinuxMCE based on sensors emitting events. For example, when someone hits one of my sensors, Hell's Bells is being played throughout my house (or whereever an MD is turned on)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Input switches and 'sleeping scenario'
« Reply #4 on: October 03, 2011, 08:12:03 pm »
We really need to make that more intuitive.

-Thom

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches and 'sleeping scenario'
« Reply #5 on: December 29, 2011, 05:57:44 pm »
Finally found the time to play with this feature. But no luck...
What i've done:

In ETS
  • Assign a GA to my lightswitch 0/0/31

In linuxMCE (security sensor)
  • Description "S Test"
  • Device Template #: 1813
  • Controlled By: EIB
  • Port/Channel Number = 0/0/31
  • InputOrOutput= 2
  • Default state = 0
  • EKAlertype = 1

In linuxMCE
  • event: a sensor (motion, door...) is tripped
  • What device = 'S Test'
  • What time = ''
  • Trigger = tripped = '1'
  • Light A = on (a test command here works)


But seems not to work. The lights and so are working correctly for the eib stuff.
Any idea what i'm doing wrong?


ps the idea is later on to active or shutdown the light with a pushbutton.
I don't see how i must to this (because i've got the feeling i only can or activate or deactive something).
But before we run, lets take babysteps and start with 1 action...
« Last Edit: December 29, 2011, 09:26:01 pm by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches and 'sleeping scenario'
« Reply #6 on: December 29, 2011, 07:43:00 pm »
Do you see the sensor press in DCERouter.log?

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches and 'sleeping scenario'
« Reply #7 on: December 29, 2011, 09:06:07 pm »
I don't see the input of the sensor. But the change of status for the lights are coming into the DCErouter.log. This log is from a GA in ETS where i've got 1 sensor and 1 switch. When i push the sensor for 0/0/31, nothing shows up in the logs.
Code: [Select]
07      12/29/11 21:00:38.159           Event #81 has no handlers <0x7cdcab90>
07      12/29/11 21:00:38.159           Received Message from 45 (V Inkom / Inkom) to -1001 (unknown / ), type 2 id 81 Event:State Changed, retry none, parameters: <0x7cdcab90>
07      12/29/11 21:00:38.159             Parameter 66(State): 1 <0x7cdcab90>
07      12/29/11 21:00:40.255           Event #81 has no handlers <0x7cdcab90>
07      12/29/11 21:00:40.255           Received Message from 45 (V Inkom / Inkom) to -1001 (unknown / ), type 2 id 81 Event:State Changed, retry none, parameters: <0x7cdcab90>
07      12/29/11 21:00:40.255             Parameter 66(State): 0 <0x7cdcab90


When I now run the eibd daemon with a local log, i see the sensor action. So we can conclude that the sensor arrives in the server?
Code: [Select]
Layer 0(087D0B78,4EFCCBB5) Recv(021): 06 10 04 20 00 15 04 4D 13 00 29 00 BC E0 11 0B 00 1F 01 00 80
Layer 1(087D0B78,4EFCCBB5) Recv(015): 04 4D 13 00 29 00 BC E0 11 0B 00 1F 01 00 80
Layer 1(087D0B78,4EFCCBB5) Send(004): 04 4D 13 00
Layer 0(087D0B78,4EFCCBB5) Send(010): 06 10 04 21 00 0A 04 4D 13 00
Layer 1(087D0680,4EFCCBB5) Recv L_Data low from 1.1.11 to 0/0/31 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
Layer 2(087D0680,4EFCCBB5) Recv L_Data low from 1.1.11 to 0/0/31 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
Layer 3(087F1290,4EFCCBB5) Recv L_Data low from 1.1.11 to 0/0/31 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
Layer 8(08821CD0,4EFCCBB5) Send_Route L_Data low from 1.1.11 to 0/0/31 hops: 05 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
Layer 1(08821D40,4EFCCBB5) Send(011): 29 00 BC D0 11 0B 00 1F 01 00 80
Layer 0(08821D40,4EFCCBB5) Send(017): 06 10 05 30 00 11 29 00 BC D0 11 0B 00 1F 01 00 80
Layer 4(088430A8,4EFCCBB5) Recv GroupSocket(002): 00 80
Layer 7(08854524,4EFCCBB5) Recv(002): 00 80
Layer 8(08843060,4EFCCBB5) SendMessage(008): 00 27 11 0B 00 1F 00 80
« Last Edit: December 29, 2011, 09:28:41 pm by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

apagg

  • Veteran
  • ***
  • Posts: 60
    • View Profile
Re: Input switches and 'sleeping scenario'
« Reply #8 on: December 29, 2011, 11:21:18 pm »
You can try using  Doorbell (button) template #1624 that works for me.


brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches and 'sleeping scenario'
« Reply #9 on: December 31, 2011, 02:44:15 pm »
I've tried the doorbell function, but the result is the same. But you're right, easier to test phase 1...

I don't see anything happen in the logs. Only the 'retour' from the lights as it seems.
It's like the server isn't picking up the signal from the sensor (it's there, that i can see with the eibd dump).
But i suppose that DCErouter.log isn't triggered when the sensor isn't configured properly?

What do you've got in your sensor settings? I've got following:
PK_FloorplanObjectType    Door
Port/Channel Number    0/0/31
InputOrOutput    2
Default State    0
Alert
EK_AlertType    1
« Last Edit: December 31, 2011, 03:17:25 pm by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches
« Reply #10 on: December 31, 2011, 06:49:29 pm »
The following is my doorbell setup:
 InputOrOutput = 0
 DefaultState = 0
 Alert = 0,1,1,1,1,1,1
 EK_AlertType = 6

The event is
 Respond To Events - A Sensor Is Tripped

Not one of the Active Sensor settings. Those don't seem to work for me atm.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches
« Reply #11 on: January 01, 2012, 08:26:45 am »
grrr, seems that the sensors don't want to play with me...
Do you need to do something special in ETS except putting the sensor in a Group Address and make it Sending?

I'm testing now with another sensor since this one is closer to my computer. ;)
So this is the new output log for the eibd driver:
Code: [Select]
Layer 0(09004B78,4F00077D) Recv(021): 06 10 04 20 00 15 04 44 14 00 29 00 BC E0 11 33 08 07 01 00 81
Layer 1(09004B78,4F00077D) Recv(015): 04 44 14 00 29 00 BC E0 11 33 08 07 01 00 81
Layer 1(09004B78,4F00077D) Send(004): 04 44 14 00
Layer 0(09004B78,4F00077D) Send(010): 06 10 04 21 00 0A 04 44 14 00
Layer 1(09004680,4F00077D) Recv L_Data low from 1.1.51 to 1/0/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
Layer 2(09004680,4F00077D) Recv L_Data low from 1.1.51 to 1/0/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
Layer 3(09025290,4F00077D) Recv L_Data low from 1.1.51 to 1/0/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
Layer 8(09055CD0,4F00077D) Send_Route L_Data low from 1.1.51 to 1/0/7 hops: 05 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
Layer 1(09055D40,4F00077D) Send(011): 29 00 BC D0 11 33 08 07 01 00 81
Layer 0(09055D40,4F00077D) Send(017): 06 10 05 30 00 11 29 00 BC D0 11 33 08 07 01 00 81
Layer 4(090770A8,4F00077D) Recv GroupSocket(002): 00 81
Layer 7(09088524,4F00077D) Recv(002): 00 81
Layer 8(09077060,4F00077D) SendMessage(008): 00 27 11 33 08 07 00 81

ps each time i changed something, i'm doing a reload of the core. Don't think that's necessary, but it can't hurt either... (i think)


« Last Edit: January 01, 2012, 08:31:23 am by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches
« Reply #12 on: January 01, 2012, 11:21:08 am »
Do you see any activity in the DCERouter.log when you press the button?

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Input switches
« Reply #13 on: January 01, 2012, 02:20:57 pm »
Nope, nothing.  :'(

I only see some movement when i push a button that is configured with a light.
But then it's the return of the relays that i see in the logs. Not the actually button push.
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Input switches
« Reply #14 on: January 01, 2012, 02:24:35 pm »
From your EIBd log it looks as if you are sending TO the button, but not FROM the button.

Are you sure your GA definition for the sensor is correct?