Any Idea what i did wrong. Tried many ways to set the " " so its accepcted - but as i have no clue about the error log, it was only a guess that there is some confusion about the marks…
[251,144]: no viable alternative at input ‘“:”’ [251,152]: mismatched input ‘)’ expecting ‘end’
i’m old school 2.5.10. I tried so many things, i looked so many times to this rule - but i cannot find anything wrong. but it has to be - otherwise it would be accepted.
Looking at the String passed to executeCommandLine, you have double quotes inside the double quotes. You need to escape those that are part of the string. As currently written your quotes don’t line up.
If you break it up you are passing the following five arguments:
Thanks a lot,…i was pretty sure its something with these many marks…but not thinking about the " to make it happen the way i want it. Thanks
I’m only using MQTT 1.x binding for items. still even more old school. will look into publishing inside of rules, if it works with the old version of the binding as well.
@rlkoshak just for curiosity - as MQTT action is related to MQTT binding 1.x…how is this covered in MQTT 2.x binding? is MQTT action integrated in the 2.x binding, or 1.x still cooperates with MQTT 2.x binding - which i guess is not the case.
To elaborate a little, in OH 2 they’ve done away with separately installible Action add-ons. Instead bindings come bundled with their actions (if any). There are even some cases where the binding only exists to provide the action (e.g. the email binding). Instead of filling out a cfg file, one creates a Thing with the connection information. From the rule you pull the action from that Thing, making it much easier to support more than one connection.
thanks for the clarification/background information - indeed soon i should swap over to 2.x binding. As 3.x will not support 1.x bindings from what i understand as the most important todo-part for myself…
Sorry to bother you all again, but still my issue is not solved.
Tried simply the publish (mqtt action). Does not work, even if i try to send to a standard mosquitto broker. I read that there are some issues with MQTT action, so i stopped this path to not invest too much time on a dead horse
Again i tried the executeCommandLine. it shows that it was triggered on the logs, but nothing happens. Now i tried the same command to put it into a script and execute the script …it works.
So any idea what else i could try…already did the \ " and tried @@
What issues and how old was there post and which version of the Action? As far as I’m aware the 2.x version works without problem.
Personally, I’d spend my time and effort trying to solve the problem is the most straightforward and typical manner, which would be using the MQTT Action.
Since you got it to work using a shell script, why not stop there and claim success? Using execute command line is already kind of a hack and a work around. Using a script is really no more so.
Thanks @rlkoshak, i really would love to use MQTT action, but i tried now many things last evening but nothing arrives at the broker.
Maybe you can see anything i did wrong:
mosquitto is the name in the service cfg file for MQTT. this one works for years now and also the broker has a lot of messages if i use MQTT.fx as a subscriber. Looking at this topic below, nothing arrives at all.
That one line will not be sufficient to diagnose the problem.
What version of the binding is installed?
What version of the Action is installed? They are both installed right?
Do MQTT Items work?
What order did you install the add-ons? There was a time when the Action needed to be installed second or else problems would occur.
Anything in the logs?
If there is a bug with the Action of the Binding, it’s never going to be fixed. At some point entropy is going to force you to upgrade to the 2.x binding. Maybe it’s time to spend the effort now when you are not under the gun to fix it.
Sorry, you’re right.
Its 2.5.10 core and the binding is 1.14.0. YES MQTT works fine. MQTT first, and the Action second.
Logs do not show anything regarding MQTT.
but from all the threats i see today i better stop with MQTT action efforts…many issues people have/had and i do not want to end up with install/uninstalling until it runs for a certain time.
e.g., not too much reliance…
There is a problem with the mqtt action that occur sometimes.
Remove the action, clear the cache and after a restarting oh, install the action agian