Sitemap show all works but rules not running

I have scene master (ZRC-90) and Siran Alarm (Neo)
I am trying to turn on the alarm by pressing one of the scene button [3] but fail to do it.
My items files look like this:

Switch Test1 "test_1" {channel="zwave:device:52803b4d:node4:switch_binary"}
Number Test3 "test_3 [%s]" {channel="zwave:device:52803b4d:node3:scene_number"}

and my rules file look like this:

rule "test_simple"
when
  Item Test3 received update 3
then
  Test1.sendcommand(ON)
end

I can get the scene number on my sitemap and also turn on and off the alarm but can’t connect them through rule

Any advise?

Please edit your post to add code fences
just add three little tiddly thingies before and after the item and rules like so

item file here

edit to add that on first read your items and rule look ok

Or use the code fence button

image

1 Like

Do you see any errors in openhab.log when you save/change the .rules file or when OH first starts?

do you have other Rules that might take a long time to run?

My first impression is that the error is the 3. received update does not accept additional parameters

No errors on the log.
No other rules are running, this is my first rule…

Thomas I think got it
Try

 Item Test3 received update

instead
(take the 3 off the end)

So how I can get the scene number trigger the siren?
I use 8 button scene that generate numbers 1-16

You can use a trigger

when
   Item myItem changed to 3
then

unless you also interested in triggering on updates when it is already 3
Then you could use

when
   Item myItem received update
then
   if (myItem.state == 3) {
      // do stuff
   }
1 Like

I changed to the below but yet no trigger

rule "test_simple"
when
  Item Test3 changed to 3
then
  Test1.sendcommand(ON)
end

Please show us the events.log of your Item changing.
Is this a Number type Item, or a String type? A String would need to trigger on "3"

First post shows Number

here is the events.log show the events while I press the scene number


2019-09-06 22:33:22.345 [vent.ItemStateChangedEvent] - Test3 changed from 7.0 to 2.0
2019-09-06 22:33:23.425 [vent.ItemStateChangedEvent] - ZWaveNode003ZRC90SceneMaster8ButtonRemote_SceneNumber changed from 2.0 to 3.0
2019-09-06 22:33:23.433 [vent.ItemStateChangedEvent] - Test3 changed from 2.0 to 3.0
2019-09-06 22:37:04.355 [vent.ItemStateChangedEvent] - ZWaveNode003ZRC90SceneMaster8ButtonRemote_SceneNumber changed from 3.0 to 4.0
2019-09-06 22:37:04.402 [vent.ItemStateChangedEvent] - Test3 changed from 3.0 to 4.0
when
   Item Test3 changed to 3.0

yes, really :smiley:

1 Like

The Item is changing to 3.0 not 3

still not working…

rule "test_simple"
when
  Item Test3 changed to 3.0
then
  Test1.sendcommand(ON)
end

You have all the tools to track it down now.

rule "test_simple"
when
  Item Test3 changed to 3.0
then
   logInfo("test", "Hurrah my rule runs")
  Test1.sendcommand(ON)
end

rule "test_diagnostic update"
when
  Item Test3 received update
then
  logInfo("diagu", "updated Item")
end

rule "test_diagnostic change"
when
  Item Test3 changed
then
  logInfo("diagc", "changed Item")
end

Make sure each rule name is unique.
Make sure you can see a message in openhab.log that your rules file has loaded.

1 Like

Well, all rules run but there is an error at the end, see below.
What that means?

2019-09-06 23:17:47.048 [INFO ] [.eclipse.smarthome.model.script.test] - Hurrah my rule runs
2019-09-06 23:17:47.048 [INFO ] [eclipse.smarthome.model.script.diagc] - changed Item
2019-09-06 23:17:47.051 [INFO ] [eclipse.smarthome.model.script.diagu] - updated Item
2019-09-06 23:17:47.055 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'test_simple': 'sendcommand' is not a member of 'org.eclipse.smarthome.core.library.items.SwitchItem'; line 6, column 3, length 21

It means your rule has sendcommand instead of sendCommand.

1 Like

Wow! good catch!!!
Now it just works perfect.

Thanks alot