Hi all,

i am struggling with the configuration of the MQTT Subscriber from 
bellrichm.
Ok is the remote station with the DP1500, a customized skin an an MQTT 
Publish.

    [[MQTT]]

        server_url = mqtt://user:pw@ip:1883

        topic = weather

        unit_system = METRIC

        binding = archive

        aggregation = aggregate


ok is the MQTT Broker with Mosquitto. He receives the Topic, I can see this 
with an MQTT Explorer.

Here is the string from the Broker:

{"dateTime": "1614942000.0", "inTemp_C": "25.580000000000005", "outTemp_C": 
"2.4000000000000004", "inHumidity": "33.0", "outHumidity": 
"91.73333333333333", "pressure_mbar": "967.3399999999997", "relbarometer": 
"967.34", "luminosity": "7575.2", "uvradiation": "6.0200000000000005", 
"UV": "0.0", "rain_cm": "0.0", "stormRain_cm": "0.61", 
"rainRate_cm_per_hour": "0.0", "dayRain_cm": "0.35000000000000003", 
"weekRain": "7.4", "monthRain_cm": "0.7400000000000001", "yearRain_cm": 
"0.7400000000000001", "windSpeed_kph": "0.1200002982589136", "windDir": 
"223.0", "windGust_kph": "1.800004473883704", "windGustDir": "223.0", 
"daymaxwind": "3.6", "altimeter_mbar": "1023.3070575534325", "appTemp_C": 
"0.5729997426277262", "barometer_mbar": "1025.6542650419428", 
"cloudbase_meter": "622.358803974661", "dewpoint_C": "1.1941448275071624", 
"heatindex_C": "2.4000000000000004", "humidex_C": "2.4000000000000004", 
"inDewpoint_C": "8.102394002973144", "windchill_C": "2.4000000000000004", 
"interval_minute": "5.0", "windrun_km": "0.010000024854909468", 
"hourRain_cm": "0.020000000000000018", "rain24_cm": "0.6100000000000003", 
"usUnits": "16.0"}

not ok is the second Station. I don't understand the config of MQTT 
Subscribe.

In which case I user Service, in which case I use driver?


snippet of the Weewx.conf:

[Station]

    station_type = MQTTSubscribeDriver

[MQTTSubscribeDriver]

    host = 192.168.114.xx

    port = 1883

    user = user

    password = password

[Engine]

    # The following section specifies which services should be run and in 
what order.

    [[Services]]

        data_services = "", user.MQTTSubscribe.MQTTSubscribeDriver


In the log I get the following:

Mar  5 11:51:56 weewx-intern weewx[1087] DEBUG __main__: Initializing engine

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: Caught 
unrecoverable exception:

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****  
'driver'

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****  
Traceback (most recent call last):

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****    
File "/usr/share/weewx/weewxd", line 151, in main

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****      
engine = weewx.engine.StdEngine(config_dict)

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****    
File "/usr/share/weewx/weewx/engine.py", line 81, in __init__

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****      
self.setupStation(config_dict)

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****    
File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****      
driver = config_dict[station_type]['driver']

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****    
File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****      
val = dict.__getitem__(self, key)

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****  
KeyError: 'driver'

Mar  5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__:     ****  
Exiting.


Sorry, but I can't find the solution.

[email protected] schrieb am Donnerstag, 4. März 2021 um 02:01:20 UTC+1:

> i’m headed to gitub discussions now...
>
> On 4 Mar 2021, at 9:03 am, [email protected] <[email protected]> wrote:
>
> Graham,
> I am still very much in the ‘idea stage’, but would be happy to chat. In 
> order to not hijack this thread we should probably start another thread or 
> start a discussion over here, 
> https://github.com/bellrichm/WeeWX-MQTTSubscribe/discussions
> - rich
>
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fa0859c6-d5d9-44f8-a352-196b69c2166cn%40googlegroups.com.

Reply via email to