Closed mstormi closed 4 years ago
So, first of all I am quite certain that it says during the installation process that using FIND3 with an external MQTT broker may or may not work. Our password process probably won't work for an external broker so that could be rewritten.
It used both the default file and preset values.
it says during the installation process that using FIND3 with an external MQTT broker may or may not work.
have not seen that although I vaguely remember having seen it in FIND2 already. And what do you want to say by that ? That it won't work anyway ?
Our password process probably won't work for an external broker so that could be rewritten.
Correct. But that's a different story. I had used mosquitto_passwd manually to create a mosquitto user for both, find and openhab. But the question is why did FIND3 look for that ?
It used both the default file and preset values.
what are you replying to here? Please use quotes else this is confusing
what are you replying to here? Please use quotes else this is confusing
Sorry I was in a rush, it was in reply to
IIRC the original FIND install procedure made use of /etc/default/find3server
Correct. But that's a different story. I had used mosquitto_passwd manually to create a mosquitto user for both, find and openhab. But the question is why did FIND3 look for that ?
The reason is I never really though about external broker support when I made this. I overlooked a check in the code that allowed it to run even though it should not have for external broker use. I am working on a fix right now.
have not seen that although I vaguely remember having seen it in FIND2 already. And what do you want to say by that ? That it won't work anyway ?
I actually have never used it with an external broker and their is a notice during the setup that says that you will need to manually configure credentials with external brokers.
brokerText="You've chosen to work with an external MQTT broker.\\n\\nPlease be aware that you might need to add authentication credentials. You can do so after the installation.\\n\\nConsult with the FIND3 documentation or the openHAB community for details."
Ok please change FIND3 to make external MQTT broker the default because it only works like that together with OH. I think there was some code to create user credentials on the broker and I'd think FIND3 and FIND2 are the same with respect to that so it should continue to work, more or less. Also I think the OH MQTT (client) config might still be MQTTv1 so we need to rework that for theMQTTv2 binding.
Ok please change FIND3 to make external MQTT broker the default because it only works like that together with OH.
I don't think so, I have left it up to the user to decide which to use and simply forgot to add a check to not use the automated credentials setup on external broker use it should be fixed by #1083.
I think there was some code to create user credentials on the broker and I'd think FIND3 and FIND2 are the same with respect to that so it should continue to work, more or less.
Yes but that only worked for locally hosted MQTT servers as we have no way to add users to an external MQTT broker, that is why there is the note about authentication setup.
Also I think the OH MQTT (client) config might still be MQTTv1 so we need to rework that for theMQTTv2 binding.
I don't really know much about MQTT interfacing with openHAB and only know that apparently the MQTT binding does not work with our local installation of MQTT and have no idea why. I simply made the code safer I did not look into making it compatible with the MQTT binding provided by openHAB and I have no idea how they differ.
change FIND3 to make external MQTT broker the default because it only works like that together with OH.
I don't think so, I have left it up to the user to decide which to use
Do we talk about the same thing ? FIND works without MQTT but then it's of no use to any OH2 user. It requires an external broker anyway if we want to interface with OH, doesn't it ? Where that choice you talk about then ? And so does OH. We need mosquitto to be setup. IIRC think the old code even enforced setting that up.
I did not look into making it compatible with the MQTT binding provided by openHAB and I have no idea how they differ.
Yes it's substantially different I never used MQTTv2 with FIND. But that's the way to go.
Do we talk about the same thing ? FIND works without MQTT but then it's of no use to any OH2 user. It requires an external broker anyway if we want to interface with OH, doesn't it ? Where that choice you talk about then ? And so does OH. We need mosquitto to be setup. IIRC think the old code even enforced setting that up.
The MQTT broker can be setup on the current machine or you can use an external one that you provide, that is what the installation is referring to. We enforce setting it up in FIND3 as well, but if you use an external broker then we can't change the accounts or passwords on that.
I simply never tested using FIND3 with OH only standalone.
Yes it's substantially different I never used MQTTv2 with FIND. But that's the way to go.
I'll look into using it with MQTTv2, it may be that it is not compatible with it and we have to stick to our separate installation.
The MQTT broker can be setup on the current machine or you can use an external one that you provide, that is what the installation is referring to.
Ok it's a wording thing, and find can make use of common access to the same filesystem where mosquitto has its passwd which of course it cannot with a broker that runs elsewhere. But the broker is always "external" in a sense that neither FIND nor OH provide the broker function.
Now if that's a compile option (?) then make it the external one. We can call mosquitto_passwd from openhabian-config, too
Ok it's a wording thing, and find can make use of common access to the same filesystem where mosquitto has its passwd which of course it cannot with a broker that runs elsewhere. But the broker is always "external" in a sense that neither FIND nor OH provide the broker function.
Correct.
Now if that's a compile option (?) then make it the external one. We can call mosquitto_passwd from openhabian-config, too
Not a compile option, It gives you a notice if MQTT is not installed on you system when you start the setup, and informs you that you can either stop and go set it up, or configure an external broker in the next step. All it is doing with mosquitto_passwd
is creating a new user and password combo on the local MQTT installation for FIND3 to use.
Seen in journalctl -xe
output while debugging something else:
-- The job identifier is 1103.
Aug 13 11:02:28 devpi systemd[864]: find3ai.service: Failed to determine user credentials: No such process
Aug 13 11:02:28 devpi systemd[864]: find3ai.service: Failed at step USER spawning /usr/bin/make: No such process
-- Subject: Process /usr/bin/make could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
Hmm, is make still installed on your system?
Hmm, is make still installed on your system?
Yes must be something different. Either way, check your journalctl -xe for unexpected error msgs
BTW RuntimeDirectory= in find... .service must not have an absolute path (just the dirname without any "/")
BTW RuntimeDirectory= in find... .service must not have an absolute path (just the dirname without any "/")
That is what it is in the new find 3 services, it's different in the find 2 service because I left it how it was originally.
Is this still an issue? if not please close.
Ok I have it running although not yet together with mosquitto. We should validate it does that as well as there's little point in running less than a full-grown combo OH-mosquitto-FIND3. But I now was able to confirm it installs fine so nothing wrong so far. Will hence close this and eventually reopen if I run into more trouble with MQTT.
I have FIND3 running but it doesn't work app in learning mode says "cannot connect to server" after some time (when it tries to upload fingerprints) Data in /opt/find3/server/main/data is unchanged since yesterday.
I actually run FIND3 on the test box and try connecting to my production mosquitto. I've double-checked /etc/default/find3server to contain correct data for MQTT_ SERVER,ADMIN,PASS
journalctl -xu find3server gives
So in the first place I wonder why it tries to access mosquitto_passwd,
in the second place I don't understand why it cannot access it. =>I didn't install mosquitto here but elsewhere that's why mosquitto_passwd is missing. If it's really needed we would need to separately install it for cases when mosquitto is not installed locally. BTW, after I copied it over, find3 startup complains about "mosquitto" missing. Now why that ?Third, I noticed /etc/systemd/system/find3server.service contains
ExecStart=/usr/sbin/find3server -mqtt-server localhost:1883 -mqtt-admin -mqtt-pass -port 8003
which explains some things. It's because I've just hit return on install. IIRC the original FIND install procedure made use of /etc/default/find3server(okay need some investigation but I'm stuck with the ZRAM problem and need help there first. I'm sure it's because of a cyclic dependency in systemd)