//Temperature Sensors
Number Temperature "Temperature [%.1f °C]" {mqtt="<[broker:sensor/temperature:state:default]"}
Number Humidity "Humidity [%.1f%%]" {mqtt="<[broker:sensor/humidity:state:default]"}
Switch Relay "Channel 1" {mqtt=">[broker:sensor/relay:command:ON:on],>[broker:sensor/relay:command:OFF:off]"}
Im trying to make the HomeKit binding to work, but everytime I add [ “Lighting” ] , the switch stop working. I don´t know if its possible to use HomeKit on devices connected to an MQTT network. If anybody knows something please let me know. Thanks.
It does look like you’ve got your ESP and mqtt broker running OK, and I can’t see any immediate or obvious issues with your .items file or .sitemap - but, please in future, put these into code fences, like this (or by using one of the buttons in the toolbar above):
```
Your text here
```
Let’s also see your openhab.log file - please copy/paste into code fences a snippet of the log covering a time period showing the startup of openHAB, and you receiving at least 1 message from your ESP into mqtt.fx
Hopefully in this log file there will be something that will give either you and/or us an idea of what’s going on. These logs are important to troubleshooting.
You are trying to ask us to troubleshoot a very complex piece of software, by providing us with only a couple of screenshots, and some copy & pasted code, which, due to not using the ‘code fences’, has been passed through a processor which may have amended or stripped out important errors in your code.
You have used the ‘code fences’ option for when you posted your ESP code, so you know how to do it already - please just apply it to anything that has anything to do with your openhab configuration
Please show us the contents of the log file. I would like you to restart openhab (or restart the computer it is running on) so that we can see all of the entries in the log for it starting up, trying to set up all the bindings etc, and hopefully this will highlight an error that you can easily correct! But without log files, it is going to be very difficult.
2018-01-26 20:49:42.547 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:49:27.493+0300 to 2018-01-26T20:49:42.499+0300
2018-01-26 20:49:57.514 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:49:42.499+0300 to 2018-01-26T20:49:57.503+0300
==> /var/log/openhab2/openhab.log <==
2018-01-26 20:50:05.144 [INFO ] [clipse.smarthome.model.script.Keller] - Temperatur: python: can’t open file ‘/home/opnehabian/AdafruitDHT.py’: [Errno 2] No such file or directory°C, Feuchte:
2018-01-26 20:50:11.888 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while executing ‘http://localhost:8091/sicaklik’ : ‘Cannot run program “http://localhost:8091/sicaklik”: error=2, No such file or directory’
==> /var/log/openhab2/events.log <==
2018-01-26 20:50:12.516 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:49:57.503+0300 to 2018-01-26T20:50:12.506+0300
2018-01-26 20:50:27.520 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:50:12.506+0300 to 2018-01-26T20:50:27.509+0300
2018-01-26 20:50:39.263 [vent.ItemStateChangedEvent] - Deneme2_LastExecution changed from 2018-01-26T20:47:38.311+0300 to 2018-01-26T20:50:39.251+0300
2018-01-26 20:50:42.529 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:50:27.509+0300 to 2018-01-26T20:50:42.518+0300
2018-01-26 20:50:57.417 [vent.ItemStateChangedEvent] - Nem changed from 41.20 to 41.30
2018-01-26 20:50:57.429 [vent.ItemStateChangedEvent] - Rutubet_LastExecution changed from 2018-01-26T20:47:26.248+0300 to 2018-01-26T20:50:57.417+0300
2018-01-26 20:50:57.536 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:50:42.518+0300 to 2018-01-26T20:50:57.521+0300
==> /var/log/openhab2/openhab.log <==
2018-01-26 20:51:11.907 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while executing ‘http://localhost:8091/sicaklik’ : ‘Cannot run program “http://localhost:8091/sicaklik”: error=2, No such file or directory’
==> /var/log/openhab2/events.log <==
2018-01-26 20:51:12.980 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:50:57.521+0300 to 2018-01-26T20:51:12.967+0300
2018-01-26 20:51:27.999 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:51:12.967+0300 to 2018-01-26T20:51:27.985+0300
2018-01-26 20:51:43.012 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:51:27.985+0300 to 2018-01-26T20:51:42.988+0300
2018-01-26 20:51:58.004 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:51:42.988+0300 to 2018-01-26T20:51:57.994+0300
==> /var/log/openhab2/openhab.log <==
2018-01-26 20:52:11.920 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while executing ‘http://localhost:8091/sicaklik’ : ‘Cannot run program “http://localhost:8091/sicaklik”: error=2, No such file or directory’
==> /var/log/openhab2/events.log <==
2018-01-26 20:52:13.033 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:51:57.994+0300 to 2018-01-26T20:52:12.998+0300
2018-01-26 20:52:28.029 [vent.ItemStateChangedEvent] - Date changed from 2018-01-26T20:52:12.998+0300 to 2018-01-26T20:52:28.006+0300
If you are playing around with the mqtt cfg file a lot you may be affected by a bug (wrong content of config could be cached):
check your /var/lib/openhab2/config/org/openhab/mqtt.config file if it has the same content as your mqtt.cfg.
If not, delete the mqtt.config and restart openHAB. The file will be recreated with the correct content and mqtt should work.