Just to confirm I have highlighted in Red what you need to change to make
an https site work with test.mosquitto.org I couldn't get the colouring to
work properly above.......
mqtt_port = 8081 instead of 8080
mqtt_ssl = 1 (instead of 0)
Let me know how you get on - if necessary I can spin up a Pi rig for you to
use as a test - but the test.mosquitto.org should work without problems -
certainly works for me - I have just tested it under an https website
request.
Let me know either way.
All the best,
Dave.
Skin.conf
# MQTT Defaults
mqtt_enabled = 1
mqtt_host = "test.mosquitto.org"
mqtt_port = 8081
mqtt_ssl = 1
mqtt_topic = "weather/41south/#"
disconnect_live_website_visitor = 1800000
On Wednesday, 5 September 2018 08:25:07 UTC+1, [email protected]
wrote:
>
> Just ‘jumping in’ to this thread and I think I can see where the problem
> lies.
>
>
> Collins website appears to be using http
>
> G Hammer’s website appears to be using http*s*
>
>
> The instructions that Collin gave are correct and valid for an http site,
> that is one not using SSL.
>
>
> If you use those instructions, that is the MQTT configuration, on an SSL
> site, it will do exactly what you are describing, that is hang continuously
> stating ‘Connecting to weather station data’. This is by design, as an SSL
> website cannot and will not process non-SSL data.
>
>
> Solutions?
>
>
> 1. Simply access your website using http only and it will work with
> the unedited config. Be careful here though, as most modern browsers will
> automatically default to https once they ‘have seen’ a valid https
> connection for a domain, so you may need to clear the cache/history of the
> chosen browser to make it work, if you have already visited the website
> via
> https
> 2. Simply for test, change the config details that Collin kindly
> provided, with two subtle changes to direct the client to use secure
> websockets and a secure port, thus:
>
> Edited reproduction of Collin’s config – changes to port number and SSL = 1
>
> [[MQTT]]
> #This section is for the MQTT service setup
> server_url = mqtt://test.mosquitto.org:1883/
> topic = weather/41south
> unit_system = METRIC
> binding = archive, loop
> aggregation = aggregate
>
>
> Skin.conf
>
>
> # MQTT Defaults
> mqtt_enabled = 1
> mqtt_host = "test.mosquitto.org"
> mqtt_port = 8081
> mqtt_ssl = 1
> mqtt_topic = "weather/41south/#"
> disconnect_live_website_visitor = 1800000
>
> The Mosquitto documentation refers:
>
> https://test.mosquitto.org/
>
> <https://test.mosquitto.org/>
> Hope this helps - all the best,
>
>
> Dave.
>
>
>
>
> On Wednesday, 5 September 2018 04:42:36 UTC+1, G Hammer wrote:
>>
>> As a ‘known good’ I will try if my data fails.
>>
>>
>> On Tue, Sep 4, 2018 at 11:41 PM Colin Larsen <[email protected]> wrote:
>>
>>> I guess as another test if needed, you could just connect to my feed and
>>> read my data into your page too
>>>
>>> On Wed, Sep 5, 2018 at 3:40 PM G Hammer <[email protected]> wrote:
>>>
>>>> Yep, I’ll just swap to the test server.
>>>> Thanks
>>>>
>>>> On Tue, Sep 4, 2018 at 11:38 PM Colin Larsen <[email protected]>
>>>> wrote:
>>>>
>>>>> You may need to change unit_system to match yours is all
>>>>>
>>>>> On Wed, 5 Sep 2018, 15:25 G Hammer, <[email protected]> wrote:
>>>>>
>>>>>> Thanks.
>>>>>> I’ll swap to test tomorrow.
>>>>>>
>>>>>>
>>>>>> It’s always something...
>>>>>>
>>>>>>
>>>>>> On Tue, Sep 4, 2018 at 11:01 PM Colin Larsen <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Here's mine that work fine
>>>>>>>
>>>>>>>
>>>>>>> Weewx.conf
>>>>>>>
>>>>>>> [[MQTT]]
>>>>>>>
>>>>>>> #This section is for the MQTT service setup
>>>>>>>
>>>>>>> server_url = mqtt://test.mosquitto.org:1883/
>>>>>>>
>>>>>>> topic = weather/41south
>>>>>>>
>>>>>>> unit_system = METRIC
>>>>>>>
>>>>>>> binding = archive, loop
>>>>>>>
>>>>>>> aggregation = aggregate
>>>>>>>
>>>>>>> Skin.conf
>>>>>>>
>>>>>>>
>>>>>>> # MQTT Defaults
>>>>>>>
>>>>>>> mqtt_enabled = 1
>>>>>>>
>>>>>>> mqtt_host = "test.mosquitto.org"
>>>>>>>
>>>>>>> mqtt_port = 8080
>>>>>>>
>>>>>>> mqtt_ssl = 0
>>>>>>>
>>>>>>> mqtt_topic = "weather/41south/#"
>>>>>>>
>>>>>>> disconnect_live_website_visitor = 1800000
>>>>>>>
>>>>>>> On Wed, Sep 5, 2018 at 2:31 PM G Hammer <[email protected]> wrote:
>>>>>>>
>>>>>>>> I can say that my mosquitto install is not using websockets.
>>>>>>>> With mqtt-spy on the server, I can set it up for either default or
>>>>>>>> websockets.
>>>>>>>> Default works fine, websockets does not.
>>>>>>>> Though only item I changed in the mosquitto.conf is protocol
>>>>>>>> websockets
>>>>>>>>
>>>>>>>> So, stumped. Anyone have a working mosquitto install that they
>>>>>>>> would share the conf?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tuesday, September 4, 2018 at 5:53:18 PM UTC-4, Pat wrote:
>>>>>>>>>
>>>>>>>>> On second glance, use this tool instead.
>>>>>>>>> http://mitsuruog.github.io/what-mqtt/ since it can support SSL
>>>>>>>>> brokers (even though it's not documented). Maybe I should setup my
>>>>>>>>> own
>>>>>>>>> websocket test tool? :)
>>>>>>>>>
>>>>>>>>> If your MQTT is setup with SSL, then you'll want to connect to
>>>>>>>>> secure websockets with WSS. Otherwise it'll use normal websockets
>>>>>>>>> which is
>>>>>>>>> ws.
>>>>>>>>>
>>>>>>>>> Example: wss://your.broker.com:port for secure. Then subscribe to
>>>>>>>>> your topic and see if its working
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tuesday, September 4, 2018 at 5:44:14 PM UTC-4, Pat wrote:
>>>>>>>>>>
>>>>>>>>>> The skin - at its core - will show the data from the previous
>>>>>>>>>> archive. Once connected it'll update those fields from the MQTT
>>>>>>>>>> messages.
>>>>>>>>>>
>>>>>>>>>> The MQTT will show "connected" in the status bar once it gets a
>>>>>>>>>> timestamp from the published message.
>>>>>>>>>>
>>>>>>>>>> Check to make sure your broker allows websockets. To validate you
>>>>>>>>>> can use this test tool.
>>>>>>>>>> http://www.hivemq.com/demos/websocket-client/
>>>>>>>>>>
>>>>>>>>>> If that test tool works, make sure your config options are
>>>>>>>>>> correct.
>>>>>>>>>>
>>>>>>>>>> Anything in the Chrome console log?
>>>>>>>>>>
>>>>>>>>>> On Tuesday, September 4, 2018 at 4:53:08 PM UTC-4, G Hammer wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Colin,
>>>>>>>>>>>
>>>>>>>>>>> I don't think the problem is with sending or retrieving data
>>>>>>>>>>> from the MQTT server, I have done both the test.mosquitto.org
>>>>>>>>>>> and then installed mosquitto on my server.
>>>>>>>>>>> I used MQTT.fx to subscribe to both and both are getting the
>>>>>>>>>>> data.
>>>>>>>>>>> The skin is getting data as it shows the temp, humidity, wind,
>>>>>>>>>>> but never shows a connection and never completes the main page.
>>>>>>>>>>> Graphs on
>>>>>>>>>>> the page are missing/blank but shown on the Graphs page.
>>>>>>>>>>>
>>>>>>>>>>> You can better understand the issue by visiting the site. After
>>>>>>>>>>> you are there for 30 seconds or so, refresh the page and see that
>>>>>>>>>>> the data
>>>>>>>>>>> has changed.
>>>>>>>>>>> My Weather Site <https://ghammer.net/weather/>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>> 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].
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to a topic in
>>>>>>> the Google Groups "weewx-user" group.
>>>>>>> To unsubscribe from this topic, visit
>>>>>>> https://groups.google.com/d/topic/weewx-user/81PjpX0Ajas/unsubscribe
>>>>>>> .
>>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>>> [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>>
>>>>>>> --
>>>>>> 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].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "weewx-user" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/weewx-user/81PjpX0Ajas/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>>> --
>>>> 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].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/weewx-user/81PjpX0Ajas/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
--
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].
For more options, visit https://groups.google.com/d/optout.