Coder Social home page Coder Social logo

Comments (7)

HolgerHees avatar HolgerHees commented on July 18, 2024 1

additionally I validate configuration in weather_service too 8dac14f

from smartserver.

HolgerHees avatar HolgerHees commented on July 18, 2024

The idea of the StationConsumer is to merge data with data from a real weather station. If there is no "local" weather station, the data are coming from the weather provider (e.g. openmeteo)

ArduinoExample: https://github.com/HolgerHees/arduino_weatherstation/blob/master/arduino_weatherstation_mini.ino

The StationConsumer it is now configurable (ea4fc89) with the key "weather_mqtt_station_consumer_topic"), but optional/disabled by default

in Openhab (https://github.com/HolgerHees/openhab-config/blob/master/templates/things/mqtt.things), i receive values from my weatherstation (Topic: mysensors-pub., e.g. line 82) and forward some of them to the station_consumer_topic (Topic: hhees/weather/station/., e.g. line 23)

The forward itself is happend here https://github.com/HolgerHees/openhab-config/blob/master/conf/items/sensors.items (e.g. line 172)


Just pull and it should work. Maybe the alert takes some time until it is gone / outdatet, because there are no new metrics related to the station consumer provided, if the station consumer is disabled.

from smartserver.

toffee avatar toffee commented on July 18, 2024

Thank you very much for explanations and changes.

I have an of-the-shelf weather station that in openHAB is using this binding. I will try to forward the data from the weather station to a new created mqtt thing (to have my environment similar with your) - but that for another day.

This evening, the alarm disappeared with default weather_mqtt_station_consumer_topic, thanks to your modification.

from smartserver.

toffee avatar toffee commented on July 18, 2024

Need more changes:

[INFO] - [lib.provider.provider:175] - <class 'AttributeError'>: module 'config.config' has no attribute 'publish_topic'
Traceback (most recent call last):
  File "/opt/weather_service/lib/provider/provider.py", line 135, in fetch
    fetcher.fetchForecast(self.mqtt)
  File "/opt/weather_service/lib/provider/openmeteo.py", line 190, in fetchForecast
    msg = "{}/weather/provider/forecast/{}/{}".format(self.config.publish_topic,field,date)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'config.config' has no attribute 'publish_topic'
[INFO] - [lib.provider.provider:186] - Sleep 600 seconds

from smartserver.

HolgerHees avatar HolgerHees commented on July 18, 2024

fixed in a82c65e

from smartserver.

toffee avatar toffee commented on July 18, 2024

The name of the ansible variable should contains "provider" too. Otherwise the config.py variable is initialized with False

I found out that looking at mqtt topic name:
image

from smartserver.

HolgerHees avatar HolgerHees commented on July 18, 2024

my fault. the related change was lost during a cleanup de45786

it is fixed now 64ae4c6

from smartserver.

Related Issues (15)

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.