This is my very first attempt at adding an item and making it work in OH. I have been researching and studying for a few weeks and decided to finally give it a go. However, on my first item, I am stuck and I can’t figure out why as the syntax seems to match properly.
Setup: (OH 1.8)
I am trying to use the exec binding to call a known working script, codesend, to turn my RF 433 Outlets on and off. This is definitely a software issue as this hardware is working fine and has been for months with my own custom webapp.
The error I am getting (when clicking ‘On’ is:
2016-08-20 16:43:13.738 [WARN ] [.o.b.exec.internal.ExecBinding] - doesn't find matching binding provider [itemName=lamp_lr, command=ON]
Another weird thing that is happening is that when I click the ‘Off’ button, I get this in the logs. Doesn’t look like an error, but certainly isn’t what I want, I do not think.
2016-08-20 16:43:31.145 [INFO ] [.o.b.exec.internal.ExecBinding] - executed commandLine '/home/pi/python_scripts/automation/v2/codesend 5330380]>[ON:/home/pi/python_scripts/automation/v2/codesend 5330371
`
It should only be sending:
/home/pi/python_scripts/automation/v2/codesend 5330380
That being said, I feel it is a syntax error, but I checked the exec binding wiki examples and mine looks right. Here are my items and sitemap files:
Switch lamp_lr "Living Room Lamp" (gOH, Lights) {exec=">[OFF:/home/pi/python_scripts/automation/v2/codesend 5330380]>[ON:/home/pi/python_scripts/automation/v2/codesend 5330371]"}
sitemap home label="Home"{
Frame label="Light Switches"
{
Switch item=lamp_lr label="Living Room" mappings=[ON="On" , OFF="Off"]
}
}
One other side note, I cannot seem to find any general syntax documentation, for instance spacing, wrapping to next line, etc. A lot of the examples I see show no spaces between the = and there are a few other syntax questions I need to clear up on that as well. Thanks!