Item for everspring sp 103 motion sensor-zwave

Thanks a lot. Ok, my items are:
Switch Motion_Sensor “MotionSensor” (group) { zwave=“46:command=sensor_binary,respond_to_basic=true” }
Number Motion_Sensor_Battery “MotionSensor Battery [%d %%]” { zwave=“46:command=battery” }
Switch Motion_Sensor {mqtt="<[mosquitto:inTopic:state:default]"}

sitemap
sitemap default label=“Main Menu”
{
Frame label=“Motion Sensor” {
Switch item=Motion_Sensor
Text item=Motion_Sensor_Battery
Switch item=Motion_Sensor
}
}

and rules:
rule "Someone moving"
when
Item Motion_Sensor changed from OFF to ON
then
if(Motion_Sensor.state==1)
sendCommand(Light_Switch,ON)
end

rule "Someone doesn’t move"
when
Item Motion_Sensor changed from ON to OFF
then
if(Motion_Sensor.state==0)
sendCommand(Light_Switch,OFF)
end
Can anyone help me with rules, are there correct??
I looked openhab.lob and only one error is <17:43:00.055 [ERROR] [.o.m.r.i.engine.ExecuteRuleJob:57 ] - Error during the execution of rule Persistence Demo/>
And where can I found zwave.log?

I don’t think you can have two items with the same name (Motion_Sensor), why would you need that?
I suggest going step by step, so comment out the mqtt part for now.
You don’t have Light_Switch configured in your items file, no hardware can be switched this way.
You need to bind any sensor or actor to your hardware.

Please don’t get me wrong: you need to start with the basics, read the wikis for items setup, sitemap setup and take a look at the demo rules …

https://github.com/openhab/openhab-distro/blob/master/features/openhab-demo-resources/src/main/resources/rules/demo.rules

Edit: you only have a separate zwave.log if you did configure that in your logback.xml, see last paragraph in the zwave wiki

Is first and second item correct and sitemap without item for mqtt?

Yes, because you already posted:

Thank you.Can without rules or I must write that rules??

Yes, you need a rule to switch on a light when your motion sensor detects motion.
A second way to do that are associations: you may bypass your controller if you have zwave devices which support associations, those can also be set via habmin.
But the “normal” way is to use a rule.

Can you help me, please? This is new for me, and I don’t have much time

I can try, but you are not giving much information :sunglasses:
What do you want to achieve?
What do you want to do when your sensor detects motion? Switch a light? Activate an alarm? Open the the door to get the dog or cat out?
When you can answer this question also tell us which hardware in addition to the motion sensor you are using and how you bind it to openhab …

Maybe switch a light or activate an alarm? Which is easier for you? I only have aeon labs z-wave usb stick and sp103 everspring Motion Detector.

Then you can’t do anything: you only have a sensor, you don’t have any actors …
You could buy a zwave relay switch or a dimmer, connect it to one of your lights, configure it with the item name “Light_Switch” in your items file and use the above rule which should work. In this case the light would be on as long as the motion sensor is in the open state.

At the moment you can only show the state of the motion sensor in your sitemap which is something you are already doing …

I should display data from openhab, using mqtt server, but can do without that part-that part for rules? Can I take the data from this sensor, using mqtt server and displayed in Wireshark?

I’m pretty sure that is possible but I have never used that.
My mqtt sensors go directly through the mqtt binding to openhab, so you need to wait for someone who knows how to do that with with rerouting through zwave…

Thanks a lot. I’ll wait.

What I’ve found is that you can have multiple bindings for one item:

So in your case it could look like

Switch Motion_Sensor "MotionSensor"	(group)	{ zwave="46:command=sensor_binary,respond_to_basic=true" ,  mqtt="<[mosquitto:inTopic:state:default]"  }

I don’t know how you have to configure the mqtt part in this case, you have to find out that yourself.

Thank you a lot.I write new post for this question.