Long story short. It does not work… Any help is appreciated.
Daniel
ps. does anyone know why the documentation states this as correct “Thing mqtt:topic:mything” however this format gives me an error message?
pps. what does it even mean that a broker has a thing with the name topic and this thing has a channel? If I read the documentation correctly I would just put all my MQTT things into the channels, correct?
In order to better help new users I’m not using .things files anymore so I can’t speak to the specific syntax of the Bridge and Things and Channels.
From the little I have done though I can say you need to watch the online status of the Bridge because if it goes offline then none of the Things associated with it will work. This caught me up.
Watch openhab.log for error messages too. This is how I discovered why my Bridge didn’t connect.
Sascha’s tutorial is pretty good. Even if you are using .things files there might be something useful there to help with this problem.
I totally agree with @rlkoshak, however I’ m using the files and have it working.
Additionally I use mqtt-spy to check wether the commands are actually send.
Please show your log entries , we might find a clue.
@David_Graeff
Hi,
I’m struggling with the dimmer type channel/dimmer item combo. The Dimmer item can send PercentType commands (0…100) which should be converted on thing level to 0…255 range expected by the device.
The NumberValue class doesn’t apply any min/max transformation to percent type commands only for decimals:
...
else if (command instanceof PercentType) {
numberValue = ((PercentType) command);
} else if (command instanceof DecimalType) {
double v = ((DecimalType) command).doubleValue();
v = (v - min) * 100.0 / (max - min);
numberValue = new PercentType(new BigDecimal(v));
}
...
Any suggestion how to archive this?
I’m using Number channels with Setpoint controls on sitemap as workaround but it renders ugly…
Thanks
Hi,
I have a problem with the migration from oh2.3 stable to oh2.4 stable (MQTTv2):
on the picture you can see that with the new version of the mqtt bindings “on” and “OFF” can be seen in the sitemap, at the bottom of the picture you can see the old mqtt binding. how can I remove this “ON” resp. “OFF”?
Same problem here, my solution was to use a MAP transformation and hide the unwanted state. This problem is related to the new MQTT binding, perhaps there is a more elegant solution that I dont know.
Are you sure that this problem (a switch item showing its ON /OFF as text additionally) is related to MQTT?
IMHO it is a problem (or even a wanted? new feature) of the sitemap.
Maybe the MQTT binding is not the right place to implement this outbound transformation. I have a feeling that implementing it on profile level would be a better solution. WDYT?
I think we are all in agreement with this but that is a longer term project. Adding outbound transforms to the MQTT binding is a stop gap solution until something like that gets implemented.
David did say elsewhere that profiles will probably not be the right approach but he didn’t provide details for why. I suspect profiles are set up to only process incoming data.