Noob Question on how items relate to variables coming from serial gateway

I am new to this openHab, and better with electronics than programming at this time, and have been reading a lot of pages of information on the site, but I am missing a crucial bit of information.

I am using setup; I have successfully setup the gateway (serial), and I am receiving data:

String Arduino “Arduino” { serial="/dev/ttyACM0@115200" }
Number livingTemp01 “Temperature [%.1f °C]”
Number livingHum01 “Humidity [%.1f %%]”

and here is the events log showing the two connected sensors transmissions:

2016-01-13 00:55:08 - Arduino state updated to 0;0;3;0;9;read: 4-4-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.0
0;0;3;0;9;read: 4-4-0 s=0,c=1,t=1,pt=7,l=5,sg=0:37.0

2016-01-13 00:56:21 - Arduino state updated to 0;0;3;0;9;read: 10-10-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0

2016-01-13 00:58:32 - Arduino state updated to 0;0;3;0;9;read: 10-10-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0

I am trying to add a simple motion detection sensor to the environment. The Sensor ID is 10 as seen above;

Contact BasementMot01 “Motion”

Where I lose understanding of the environment, is how the system is reacting to the serial inputs to get information into the variables in the demo.items file?

I understand the connection is made via the serial gateway, but how does openHAB take the input from the gateway and populate the livingTemp01 item for example?

My Temperature and Humidity sensors are populating my sitemap, but I am unsure how to get the motion contact setup going. I tried the above item configuration, but I really have no idea how this is to work.

Can anyone point me in the right direction?

There are many ways to handle this. But if I remember correctly the mysensors examples create a rule that parses all of the data that comes in on Arduino and populates the other Items with the right data. So you need to find the rule that triggers on updated to Arduino and add code to send the state from your sensor 10 to your contact.

You should be able to see what is there and use it as an example for how to do this.

Thank-you for your response. It was staring me in the face - the Rules section has to identify based on the MsgType parsed out of the Arduino update!