LinuxMCE Forums

General => Users => Topic started by: brononius on October 02, 2011, 05:13:49 pm

Title: [Solved] Input switches
Post by: brononius 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?


Title: Re: Input switches and 'sleeping scenario'
Post by: posde 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
Title: Re: Input switches and 'sleeping scenario'
Post by: brononius 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!
Title: Re: Input switches and 'sleeping scenario'
Post by: posde 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)
Title: Re: Input switches and 'sleeping scenario'
Post by: tschak909 on October 03, 2011, 08:12:03 pm
We really need to make that more intuitive.

-Thom
Title: Re: Input switches and 'sleeping scenario'
Post by: brononius 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

In linuxMCE (security sensor)

In linuxMCE


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...
Title: Re: Input switches and 'sleeping scenario'
Post by: posde on December 29, 2011, 07:43:00 pm
Do you see the sensor press in DCERouter.log?
Title: Re: Input switches and 'sleeping scenario'
Post by: brononius 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
Title: Re: Input switches and 'sleeping scenario'
Post by: apagg on December 29, 2011, 11:21:18 pm
You can try using  Doorbell (button) template #1624 that works for me.

Title: Re: Input switches and 'sleeping scenario'
Post by: brononius 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
Title: Re: Input switches
Post by: posde 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.
Title: Re: Input switches
Post by: brononius 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)


Title: Re: Input switches
Post by: posde on January 01, 2012, 11:21:08 am
Do you see any activity in the DCERouter.log when you press the button?
Title: Re: Input switches
Post by: brononius 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.
Title: Re: Input switches
Post by: posde 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?
Title: Re: Input switches
Post by: brononius on January 01, 2012, 02:40:59 pm
I've just created a GA in ETS, and added the button in it. Nothing more.
A bit similar like i did for my standalone groups (=the groups who work without the server involvement).

For the eibd.log, this is generate once i push the button.
So its data coming from the button towards the server...

When i add now a light into this 'ETS' group, it lights up once i push the button.
So the configuration is working without a server involvement.


I was thinking that there isn't data coming in from the EIB bus. But since i can read the status of the lights, i suppose this is fine?
When a light is flipped on, DCErouter.log starts generating some log files as well.


ps what do you mean with the GA definition? Are their special settings for the groups to take care off?
Title: Re: Input switches
Post by: brononius on August 13, 2012, 08:35:31 pm
With linuxMCE 1004 and the default eibd template, the input buttons works.
Just select the doorbell template, and i'm on my way...