Vince, some thoughts on your config:

   - Looks good, I like the layout and the commentary. 
   - Is your [[MQTT]] Broker really on port 8813, or is that a typo for 
   1883?
   - Set your mqtt_websockets_topic to weather/loop
   - This is because weewx-mqtt will publish loop data to the topic 
      {[[MQTT]].topic}/loop
   
------------------------

For others who may happen upon here from Google, some brief explanations. 

Out of the box the skin has 4 Highcharts examples that are working with 
basic charts from the database. Some of the other configs are disabled on 
purpose since they're optional.

To enable forecasts 
<https://github.com/poblabs/weewx-belchertown#forecast-options>for a 
baseline config you'll need a free DarkSky API key <https://darksky.net/dev>, 
and the following Extras config:

            forecast_enabled = 1
            darksky_secret_key = SECRET_KEY_HERE


To enable earthquake data 
<https://github.com/poblabs/weewx-belchertown#earthquake-options> as a 
baseline config, add the following Extras config

            earthquake_enabled = 1


MQTT Websockets have always been optional 
<https://github.com/poblabs/weewx-belchertown#mqtt-and-mqtt-websockets-optional>
 
because I think the skin should work as a basic skin out of the box (and 
there's a slight learning curve to MQTT and MQTT Websockets). Having a 
working MQTT broker with Websockets enabled is sort-of out of the scope of 
the skin's documentation, but I cover a small how-to on my blog 
<https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/> if you want to 
host your own. There's free public brokers as well. 

You also need the weewx-mqtt extension 
<https://github.com/weewx/weewx/wiki/mqtt> installed and working (also a 
bit outside the scope of the skin's documentation since that's mwall's 
extension). My config is below as a reference.

To enable the skin's MQTT Websockets 
<https://github.com/poblabs/weewx-belchertown#mqtt-websockets-for-real-time-streaming-options>
 
as a baseline config, add the following Extras config:

            mqtt_websockets_enabled = 1
            mqtt_websockets_host = YOUR_HOST
            mqtt_websockets_port = 9001 (OR WHATEVER YOUR BROKER WEBSOCKETS 
PORT IS)
            mqtt_websockets_ssl = 0 (IF YOU ARE USING SSL, THEN SET TO 1)
            mqtt_websockets_topic = weather/loop (SET TO YOUR TOPIC'S /LOOP 
TOPIC)

-------

Here's my weewx-mqtt configuration from weewx.conf:

    [[MQTT]]
        server_url = mqtt://mybroker:1883/
        topic = weather
        unit_system = US
        binding = archive, loop
        aggregation = aggregate


To test that your MQTT Websockets are working (and it's not a skin 
problem), you can use this tool <https://hobbyquaker.github.io/mqtt-admin/> 
which will try to connect to your MQTT Broker. Once connected, subscribe to 
your topic (e.g. weather/loop) and you shoul dsee data flowing in. If this 
tool fails then re-check your weewx-mqtt config and/or your broker 
settings. 

Remember, if you are hosting your own Mosquitto it is VERY picky. Any rogue 
spacing at the end of the line or any spaces in empty lines will all cause 
it to fail. Also I've found quirky situations where a reboot is the only 
way to "fix" Mosquitto. 



On Saturday, June 1, 2019 at 10:04:19 PM UTC-4, vince wrote:
>
> Pat - this thing has a lot of moving parts.  One thing that would help 
> (me) is a *known-good minimal example* with 
> forecast/earthquake/highcharts/mqtt-realtime all working after a little 
> light editing to set the urls etc. to match our site.   There are so many 
> places where we're assumed to know how to set the configurable items 
> correctly.  It's not totally obvious if you haven't been there before.
>
> I'm basically stuck at 'Connected. Waiting for data.' although in some of 
> my many stop/edit/restart iterations it seemed like it was getting data, 
> although the screens never updated with changed data.   Setting 
> belchertown_debug did nothing that I could tell, although I don't know 
> where it writes debugging stuff so I might not have been looking in the 
> right place.
>
> Here's what I have for snippets of the pieces.  All software runs on the 
> same host.
>
> Should these work as-is and have realtime data working etc. ????
>
> I've omitted my DarkSky api key below (of course), but that part worked 
> fine.
> It's the realtime stuff that doesn't seem to be working as far as I can 
> tell....
>
>
> #------------------------------------------
> #
> # /etc/mosquitto/conf.d/highcharts.conf
>
>      # 
>      #     mosquitto 'is' listening on both ports sayeth netstat 
>      #
>  
>
> listener 1883
> protocol mqtt
>
> listener 9001
> protocol websockets
>
>
> #------------------------------------------
> #
> # weewx.conf MQTT extension section
>
>      #
>      # not sure server_url below is correct for websockets 
>
>  
>
>
> [[MQTT]]
>     #---- MQTT broker URL to publish to
>     server_url = mqtt://localhost:8813
>
>          # server_url = wss://localhost:9001    <== or should it be this ?
>  
>
>     #---- MQTT topic to publish to
>     topic = weather
>
>     #---- make sure you bind to 'archive, loop' with aggregation
>     binding = archive, loop
>     aggregation = aggregate
>
>
> #------------------------------------------
> #
> # weewx.conf Belchertown section
> #
>
> [[Belchertown]]
>     HTML_ROOT = public_html
>     skin = Belchertown
>
>     [[[Extras]]]
>
>         #--------------- General Options 
> -----------------------------------------
>
>         #--- debugging this skin (optional)
>         belchertown_debug = 1                                   # default 
> = 1
>
>         #---- root_url for this skin (mandatory)
>         belchertown_root_url = http://localhost                 # no 
> trailing slash
>
>         #---- HighCharts (optional)
>         highcharts_enabled = 1                                  # default 
> = 0
>
>         #--------------- MQTT Websockets (optional) 
> -------------------------------
>
>         mqtt_websockets_enabled = 1                             # default 
> = 0
>         mqtt_websockets_host = localhost                        # default 
> = ""
>         mqtt_websockets_port = 9001                             # default 
> = 8080
>         mqtt_websockets_topic = "weather"                       # default 
> = ""
>
>         #--------------- Forecast Options (optional) 
> ------------------------------
>
>         forecast_enabled = 1                                    # default 
> = 0
>         darksky_secret_key = 12345678901234567890123456789012   # default 
> = ""
>
>         #--------------- Earthquake Options (optional) 
> ----------------------------
>         earthquake_enabled = 1                                  # default 
> = 0
>
>
>

-- 
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/f117ca5d-5102-44d4-9122-3499befa3b5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to