nothing configured in mqtt-eventbus.cfg
[09:16:42] openhabian@openHABianPi:~$ lsof -i :1883
-bash: lsof: command not found
openHAB2 switch still not working (reading/writing).
nothing configured in mqtt-eventbus.cfg
[09:16:42] openhabian@openHABianPi:~$ lsof -i :1883
-bash: lsof: command not found
openHAB2 switch still not working (reading/writing).
apt-get install lsof
try the following:
0) switch to root (sudo su
)
systemctl stop openhab2
)mv /var/lib/openhab2/config/org/openhab/mqtt.config /root/
)/etc/openhab2/services/mqtt.cfg
is correctly configuredsystemctl start openhab2
)this points to the direction that this is an auto-generated clientId (using the processId and the hostname)
I am not sure if itâs coming from the openHAB2 mqtt binding connection⊠maybe it is (looks like it)
Something seems to be sending an empty clientId on a second connectionâŠ
I found the following info:
YesâŠ
It should be ( | ) due to CVE-2017-7650. Since Mosquitto 1.4.12, clients are not allowed to have a â#â, â+â, or â/â in their username or client id.
Info:
i) Redirecting...
ii) regression because of CVE-2017-7650: clientid with / character · Issue #462 · eclipse/mosquitto · GitHub
iii) mosquitto/client/client_shared.c at master · eclipse/mosquitto · GitHub
cat /var/log/openhab2/openhab.log | grep mqtt
2017-07-22 12:32:45.726 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2017-07-22 12:32:45.732 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mqttson'
...
1500717721: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1500719450: Client openHAB2 disconnected.
1500719522: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1500719565: New connection from 127.0.0.1 on port 1883.
hello all,
I made the changes of duplicated clientid, etcâŠ
checked the netstat and now I have only one connection:
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1883 127.0.0.1:38744 ESTABLISHED
tcp 0 0 10.0.0.101:1883 10.0.0.104:13727 ESTABLISHED
tcp6 0 0 127.0.0.1:38744 127.0.0.1:1883 ESTABLISHED
the mqtt.config (after the change):
raspberrypi.clientId=âopenHAB2â
raspberrypi.pwd=âpasswordâ
raspberrypi.url=âtcp://127.0.0.1:1883â
raspberrypi.user=âopenhabianâ
service.pid=âorg.openhab.mqttâ
the Mosquitto,log
1500718948: mosquitto version 1.4.14 (build date Mon, 10 Jul 2017 23:48:43 +010$
1500718948: Config loaded from /etc/mosquitto/mosquitto.conf.
1500718948: Opening ipv4 listen socket on port 1883.
1500718956: New connection from 10.0.0.104 on port 1883.
1500718956: New client connected from 10.0.0.104 as DVES_A7F83D (c1, k15, uâope$
1500719029: New connection from 127.0.0.1 on port 1883.
1500719029: New client connected from 127.0.0.1 as openHAB2 (c1, k60, uâopenhab$
1500719556: New connection from 10.0.0.100 on port 1883.
(the last connection is from MQTT fx)
After that I tried to publish the command at MQTT.fx but no response:
2017-07-22 07:33:33,040 INFO â MqttFX ClientModel : attempt to add PublishTopic
2017-07-22 07:33:33,041 INFO â MqttFX ClientModel : sucessfully published message to topic cmnd/sonoff-abajur/POWER off (QoS 1, Retained false)
so⊠did the mosqsub|1730-openHABian
dissapear?
no response from what? (OH2 or the Sonoff?)
post your item config to check it
yes! (for now?)
EDIT: NO!
1500719565: New connection from 127.0.0.1 on port 1883.
1500719565: New client connected from 127.0.0.1 as openHAB2 (c1, k60).
1500720088: New connection from 127.0.0.1 on port 1883.
1500720088: New client connected from 127.0.0.1 as mosqsub|7105-openHABian (c1, k60).
1500720244: New connection from 192.168.178.160 on port 1883.
still no communication with openHAB2 ?
[12:34:38] openhabian@openHABianPi:~$ mosquitto_sub -v -t 'tele/#' -t 'stat/#'
tele/sonoff/LWT Online
stat/sonoff/RESULT {"POWER":"OFF"}
stat/sonoff/POWER OFF
tele/sonoff/STATE {"Time":"2017-07-22T11:43:00", "Uptime":3, "Vcc":3.204, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"NETGEAR47", "RSSI":32, "APMac":"80:2A:A8:4A:C7:AC"}}
thoughts: if the TOPIC is âsonoff1â, my item should be:
Switch Sonoff_TH16A "Sonoff Test" <light>
{ mqtt=">[broker:cmnd/sonoff1/POWER:command:*:default],
<[broker:stat/sonoff1/POWER:state:default]" }
right?
'til now i have used the client id of the sonoff deviceâŠ
changing (correcting) the item doesnât help, still no signs in openhab.logâŠ
[quote=âDim, post:28, topic:31993â]
no response from what? (OH2 or the Sonoff?)
[/quote] no response from Sonoff. I donât know how to see if could be any chance on OH2. But the log is below:
2017-07-22 07:23:49.078 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2017-07-22 07:23:49.083 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection âraspberrypiâ
2017-07-22 07:23:49.619 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-07-22 07:23:49.921 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-07-22 07:23:50.023 [WARN ] [mqtt.internal.MqttPersistenceService] - mqtt-persistence:topic
2017-07-22 07:23:50.026 [WARN ] [mqtt.internal.MqttPersistenceService] - mqtt-persistence:message
the sonoff.item:
Switch Abajur_light âAbajurâ (LR, gLight)
{ mqtt=â>[raspberrypi:cmnd/sonoff-abajur/POWER:command:ON:on], >[raspberrypi:cmnd/sonoff-abajur/POWER:command:OFF:off],
<[raspberrypi:stat/sonoff-abajur/POWER:state:default]â }
When I tried to move the switch at OH2, I got the following message:
2017-07-22 07:56:06.192 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2017-07-22 07:56:06.207 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item âAbajurâ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-07-22 07:56:06.211 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item âAbajurâ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-07-22 07:56:06.215 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2017-07-22 07:56:06.244 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value â93.25861â of item LivingRoom_Light_RSSI with format â%d %%â: java.util.IllegalFormatConversionException: d != java.math.BigDecimal
anything useful with lsof -i :1883
?
or ps -efwww |grep 7105
(that seems to be the process id)
checking your item nowâŠ
for starters, change broker
to mqttson
edit: check examples from here:
it should be something like:
Switch Sonoff_TH16A "Sonoff Test" <light> { mqtt=">[mqttson:cmnd/sonoff/power:command:*:default], <[mqttson:stat/sonoff1/power:state:default]" }
Hello, jumping in here because of the mentioning before.
Pay attention to the first topic level: cmnd vs. stat - thatâs something I personally donât like about the Tasmota default settings. This order can btw be changed in settings.
The config is in sync with what Iâve given as a template here.
Sooo from what Iâve read we are looking at two problems here. Why is there an additional connection with the clientID mosqsub|1234-openHABian
and why is your openHAB not able to receive states and send commands.
this is driving me crazy
anyway this thread is a mess with 2 different setups that we are trying to debug
edit: You are right⊠I didnât see the first topic level
Example setup Click to see fill image
â> Added to the Tasmota wiki
And the corresponding items configuration:
Switch BK_Balkonmagic "Balkonmagic" <stars> (BK,gLight) {mqtt=">[broker:tasmota/sonoff-A00EEA/cmnd/POWER:command:*:default], <[broker:tasmota/sonoff-A00EEA/stat/POWER:state:default]"}
Number BK_Balkonmagic_RSSI "Balkonmagic RSSI [%d %%]" (gRSSI) {mqtt="<[broker:tasmota/sonoff-A00EEA/tele/STATE:state:JSONPATH($.Wifi.RSSI)]"}
Switch BK_Balkonmagic_Unreach "Balkonmagic unreachable" <siren> (gUnreach) {mqtt="<[broker:tasmota/sonoff-A00EEA/tele/LWT:state:MAP(unreach.map)]"}
@ThomDietrich , mine is quite the same. How is your Topic/ Full topic configuration??
Click the image
@ThomDietrich thank you! Mine configuration is the same!!!
@paulo9999 : you have some errors in your sitemap file
your item is defined as Abajur_light
but your sitemap is complaining about an item named Abajur
post your items and sitemap contents to be checked
@Dim:
thank you, sorry for this slight mistake, Iâve corrected it, now sitemap is ok but unfortunately things still isnât workingâŠ
Paulo