Re: [weewx-user] Mqtt live data

299 views
Skip to first unread message
Message has been deleted

Eric Mears

unread,
Sep 17, 2019, 7:38:10 PM9/17/19
to weewx...@googlegroups.com
I'm seeing this when I use the chrome debugger:

 mqttws31.min.js:36 WebSocket connection to 'ws://  
192.168.86.51:9001/mqtt' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
  

I don't think  192.168.86.51 is right,  mosscreekweather.org is mapping to 162.241.244.37

Did you open port 9001 to the outside world on your router?


Eric


On Tue, Sep 17, 2019 at 2:52 PM K Weaver <p280...@gmail.com> wrote:
I have mqtt up and running with mo errors. 1883 for the port and 9001 for the web socket.

When Im home on the wifi I can connect and get the green flashing dot.
Over the web outside my network it gets the pending connection message.

I can post logs later if needed. I was hoping I was missing something simple.

Mosscreekweather.org/weewx

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8e9d790d-75bd-4fea-b0b2-e34c5555e063%40googlegroups.com.
Message has been deleted
Message has been deleted

K Weaver

unread,
Sep 17, 2019, 11:36:48 PM9/17/19
to weewx...@googlegroups.com
Ok, problem solved. I put my dynamic DNS in the web socket host location and it looks all good now.

On Tue, Sep 17, 2019, 7:54 PM K Weaver <p280...@gmail.com> wrote:
The 162 IP may be my dynamic  dns...

Eric Mears

unread,
Sep 20, 2019, 8:13:36 AM9/20/19
to weewx...@googlegroups.com
It's still not working for me:

WebSocket connection to 'ws://mosscrkmqtt.duckdns.org:9001/mqtt' failed: Error in connection establishment: net::ERR_ADDRESS_UNREACHABLE



$ dig mosscrkmqtt.duckdns.org


; <<>> DiG 9.10.6 <<>> mosscrkmqtt.duckdns.org

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13595

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1


;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 4000

;; QUESTION SECTION:

;mosscrkmqtt.duckdns.org. IN A


;; ANSWER SECTION:

mosscrkmqtt.duckdns.org. 58 IN A 75.190.103.181


;; Query time: 154 msec

;; SERVER: 192.168.0.91#53(192.168.0.91)

;; WHEN: Wed Sep 18 07:01:49 PDT 2019

;; MSG SIZE  rcvd: 68



but I can't open port 9001



$ telnet mosscrkmqtt.duckdns.org 9001

Trying 75.190.103.181...

telnet: connect to address 75.190.103.181: Network is unreachable

telnet: Unable to connect to remote host




Can you confirm port 9001 is open to the outside world and is port forwarding to your weewx computer host?



Eric








Message has been deleted

K Weaver

unread,
Sep 30, 2019, 10:26:05 PM9/30/19
to weewx-user
Hey, its back up and running now. Only thing now it appears to be  flipping between raw data and real time data......


Here is a snippet of the log.  You can really see it flipping back and forth on the site.  


': 1}
Sep 30 19:57:26 raspberrypi weewx[23528]: restx: MQTT: Published record 2019-09-30 19:57:26 EDT (1569887846)
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: ServerThread: GET: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=tower&sensor=00004264&humidity=56&tempf=73.4&baromin=29.31&battery=low&rssi=3
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: MainThread: raw data: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=tower&sensor=00004264&humidity=56&tempf=73.4&baromin=29.31&battery=low&rssi=3
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter realtime=1
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter action=updateraw
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: MainThread: raw packet: {'sensor_type.00004264.24C86E0936CB': 'tower', 'battery.00004264.24C86E0936CB': 1, 'sensor_id.00004264.24C86E0936CB': '00004264', 'dateTime.00004264.24C86E0936CB': 1569887851, 'humidity.00004264.24C86E0936CB': 56.0, 'dateTime': 1569887851, 'temperature.00004264.24C86E0936CB': 73.4, 'pressure.00004264.24C86E0936CB': 29.31, 'rssi.00004264.24C86E0936CB': 75.0, 'bridge_id.00004264.24C86E0936CB': '24C86E0936CB', 'usUnits.00004264.24C86E0936CB': 1, 'usUnits': 1}
Sep 30 19:57:31 raspberrypi weewx[23528]: interceptor: MainThread: mapped packet: {'txBatteryStatus': 1, 'outTemp': 73.4, 'outHumidity': 56.0, 'dateTime': 1569887851, 'pressure': 29.31, 'rxCheckPercent': 75.0, 'usUnits': 1}
Sep 30 19:57:31 raspberrypi weewx[23528]: restx: MQTT: Published record 2019-09-30 19:57:31 EDT (1569887851)
Sep 30 19:57:41 raspberrypi weewx[23528]: interceptor: MainThread: empty queue
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: ServerThread: GET: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=5N1x31&sensor=00000583&windspeedmph=0&winddir=338&rainin=0.00&dailyrainin=0.00&baromin=29.31&battery=normal&rssi=3
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: raw data: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=5N1x31&sensor=00000583&windspeedmph=0&winddir=338&rainin=0.00&dailyrainin=0.00&baromin=29.31&battery=normal&rssi=3
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter realtime=1
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter rainin=0.00
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter action=updateraw
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: raw packet: {'rainfall.00000583.24C86E0936CB': 0.0, 'battery.00000583.24C86E0936CB': 0, 'sensor_id.00000583.24C86E0936CB': '00000583', 'rssi.00000583.24C86E0936CB': 75.0, 'windspeed.00000583.24C86E0936CB': 0.0, 'winddir.00000583.24C86E0936CB': 338.0, 'dateTime': 1569887864, 'pressure.00000583.24C86E0936CB': 29.31, 'usUnits.00000583.24C86E0936CB': 1, 'rain_total.00000583.24C86E0936CB': 0.0, 'bridge_id.00000583.24C86E0936CB': '24C86E0936CB', 'dateTime.00000583.24C86E0936CB': 1569887864, 'sensor_type.00000583.24C86E0936CB': '5N1x31', 'usUnits': 1}
Sep 30 19:57:44 raspberrypi weewx[23528]: interceptor: MainThread: mapped packet: {'txBatteryStatus': 0, 'rain': 0.0, 'dateTime': 1569887864, 'windDir': 338.0, 'pressure': 29.31, 'windSpeed': 0.0, 'rxCheckPercent': 75.0, 'usUnits': 1}
Sep 30 19:57:44 raspberrypi weewx[23528]: restx: MQTT: Published record 2019-09-30 19:57:44 EDT (1569887864)
Sep 30 19:57:46 raspberrypi weewx[23528]: interceptor: ServerThread: GET: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=tower&sensor=00004264&humidity=56&tempf=73.4&baromin=29.31&battery=low&rssi=3
Sep 30 19:57:47 raspberrypi weewx[23528]: interceptor: MainThread: raw data: dateutc=now&action=updateraw&realtime=1&id=24C86E0936CB&mt=tower&sensor=00004264&humidity=56&tempf=73.4&baromin=29.31&battery=low&rssi=3
Sep 30 19:57:47 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter realtime=1
Sep 30 19:57:47 raspberrypi weewx[23528]: interceptor: MainThread: ignored parameter action=updateraw
Sep 30 19:57:47 raspberrypi weewx[23528]: interceptor: MainThread: raw packet: {'sensor_type.00004264.24C86E0936CB': 'tower', 'battery.00004264.24C86E0936CB': 1, 'sensor_id.00004264.24C86E0936CB': '00004264', 'dateTime.00004264.24C86E0936CB': 1569887867, 'humidity.00004264.24C86E0936CB': 56.0, 'dateTime': 1569887867, 'temperature.00004264.24C86E0936CB': 73.4, 'pressure.00004264.24C86E0936CB': 29.31, 'rssi.00004264.24C86E0936CB': 75.0, 'bridge_id.00004264.24C86E0936CB': '24C86E0936CB', 'usUnits.00004264.24C86E0936CB': 1, 'usUnits': 1}
Sep 30 19:57:47 raspberrypi weewx[23528]: interceptor: MainThread: mapped packet: {'txBatteryStatus': 1, 'outTemp': 73.4, 'outHumidity': 56.0, 'dateTime': 1569887867, 'pressure': 29.31, 'rxCheckPercent': 75.0, 'usUnits': 1}
Sep 30 19:57:47 raspberrypi weewx[23528]: restx: MQTT: Published record 2019-09-30 19:57:47 EDT (1569887867)

Pat

unread,
Oct 1, 2019, 3:29:26 PM10/1/19
to weewx-user
Looks like it's down again or you have a firewall issue again. 

WebSocket connection to 'ws://mosscrkmqtt.duckdns.org:9001/mqtt' failed: Unknown reason

K Weaver

unread,
Oct 1, 2019, 6:39:02 PM10/1/19
to weewx...@googlegroups.com
I'm home from work now and reset it.
I'm not sure why it shut down...

--
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+...@googlegroups.com.

Pat

unread,
Oct 1, 2019, 8:07:00 PM10/1/19
to weewx-user
Looks like it's down again - or it's not working externally still
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
Message has been deleted

K Weaver

unread,
Oct 2, 2019, 2:12:49 PM10/2/19
to weewx...@googlegroups.com
for some reason it disconnects every morning around 9 am

On Tue, Oct 1, 2019, 10:18 PM K Weaver <p280...@gmail.com> wrote:
I'm able to pull it up on my phone without WiFi .

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c671c7b2-5fbd-4b98-b26a-607e5ae5530b%40googlegroups.com.

K Weaver

unread,
Oct 2, 2019, 7:32:39 PM10/2/19
to weewx...@googlegroups.com
It's accessable online now if anyone is available to check it out.

Pat

unread,
Oct 2, 2019, 7:51:52 PM10/2/19
to weewx-user
I still think you have something else going on. You posted 18 minutes ago, and I cannot reach it. 

WebSocket connection to 'ws://mosscrkmqtt.duckdns.org:9001/mqtt' failed: Unknown reason



On Wednesday, October 2, 2019 at 7:32:39 PM UTC-4, K Weaver wrote:
It's accessable online now if anyone is available to check it out.

On Wed, Oct 2, 2019, 2:12 PM K Weaver <p28...@gmail.com> wrote:
for some reason it disconnects every morning around 9 am

K Weaver

unread,
Oct 2, 2019, 10:40:33 PM10/2/19
to weewx...@googlegroups.com
10:39 pm Its up. I'm not gonna try to make any edits if anyone wants to check it out.
Sorry about that


To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4ccf1ec8-2adb-4c87-a239-68e5500868a0%40googlegroups.com.

K Weaver

unread,
Oct 3, 2019, 11:40:38 AM10/3/19
to weewx...@googlegroups.com
And checking from work its back down again...😒

Pat

unread,
Oct 3, 2019, 1:25:29 PM10/3/19
to weewx-user
Have you considered trying a free public broker to resolve some of the other issues outlined in this post for the interim? Then once those are fixed you can focus on making your broker stable?



On Thursday, October 3, 2019 at 11:40:38 AM UTC-4, K Weaver wrote:
And checking from work its back down again...😒

K Weaver

unread,
Oct 3, 2019, 2:55:03 PM10/3/19
to weewx...@googlegroups.com
I used cloud but couldn't get the client to connect....

I can't figure out why it shuts down like that around 9 every morning.

It seems like the sub for the client is connecting separately to the raw data and the real time. 

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/40fdcf58-8c8f-4f72-8eb9-3ab343c15ab8%40googlegroups.com.
Message has been deleted

Pat

unread,
Oct 3, 2019, 9:50:46 PM10/3/19
to weewx-user
No, not for mqtt websockets. That's connected to your mosquitto installation and not a webserver like nginx or apache. 

Check your mosquitto logs to see what's happening

On Thursday, October 3, 2019 at 9:45:02 PM UTC-4, K Weaver wrote:
Does it matter if I'm using Apache or nginx?


Message has been deleted

K Weaver

unread,
Oct 5, 2019, 1:43:00 AM10/5/19
to weewx...@googlegroups.com
It appears the two separate readings are coming from weewx a interceptor and my mqtt.

The Mqtt appears to be the most correct. I don't know how to stop interceptor without losing connection to my smart hub.


On Thu, Oct 3, 2019, 10:05 PM K Weaver <p280...@gmail.com> wrote:
Are you able to connect now?

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5d77205b-bbba-43f8-b949-8b5e3d6b8ee0%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages