Weewx to mqtt

166 views
Skip to first unread message

Wifi75

unread,
Apr 8, 2020, 3:19:40 AM4/8/20
to weewx-user
Hello I have installdet plugin for sent info to my broker server But I have only one question :
what should I write in the engine section? 
it's not clear to me ...


Cattura.JPG

Greg from Oz

unread,
Apr 8, 2020, 5:14:40 AM4/8/20
to weewx-user
Yes that looks correct.

You also need this in bold as well.

It's under 
#   This section is for uploading data to Internet sites

[StdRESTful]
    
 [[StationRegistry]]
        # To register this weather station with weewx, set this to true
        register_this_station = true
    



    [[MQTT]]
        server_url = mqtt://192.168.0.164:1883/
        topic = weather                                               (your weather topic)
        unit_system = METRIC
        binding = loop
#only log fails not success
#        log_success = false

Wifi75

unread,
Apr 8, 2020, 9:53:36 AM4/8/20
to weewx-user
after these changes it no longer connects to the broker ...
while before he connected but then disconnected
Message has been deleted

Wifi75

unread,
Apr 8, 2020, 10:18:13 AM4/8/20
to weewx-user


Il giorno mercoledì 8 aprile 2020 09:19:40 UTC+2, Wifi75 ha scritto:
Cattura.JPG

Greg from Oz

unread,
Apr 8, 2020, 7:01:35 PM4/8/20
to weewx-user
Mine looks like this:
Apr  9 08:55:44 jed164 weewx[18834]: restx: AWEKAS: Posting not enabled.
Apr  9 08:55:44 jed164 weewx[18834]: engine: Finished loading service weewx.restx.StdAWEKAS
Apr  9 08:55:44 jed164 weewx[18834]: engine: Loading service user.mqtt.MQTT
Apr  9 08:55:44 jed164 weewx[18834]: restx: MQTT: service version is 0.19
Apr  9 08:55:44 jed164 weewx[18834]: restx: MQTT: binding to loop
Apr  9 08:55:44 jed164 weewx[18834]: manager: Daily summary version is 2.0
Apr  9 08:55:44 jed164 weewx[18834]: restx: MQTT: topic is jedwood/raw/weather
Apr  9 08:55:44 jed164 weewx[18834]: restx: MQTT: desired unit system is METRIC
Apr  9 08:55:44 jed164 weewx[18834]: restx: MQTT: data will be uploaded to mqtt://192.168.0.164:1883/
Apr  9 08:55:44 jed164 weewx[18834]: engine: Finished loading service user.mqtt.MQTT
Apr  9 08:55:44 jed164 weewx[18834]: engine: Loading service weewx.engine.StdPrint
Apr  9 08:55:44 jed164 weewx[18834]: engine: Finished loading service weewx.engine.StdPrint
Apr  9 08:55:44 jed164 weewx[18834]: engine: Loading service weewx.engine.StdReport
Apr  9 08:55:44 jed164 weewx[18834]: engine: Finished loading service weewx.engine.StdReport
Apr  9 08:55:44 jed164 weewx[18834]: engine: Starting up weewx version 3.9.2

I don't have a password on my mqtt broker.


[StdRESTful]
    ...
    [[MQTT]]
        server_url = mqtt://username:password@localhost:1883/
        topic = weather
        unit_system = METRIC
[Engine]
    [[Services]]
        restful_services = ..., user.mqtt.MQTT
  1. Restart weewx
sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start

Wifi75

unread,
Apr 9, 2020, 3:53:15 AM4/9/20
to weewx-user
hello, I have password on my broker and work with aother devices...

se the logo of my broker... 192.168.1.60 it is my weewx server:

below my configuration... it's ok?

    [[MQTT]]
        server_url = mqtt://my_user:myp...@192.168.1.52:1883
topic = weewx
        unit_system = METRIC
binding = loop


##############################################################################

#   This section configures the internal weewx engine.

[Engine]
    
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = ,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS, user.mqtt.MQTT
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport



Il giorno mercoledì 8 aprile 2020 09:19:40 UTC+2, Wifi75 ha scritto:
WEEWX.PNG

Greg from Oz

unread,
Apr 9, 2020, 5:12:59 AM4/9/20
to weewx-user
Is the mosquitto broker IP 192.168.1.60?

If so why do you have this IP in the url 192.168.1.52 ? It should be the IP of the mosquitto broker.



On Thursday, 9 April 2020 17:53:15 UTC+10, Wifi75 wrote:
hello, I have password on my broker and work with aother devices...

se the logo of my broker... 192.168.1.60 it is my weewx server:

below my configuration... it's ok?

    [[MQTT]]
        server_url = mqtt://my_user:mypassw@192.168.1.52:1883
topic = weewx
        unit_system = METRIC
binding = loop

Greg from Oz

unread,
Apr 10, 2020, 8:59:12 PM4/10/20
to weewx-user
Is it working now?

Wifi75

unread,
Apr 11, 2020, 2:38:25 AM4/11/20
to weewx-user
Yes now work, 
since I send the mqtt data to hassio I also had to create the sensors by hand. now everything works perfectly!

I have an ecowit GW1000 weather station with additional sensors WH51 WIFI Weather Sensor Series - Soil Moisture Sensor how should I search for them in  mqtt or weewx?
Reply all
Reply to author
Forward
0 new messages