Coder Social home page Coder Social logo

Comments (12)

bellrichm avatar bellrichm commented on July 17, 2024

Should probably support qos per topic.

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

If this is supported for payloads other than individual, probably need separate queues for each topic. This is to handle that the fact that the time stamps might get out of order between the different topics.

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

For multiple topics use
[[topics]]
[[[first/topic]]]
[[[second/one]]]

from weewx-mqttsubscribe.

eugen66 avatar eugen66 commented on July 17, 2024

Hi, just tested with latest. Please see attached log and conf, was not working, but could be errors with my conf.
However, I think there is something wrong with "mapping" values from the mqtt using the previous version, looks like windDir is not accepted, And it looks like I cant have the conversion right, when it comes to wind, its read in m/s and (I think) its showing wrong in the graphs and values. Looks like the windGust maybe reads from windSpeed.. please se old_log.
old_log.txt
Latest_log.txt
weewx_conf.txt

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

@eugen66,
First, thanks for your help! Unfortunately, I realized this implementatation will not easily work with wildcard subscriptions, so I will need to redo it. Not sure how yet...
In regards to the windDir and windGust, I need to do more research on how WeeWX handles them.
But, if it is not too much to ask, could you do another test? In your attached weewx.conf, the payload_type looks to be indented and therefore would not be processed correctly. This won’t fix the wind issues, but should clean up the “not implemented” messages. I’d be interested in the log after this update.
Thanks. Rich

from weewx-mqttsubscribe.

eugen66 avatar eugen66 commented on July 17, 2024

from weewx-mqttsubscribe.

eugen66 avatar eugen66 commented on July 17, 2024

Something went wrong with the attached files so her they are.
weewx3.txt
log1.txt

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

Thanks for the test. It’s obvious I don’t fully understand how the configuration options work. Sorry about that.
The windGust and wind*Dir is definitely something I am doing. I’m going to dig into that and will let you know when I have an update. It may be a bit of time.

  • rich

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

@eugen66,
If you are still interested, the latest update should fix the problem with windDir/windGustDir/windGust.

I think I have a better handle on how configuring subsections work. Subsections need to be at the end. Something like below should work. In the example, some of the options are using default values. If you want to explicitly set them, just make sure it is before the [[topics]] subsection.

I’m curious, are you running in standalone mode? My goal was to use that to make debugging easier, but I know we had some trouble getting it to work.
Rich

    
    #The format of the MQTT payload. Currently support 'individual' or 'json'
    payload_type = individual

    # The topics to subscribe to
    [[topics]]
       [[[Weather/outHumidity]]]
       [[[Weather/outTemp]]]
       [[[Weather/pressure]]]
       [[[Weather/Temperatur_HDC1080]]]
       [[[Weather/Temperature]]]
       [[[Weather/windGust]]]
       [[[Weather/windSpeed]]]
       [[[Weather/windchill]]]
       [[[Weather/WindDir]]]
       [[[Weather/LuxTSL]]]
       [[[Weather/Lux]]]
       
    # The format of the MQTT payload. Currently support 'individual' or 'json'
        payload_type = individual
    # When True, the full topic (weather/outTemp) is used as the fieldname. When false, the topic
    # furthest to the right is used. Only used when payload is 'individual'.
    full_topic_fieldname = False 
 
    # Mapping to WeeWX names
    [[label_map]]
        outHumidity = outHumidity
        outTemp = inTemp
        pressure = barometer
        Temperatur_HDC1080 = extraTemp2
        Temperature = extraTemp3
        windGust = windGust
        windSpeed = windSpeed
        windchill = windchill
        WindDir = windDir
        LuxTSL = extraHumid2
        Lux = extraHumid1

    # The amount to overlap the start time when processing the MQTT queue
    # Only used by the service
    overlap = 20

    # The binding, loop or archive
    # Only used by the service
    binding = loop

    # The amount of time to wait when the queue of MQTT payload is empty
    # Only used by the driver
    # wait_before_retry = 2

    # Payload in this topic is processed like an archive record
    # Only used by the driver
    # archive_topic = 

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

@eugen66,
If you are still trying to get this to work, I found this in the WeeWx user guide
"The difference between METRICWX, and METRIC is that the former uses mm instead of cm for rain, and m/s instead of km/hr for wind speed."
If I understand your comment about windSpeed, it seems that setting units_system to METRICWX should fix it.
Rich

from weewx-mqttsubscribe.

eugen66 avatar eugen66 commented on July 17, 2024

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on July 17, 2024

v1.1.0 supports subscribing to multiple topics

from weewx-mqttsubscribe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.