Eric, In one of your posts above, the mosquito broker says it has a connection from a client...and given you're running this in a single VM, that must be a client on that machine. Im struggling to understand why you would want a MQTT broker on the same VM as weewx ...when it only needs the client. as weewx doesnt respond to mqtt messages/commands (someone will correct me if Im wrong) - maybe you dont need mqtt at all ? I suggest you test wether the weewx client is working (publishing) by using one of the public MQTT brokers such as test.moquito.org (and monitor your messages via mqtt explorer. If you're running the broker in the same vm as weewx, then you must have other mqtt devices (clients)...do they work ? I agree with Vince...and Im starting to lose the plot over what you're trying to acheive....
On Friday, 31 December 2021 at 23:47:59 UTC vince wrote: > Work your mosquitto broker problem and that only. > Test with mosquitto_sub and mosquitto_pub and get that to work first. > Once that works, try to get weewx to subscribe. > > Try removing any previous garbage your earlier attempts might have put > into /run. > > sudo rm -r /run/mosquitto > sudo systemctl start mosquitto > > On my ubuntu 21.10 vm permissions look like: > > root@ubuntu-focal:/run# ls -lagd /run/mosquitto > drwxr----- 2 root 60 Dec 31 23:42 /run/mosquitto > > root@ubuntu-focal:/run# ls -lagd /run/mosquitto/* > -rw-r--r-- 1 mosquitto 4 Dec 31 23:42 /run/mosquitto/mosquitto.pid > > On Friday, December 31, 2021 at 2:36:19 PM UTC-8 Eric K wrote: > >> No, its not working. >> Running the commands with sudo still failed to generate a pid file. >> Running with the default config allowed mosquitto to start and >> MQTTSubscribe tried to connect but it disconnected after 5 seconds. >> >> When I started weewx and forced wee_reports to run, it bomed out with >> many errors including MQTTSubscribe errors. >> I suspect because it couldn't connect to mosquitto. >> >> Since the mosquitto command changed from "port" to "listener", do I have >> to change the MQTTSubscribe section of weewx.conf so it calls out "listener >> = 1883" rather than "port = 1883"? >> >> >> On Friday, December 31, 2021 at 4:20:01 PM UTC-6 vince wrote: >> >>> So is it working ? Not working ? >>> We can't read minds and your followups are rather cryptic. >>> >>> Is there any mosquitto process running ? >>> If so stop it and try again with 'sudo systemctl start mosquitto' >>> >>> If you want to try to run mosquitto in the foreground to debug it, add >>> the -v switch to make it verbose, and remember to use sudo >>> >>> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c129d109-e71b-4884-98e3-cce7b62f0a1en%40googlegroups.com.
