-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT Websocket behind Firewall #45
Comments
Your understanding is correct. If you use MQTT and Websockets the website will update the front page in real time. Every weewx archive interval (weewx defaults to 5 minutes), the graphs will also update automatically. Your firewall will need to allow a port to the broker behind the firewall. This is dependent on your own situation at home, at the provider, whatever your case is. If you opt to NOT use MQTT, or MQTT broker is offline or unreachable, the website will function as a static website which is updated every weewx archive interval (weewx defaults to every 5 mins). You will need to refresh the page manually to see the updated information. |
Hi, I still have troubles with MQTT. I have the following config in weewx:
The MQTT broker runs on my LAN and is also configured with "annonymous = true" If I use hiveMQTT Test-Page, I can connect to the MQTT Websocket, just by adding IP, no user and password. I can also subscribe to the topics and I am getting the updates. But the skin is says "Connecting to weather station real time data." and not "connected". Br, |
Sorry, I'm confused. It looks like you're referencing an issue with the MQTT extension? I didn't write the extension, so you may be best to ask the forums about that if you're having trouble. You need to make sure your broker can handle websockets for the skin to work. The skin would connect to the websockets port that you have setup. I've written a general guide on setting up MQTT at https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/ - have you read this? It's referenced in the readme on this github repo. |
Hi, I think my description was very bad, excuse me, I will try it again:
One question is about the mqtt_topic, maybe this is what is breaking my config: My weewx is publishing to "weather", I tried with mqtt_topic = weather as well as with mqtt_topic = weather/# Br, |
Are you using the belchertown skin ? |
Yes |
Under.......
|
This of course only applies if you followed https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/ |
The "loop" could be a good hint, I will give it a try. Thanks, |
Somehow I am not getting it working. I tried now again with the following procedure:
If I now activate again the MQTT Support for the Skin with the following extras, then I only see "connecting to..." on the webpage and the values are not updating.
I have no idea where the issue could be,... |
I think I know now why it is not working. I have setup MQTT and Websocket without SSL and Google is complaining on that. |
Makes sense if your website is https.
…On Sat, Feb 2, 2019, 10:21 AM ebnerjoh ***@***.***> wrote:
I think I know now why it is not working.
I have setup MQTT and Websocket without SSL and Google is complaining on
that.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADUsZwi9MwsIz542NtsfEsSZRCBnb3ihks5vJazqgaJpZM4aIEuf>
.
|
I think I got it now working. I was setting up an NGINX ReverseProxy with Letsencrypt with the following options:
So on my public IP I am listening on 443, nginx+letsencrypt is enabling SSL and then the connection is forwared to my MQTT Websocket on 9001. So far it seems that it is working and also solving my issue, when the client is behind a Firewall which only allows 443 and not 9001. But I still have two comments:
Br, |
Great news! (Off-topic I recently started playing with sslh which is a traffic manager for 443 so you can have multiple things on the same port - sounds like you're sort of the same path as that.)
But, some public brokers may not allow anonymous access, and require you to make a readonly account for your topics. So, according to this link, it should be doable. I'd have to investigate making it an option for the skin since not everyone may require it. |
Item 1 is all set and is in the beta test for 0.9. Keep an eye on the Releases page for when 0.9 is released. Hoping to wrap it up in the next few days. |
Hi,
This is not a general issue but more a question on the MQTT Websocket topic.
If I understood it correctly, then I could get an automated updated website (current values, not graphs) when using MQTT, correct?
e.g.: there are MQTT Services available, but they are all listening on ports like 8000 or 9001.
If I am correct then your SKIN will not be able to connect to those Brokers, when the firewall of the network (where the client is connected to) only allows 443 outgoing?
Is there a fallback possible like manual refresh or using html refresh instead MQTT?
Br,
Johannes
The text was updated successfully, but these errors were encountered: