Let’s see if I can describe my problem… I’m not quite sure if it’s a bug somewhere or if I’m doing something wrong.
This is about the exec binding under OH3M5. I have a command (or really, a shell script) for sending SMS. I have a Thing that’s configured like this:
UID: exec:command:sendsms label: Send SMS thingTypeUID: exec:command configuration: interval: 0 autorun: true command: /usr/local/bin/sendnexmosms %2$s timeout: 15
…and I have an Item connected to the input channel, with an Expire timer that updates the state to UNDEF after one second.
Thing is that everything works the first time I change the value of my Item. The command is called and I get my SMS. It also works if I change the value to something different, I get a new SMS. What doesn’t work is if I want to send the same SMS again, then nothing gets triggered.
- The value of the Items is UNDEF
- I set the Item to “FIRE!” and everything works
- After one second the Item is returned to UNDEF
- Sometime later I set the Item to “FIRE!” again. Nothing happens.
Anyone can spot the problem? Shouldn’t the autorun on the Thing make the command run every time the value of the Item changes, even when it actually has had the same value earlier?