Gert Andersen <gert.ander...@gmail.com> writes:

> @Pat, i don't know there are spaces, The mqtt configuration is working fine 
> with Ecowitt GW1000 uploading data to the VPS server using Interceptor.I'll 
> ty the configuration you mention with uploading via ftp. Will I not miss 
> the real-time data every 2 seconds?

The spaces look bizarre in the url.  try dropping them.

> @Greg, seems you're running the system I'm looking after. Is it possible to 
> provide .conf for the weewx and the mqtt broker. Is far as I can see, the 
> only difference is you're running the system on your lan and I'm running 
> the weewx/Davis on the lan and the mqtt broker on cloud.

I can't send the exact mosquitto config since it has a bunch of acls
etc, and it ends up being huge and too hard to sanitize.

In weewx, I have the following, which is pretty much like what you have
except:

 - it lacks the spurious spaces [this could be a huge issue]
 - I am not sending loop
 - I use TLS
 - I fix the pressure units from FF to SI
 - I round dewpoints to 1 decimal (don't remember why clearly but surely they
   are being computed and not rounded from temp/%humidity)

----------------------------------------
[[MQTT]]
        server_url = 
mqtt://user:passw...@fully.qualified.domain.example.com:8883/
        topic = weather/someplace
        aggregation = aggregate
        retain = True
        [[[tls]]]
            ca_certs = /etc/openssl/certs/ca-certificates.crt
        [[[inputs]]]
            [[[[barometer]]]]
                name = barometer_hPa
                units = hPa
            [[[[altimeter]]]]
                name = altimeter_hPa
                units = hPa
            [[[[pressure]]]]
                name = pressure_hPa
                units = hPa
            [[[[dewpoint]]]]
                format = %.1f
            [[[[inDewpoint]]]]
                format = %.1f
----------------------------------------

You should be aware that with mosquitto, if a write to a topic is not
permitted by acls, it just doesn't happen, and it's hard to debug.

To debug this, you should break it into pieces.

On your VPS, use mosquitto_pub and mosquitto_sub to publish and receive
someting (junk text is fine) to the topic you want to use, using hte
credentials you will use to publish and subscribe.  Get that working;
it's all about mosquitto and not about weewx at all.  Read the docs
about acls.  Crank up debug levels if it doesn't work.

>From the RPI, use telnet to the server and port 1883 (using the same
name you put int he config).  Use both the -4 and -6 options if you have
an AAAA record for vps_host_name.  If vps_host_name isn't a valid DNS
name and is in some host file, check extra carefully from the RPI about
this.

Then, install mosquitto on your RPI, even if you don't need it
otherwise.  Repeat with mosquitto_pub on the RPI, with mosquitto_sub
running on the VPS.  Then, if you want to subscribe from elsewhere, try
that.

Finally, start up weewx.  Run tcpdump on port 1883 and see if you see
things.  Enable debugging on your broker and watch the logs.

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/rmitv3dcf4z.fsf%40s1.lexort.com.

Reply via email to