Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-28 Thread Greg Troxel
Can you explain what you had wrong, so that others can have an idea what
to check?

-- 
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/rmir1ye7mox.fsf%40s1.lexort.com.


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-28 Thread Gert Andersen
Hi

Finally, up and running here with Simulator. Next week time for connecting 
the Davis.
http://sevejret.dk

Just some minor adjustment to the skin, then I'm done. The hardest part was 
to setup the FTP on AWS, but it is working now and all configurations files 
are kept in a safe place!

Configuration:
Raspberry running weewx, weewx mqtt extension and Belchertown skin. The 
skin files are uploaded with ftp every 5 minutes. 

VPS Server: AWS EC2 Instance running Ubuntu 18.04, Mosquitto Broker, Apache 
Webserver  and vsftpd

Many thanks to Greg and Pat who have helped me. I could not have done this 
without your help.

Gert




On Thursday, February 27, 2020 at 6:03:15 PM UTC+1, Gert Andersen wrote:
>
> Hi Greg
>
> Thanks for your time to look into this.
>
> I have a week off next week, so I can start working with your good advises.
>
> I'll get back to give an update.
>
> Rgds
> Gert
>
> On Thursday, February 27, 2020 at 3:37:28 PM UTC+1, Greg Troxel wrote:
>>
>> To answer your other questions in the pdf (probably best to keep text in 
>> plain text): 
>>
>>   As I understand it the belchertown skin, like all others, is run on 
>>   your weewx host and generates html files.  Then, you arrange to 
>>   sftp/rsync these to your web server. 
>>
>>   users load the html page and that has instructions to their browser to 
>>   connect to the broker and get rapid updates.  So the page view in the 
>>   browser is rapidly updating, even though the browser is not reloading 
>>   html and the web server is not getting updated html. 
>>
>>   I see no need to run weewx on the web server.  That's just more 
>>   complexity. 
>>
>>   websocket debugging is another layer of complexity.  But you can test 
>>   with mosquitto_sub with regular sockets 
>>
>>
>>
>>

-- 
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/d205d393-1a22-4c2b-b97c-02e9b0151c50%40googlegroups.com.


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-27 Thread Gert Andersen
Hi Greg

Thanks for your time to look into this.

I have a week off next week, so I can start working with your good advises.

I'll get back to give an update.

Rgds
Gert

On Thursday, February 27, 2020 at 3:37:28 PM UTC+1, Greg Troxel wrote:
>
> To answer your other questions in the pdf (probably best to keep text in 
> plain text): 
>
>   As I understand it the belchertown skin, like all others, is run on 
>   your weewx host and generates html files.  Then, you arrange to 
>   sftp/rsync these to your web server. 
>
>   users load the html page and that has instructions to their browser to 
>   connect to the broker and get rapid updates.  So the page view in the 
>   browser is rapidly updating, even though the browser is not reloading 
>   html and the web server is not getting updated html. 
>
>   I see no need to run weewx on the web server.  That's just more 
>   complexity. 
>
>   websocket debugging is another layer of complexity.  But you can test 
>   with mosquitto_sub with regular sockets 
>
>
>
>

-- 
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/c1771871-ae3c-4018-862e-c70e6c6078ba%40googlegroups.com.


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-27 Thread Greg Troxel
To answer your other questions in the pdf (probably best to keep text in
plain text):

  As I understand it the belchertown skin, like all others, is run on
  your weewx host and generates html files.  Then, you arrange to
  sftp/rsync these to your web server.

  users load the html page and that has instructions to their browser to
  connect to the broker and get rapid updates.  So the page view in the
  browser is rapidly updating, even though the browser is not reloading
  html and the web server is not getting updated html.

  I see no need to run weewx on the web server.  That's just more
  complexity.

  websocket debugging is another layer of complexity.  But you can test
  with mosquitto_sub with regular sockets



-- 
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/rmi8skoayfx.fsf%40s1.lexort.com.


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-27 Thread Greg Troxel
Gert Andersen  writes:

> Sorry, but I'm still fiddling around with the configuration. I  have made a 
> little drawing showing what I'm trying to achieve and also ask some 
> questions.

Please see my previous message about testing with mosquitto_pub and
mosquitto_sub.   I don't think it makes sense to worry about skins and
extra brokers until you can use the test clients and confirm that they
work.

> As mentioned earlier, I have no problems using mqtt, when I'm running weewx 
> (uploading from Ecowitt GW1000) and the broker on the same vps host(no 
> Raspberry). So I have a very basic understanding about mqtt. 

OK, but there is probably some issue with your other config and you will
need to figure out what that is.

> My problems of understanding starts when I separate weewx(Raspberry) and 
> Mosquitto (vps host) and which components on which device.

The broker location should be independent of weewx and even the web
server.  It is completely normal for the broker to be on a different
host than an mqtt client.  I advise strongly against a second local
broker and bridging, until you have the basic setup working and then
only if you can explain why that's a good idea.

So far because you have not shown data from the test clients we have
zero idea of where in the long chain of dataflow you are having
problems.  You should be able to use mosquitto_sub with options -h -p -u
-P (filled in) and subscribe to weather and see the json.  And to use
mosquitto_pub on the pi and send some fake content and see that appear.

Start with pub and sub on the VPS.  Then move the pub to the pi.  Then
move the sub to some other random host.   Then turn on weewx instead of
the pub client, but keep watching with the sub client.  Add only one
thing at a time.  Report back when you have one thing that works and the
next step with *only one change* that fails.

Make sure your VPS has proper DNS entries.

-- 
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/rmimu94azls.fsf%40s1.lexort.com.


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-27 Thread Gert Andersen
Hi

Sorry, but I'm still fiddling around with the configuration. I  have made a 
little drawing showing what I'm trying to achieve and also ask some 
questions.

As mentioned earlier, I have no problems using mqtt, when I'm running weewx 
(uploading from Ecowitt GW1000) and the broker on the same vps host(no 
Raspberry). So I have a very basic understanding about mqtt. 

My problems of understanding starts when I separate weewx(Raspberry) and 
Mosquitto (vps host) and which components on which device.

Gert



On Wednesday, February 26, 2020 at 9:14:03 PM UTC+1, Greg Troxel wrote:
>
> Gert Andersen > writes: 
>
> > One more question. Should I just Mosquitto on vps-host(no weewx) and 
> > uploading the weewx reports? 
>
> on vps-host, you should run the mosquitto daemon. 
>
> on the weewx computer, there is no need for a broker*. 
>
>
>
> * One can run multiple brokers and bridge  them, but I do not recommend 
>   that to anyone who is having the slightest amount of trouble! 
>   
>

-- 
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/1564396f-8632-4549-8e78-37877bb31e8f%40googlegroups.com.


mqtt.pdf
Description: Adobe PDF document


Re: [weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Greg Troxel
Gert Andersen  writes:

> One more question. Should I just Mosquitto on vps-host(no weewx) and 
> uploading the weewx reports?

on vps-host, you should run the mosquitto daemon.

on the weewx computer, there is no need for a broker*.



* One can run multiple brokers and bridge  them, but I do not recommend
  that to anyone who is having the slightest amount of trouble!
  

-- 
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/rmilfopcdj0.fsf%40s1.lexort.com.


[weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Gert Andersen
Hi

One more question. Should I just Mosquitto on vps-host(no weewx) and 
uploading the weewx reports?

Gert

On Wednesday, February 26, 2020 at 9:56:02 AM UTC+1, Gert Andersen wrote:
>
> Hi there
> Is this scenario possible.
>
> Currently I have an Ecowitt GW1000 which sends data to a VPS Server every 
> 16 seconds with Weewx Interceptor, MQTT and Belchertowner installed on the 
> VPS Server. This works fine.
>
> I also have a Davis Vantage Pro2, which is connected to a Meetobridge via 
> Davis USB logger. This also works fine.
>
> Here's my new scenario:
> Davis USB logger connected to rpi/weewx. On rpi/weewx I want to install 
> mqtt with the following content:
>
> [[MQTT]]
> server_url = mqtt: // user: password @ vps_host_name: 1883 /
> topic = weather
> binding = archive, loop
> aggregation = aggregate
> log_success = False
> log_failure = True
>
> On  I have installed Mosquitto which works fine with upload 
> via Interceptor. I want this to be able to upload every 2 seconds.
>
> I have not yet connected Davis to the rpi / weewx. but tried the 
> configuration with Simulator and the above MQTT configuration. Belchertown 
> on  connects fine to MQTT, but is awaiting data. Is it 
> because Simulator does not send data via MQTT or because my configuration 
> is wrong.
>
> Gert
>

-- 
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/fb92f36d-ed50-4842-b039-b4f260c7c492%40googlegroups.com.


[weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Gert Andersen
Hi

Thanks, now I have a starting point.

Gert

On Wednesday, February 26, 2020 at 9:56:02 AM UTC+1, Gert Andersen wrote:
>
> Hi there
> Is this scenario possible.
>
> Currently I have an Ecowitt GW1000 which sends data to a VPS Server every 
> 16 seconds with Weewx Interceptor, MQTT and Belchertowner installed on the 
> VPS Server. This works fine.
>
> I also have a Davis Vantage Pro2, which is connected to a Meetobridge via 
> Davis USB logger. This also works fine.
>
> Here's my new scenario:
> Davis USB logger connected to rpi/weewx. On rpi/weewx I want to install 
> mqtt with the following content:
>
> [[MQTT]]
> server_url = mqtt: // user: password @ vps_host_name: 1883 /
> topic = weather
> binding = archive, loop
> aggregation = aggregate
> log_success = False
> log_failure = True
>
> On  I have installed Mosquitto which works fine with upload 
> via Interceptor. I want this to be able to upload every 2 seconds.
>
> I have not yet connected Davis to the rpi / weewx. but tried the 
> configuration with Simulator and the above MQTT configuration. Belchertown 
> on  connects fine to MQTT, but is awaiting data. Is it 
> because Simulator does not send data via MQTT or because my configuration 
> is wrong.
>
> Gert
>

-- 
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/8da259f5-c933-475a-be67-7b6e01b2f7ff%40googlegroups.com.


[weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Pat
Are the spaces you're adding for the html_root, belchertown root url, and 
mqtt topic intentional for this forum post? If not, remove those extra 
spaces they as they will cause a problem. 

Do you need to run weewx on the vps host? I don't think you need to. weewx 
on your Pi will generate the webpages needed, then it can FTP or SCP those 
files to the VPS host automatically. Then MQTT on vps host will help broker 
the data. So the config you have will go on the weewx.conf on your Pi as 
that information will get processed into the webpage that weewx will build. 

Port 1883 is MQTT's port; not weewx. Read through this post on how to setup 
MQTT  and testing it for valid data 
and see if it helps you understand the difference between the two systems. 

Also read through this post on how weewx transfers 
the
 
generated webpages to the remote web server (your vps)

On Wednesday, February 26, 2020 at 9:40:22 AM UTC-5, Gert Andersen wrote:
>
> Hi
>
> Thanks for your answer, I'll try that.
>
> I'm a little bit unsure about  the configuration and whether it's right.
>
> On the rpi / weewx I have installed the weewx / mqtt extension to send 
> data on port 1883.
>
> On vps_host I have installed weewx as well as Belchertown. I'm not 
> expecting to install weewx / mqtt here. This is what my weewx.conf looks 
> like on the vps_host:
>
> [[Belchertown]]
>  HTML_ROOT = / var / www / html
>  skin = Belchertown
>  [[[Extras]]]
>  belchertown_root_url = http: // My Server
>  earthquake_enabled = 1
>  forecast_enabled =
>  mqtt_websockets_enabled = 1
>  mqtt_websockets_host = xxx-xxx-xxx-xxx.vpsCloudServer
>  mqtt_websockets_port = 9001
>  mqtt_websockets_ssl = 0
>  mqtt_websockets_topic = weather / loop
>  disconnect_live_website_visitor = 180
>
> My question is also which weewx driver to install on the vps_host. In 
> principle, weewx should only receive data via port 1883 and not use any 
> driver (Vantage, etc) or am I wrong on it
>
> Gert
>
> On Wednesday, February 26, 2020 at 2:11:10 PM UTC+1, Pat wrote:
>>
>> Belchertown should get data as soon as there is a dateTime in the MQTT 
>> payload. Simulator should send this. What you have looks correct, but more 
>> validating needs to take place. Use another client to connect to the MQTT 
>> broker to validate you're seeing any data at all therethere. 
>>
>> Or run Belchertown in debug mode and check the Chrome logs to see what it 
>> says. To run debug, add /?debug=true to the end of your site, like 
>> https://belchertownweather.com/?debug=true - then open the Chrome 
>> console by going to Settings > More Tools > Developer Tools and open the 
>> Console tab. Almost everything the skin is doing is viewable in this debug 
>> mode, from chart generation to any and all MQTT payload data it's seeing.
>>
>>
>>
>> On Wednesday, February 26, 2020 at 3:56:02 AM UTC-5, Gert Andersen wrote:
>>>
>>> Hi there
>>> Is this scenario possible.
>>>
>>> Currently I have an Ecowitt GW1000 which sends data to a VPS Server 
>>> every 16 seconds with Weewx Interceptor, MQTT and Belchertowner installed 
>>> on the VPS Server. This works fine.
>>>
>>> I also have a Davis Vantage Pro2, which is connected to a Meetobridge 
>>> via Davis USB logger. This also works fine.
>>>
>>> Here's my new scenario:
>>> Davis USB logger connected to rpi/weewx. On rpi/weewx I want to install 
>>> mqtt with the following content:
>>>
>>> [[MQTT]]
>>> server_url = mqtt: // user: password @ vps_host_name: 1883 /
>>> topic = weather
>>> binding = archive, loop
>>> aggregation = aggregate
>>> log_success = False
>>> log_failure = True
>>>
>>> On  I have installed Mosquitto which works fine with 
>>> upload via Interceptor. I want this to be able to upload every 2 seconds.
>>>
>>> I have not yet connected Davis to the rpi / weewx. but tried the 
>>> configuration with Simulator and the above MQTT configuration. Belchertown 
>>> on  connects fine to MQTT, but is awaiting data. Is it 
>>> because Simulator does not send data via MQTT or because my configuration 
>>> is wrong.
>>>
>>> Gert
>>>
>>

-- 
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/0a6aee91-aad4-45a6-b692-ca17e268e1a1%40googlegroups.com.


[weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Gert Andersen
Hi

Thanks for your answer, I'll try that.

I'm a little bit unsure about  the configuration and whether it's right.

On the rpi / weewx I have installed the weewx / mqtt extension to send data 
on port 1883.

On vps_host I have installed weewx as well as Belchertown. I'm not 
expecting to install weewx / mqtt here. This is what my weewx.conf looks 
like on the vps_host:

[[Belchertown]]
 HTML_ROOT = / var / www / html
 skin = Belchertown
 [[[Extras]]]
 belchertown_root_url = http: // My Server
 earthquake_enabled = 1
 forecast_enabled =
 mqtt_websockets_enabled = 1
 mqtt_websockets_host = xxx-xxx-xxx-xxx.vpsCloudServer
 mqtt_websockets_port = 9001
 mqtt_websockets_ssl = 0
 mqtt_websockets_topic = weather / loop
 disconnect_live_website_visitor = 180

My question is also which weewx driver to install on the vps_host. In 
principle, weewx should only receive data via port 1883 and not use any 
driver (Vantage, etc) or am I wrong on it

Gert

On Wednesday, February 26, 2020 at 2:11:10 PM UTC+1, Pat wrote:
>
> Belchertown should get data as soon as there is a dateTime in the MQTT 
> payload. Simulator should send this. What you have looks correct, but more 
> validating needs to take place. Use another client to connect to the MQTT 
> broker to validate you're seeing any data at all therethere. 
>
> Or run Belchertown in debug mode and check the Chrome logs to see what it 
> says. To run debug, add /?debug=true to the end of your site, like 
> https://belchertownweather.com/?debug=true - then open the Chrome console 
> by going to Settings > More Tools > Developer Tools and open the Console 
> tab. Almost everything the skin is doing is viewable in this debug mode, 
> from chart generation to any and all MQTT payload data it's seeing.
>
>
>
> On Wednesday, February 26, 2020 at 3:56:02 AM UTC-5, Gert Andersen wrote:
>>
>> Hi there
>> Is this scenario possible.
>>
>> Currently I have an Ecowitt GW1000 which sends data to a VPS Server every 
>> 16 seconds with Weewx Interceptor, MQTT and Belchertowner installed on the 
>> VPS Server. This works fine.
>>
>> I also have a Davis Vantage Pro2, which is connected to a Meetobridge via 
>> Davis USB logger. This also works fine.
>>
>> Here's my new scenario:
>> Davis USB logger connected to rpi/weewx. On rpi/weewx I want to install 
>> mqtt with the following content:
>>
>> [[MQTT]]
>> server_url = mqtt: // user: password @ vps_host_name: 1883 /
>> topic = weather
>> binding = archive, loop
>> aggregation = aggregate
>> log_success = False
>> log_failure = True
>>
>> On  I have installed Mosquitto which works fine with 
>> upload via Interceptor. I want this to be able to upload every 2 seconds.
>>
>> I have not yet connected Davis to the rpi / weewx. but tried the 
>> configuration with Simulator and the above MQTT configuration. Belchertown 
>> on  connects fine to MQTT, but is awaiting data. Is it 
>> because Simulator does not send data via MQTT or because my configuration 
>> is wrong.
>>
>> Gert
>>
>

-- 
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/88d7e7e7-e4f9-41d6-8dd0-6a6dc05ab112%40googlegroups.com.


[weewx-user] Re: Raspberry/MQTT > VPS Server

2020-02-26 Thread Pat
Belchertown should get data as soon as there is a dateTime in the MQTT 
payload. Simulator should send this. What you have looks correct, but more 
validating needs to take place. Use another client to connect to the MQTT 
broker to validate you're seeing any data at all therethere. 

Or run Belchertown in debug mode and check the Chrome logs to see what it 
says. To run debug, add /?debug=true to the end of your site, like 
https://belchertownweather.com/?debug=true - then open the Chrome console 
by going to Settings > More Tools > Developer Tools and open the Console 
tab. Almost everything the skin is doing is viewable in this debug mode, 
from chart generation to any and all MQTT payload data it's seeing.



On Wednesday, February 26, 2020 at 3:56:02 AM UTC-5, Gert Andersen wrote:
>
> Hi there
> Is this scenario possible.
>
> Currently I have an Ecowitt GW1000 which sends data to a VPS Server every 
> 16 seconds with Weewx Interceptor, MQTT and Belchertowner installed on the 
> VPS Server. This works fine.
>
> I also have a Davis Vantage Pro2, which is connected to a Meetobridge via 
> Davis USB logger. This also works fine.
>
> Here's my new scenario:
> Davis USB logger connected to rpi/weewx. On rpi/weewx I want to install 
> mqtt with the following content:
>
> [[MQTT]]
> server_url = mqtt: // user: password @ vps_host_name: 1883 /
> topic = weather
> binding = archive, loop
> aggregation = aggregate
> log_success = False
> log_failure = True
>
> On  I have installed Mosquitto which works fine with upload 
> via Interceptor. I want this to be able to upload every 2 seconds.
>
> I have not yet connected Davis to the rpi / weewx. but tried the 
> configuration with Simulator and the above MQTT configuration. Belchertown 
> on  connects fine to MQTT, but is awaiting data. Is it 
> because Simulator does not send data via MQTT or because my configuration 
> is wrong.
>
> Gert
>

-- 
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/1ae4cc59-a13d-42c8-a31e-c2c0a066af42%40googlegroups.com.