RESTful configuration [ Send data via http-get]

Hello!

I would like to execute an http-get-string every 30 minutes, with which I forward my weather data to a service.

What is the easiest way to do that?

The string should look like this:

http://upload.wettermonster.de/speichern.php?id=xxxxxxxx&schluessel=yyyyyyyyy&temperatur="sensor.wetterstation_ii_bmp280"

greetings
Gerald

The third example seems to be what you are looking for.
RESTful - Home Assistant (home-assistant.io)

Unfortunately, that doesn’t help me, I’ve already looked at it, but somehow I’m too stupid for that.

My entry in configuration.yaml currently looks like this, it connects, successfully. however, it does not transmit any values from the specified sensors.
Apparently I did the integration of the sensors wrong, but how correctly?

sensor:
  - platform: rest
    name: Wettermonster
    resource: http://upload.wettermonster.de/speichern.php?id=13AAAAA65&schluessel=50XXXXX20&temperatur=sensor.wetterstation_htu21_temperature&luftfeuchtigkeit=sensor.wetterstation_htu21_humidity

Maybe someone can help me - thank you very much!

Gerald

As the example shows, you need to add {{ }} to make it templated values.

....&{{ temperatur=sensor.wetterstation_htu21_temperature }}&

Hello,

somehow I’m just too stupid that I prepare different sensor values and send them via RESTful.

I hope someone can help me understand the system.

I want to send different sensor data in a string.

http://upload.wettermonster.de/speichern.php?id=abbbccccdddd&schluessel=vvvbbbggggg& Temperatur=[[ Here the value of a sensor should be without unit]]

the sensor = sensor.wetterstation_htu21_temperature

It is sent, but I can’t get it that the values are processed accordingly.

When I read through the template instructions I don’t understand it.
Or I have problems understanding because my English is too bad.

Gerald

Sorry I see that I messed up with my previous post.
I posted it from the phone…

sensor:
  - platform: rest
    name: Wettermonster
    resource: "http://upload.wettermonster.de/speichern.php?id=13AAAAA65&schluessel=50XXXXX20&temperatur={{ sensor.wetterstation_htu21_temperature }}&luftfeuchtigkeit={{ sensor.wetterstation_htu21_humidity}}"

Thank you, but that’s exactly how I understood it.

The string with the sensors does not work:

sensor:
platform: rest
resource: "http://upload.wettermonster.de/speichern.php?id=1CVVC365&schluessel=50XX8720&temperatur={{sensor.wetterstation_htu21_temperature}}&luftfeuchtigkeit={{sensor.wetterstation_htu21_humidity}}"`

If I use relal values, it works:

sensor:
platform: rest
resource: "http://upload.wettermonster.de/speichern.php?id=1CVVC5&schluessel=50XXX68720&temperatur=3.0&luftfeuchtigkeit=44"

I just looked at what it is sending and discovered that it is sending the {{…}} nd not the values of the sensors.
I think I have to somehow prepare the values and then have them inserted.

Sorry for bothering you with my problem, I really appreciate your help - thank you very much!

Sorry still not awake yet…

sensor:
  - platform: rest
    name: Wettermonster
    resource: "http://upload.wettermonster.de/speichern.php?id=13AAAAA65&schluessel=50XXXXX20&temperatur={{ states('sensor.wetterstation_htu21_temperature') }}&luftfeuchtigkeit={{ states('sensor.wetterstation_htu21_humidity') }}"
1 Like

That doesn’t work either - I’m giving up for today!

Thank you!

Thanks for the help!!

Now it works - finally. After it continued to worm I went through everything again and lo and behold, the solution was so close - smile!

Thank you!

sensor:
  - platform: rest
    resource_template: http://upload.wettermonster.de/speichern.php?id=1XXXXX365&schluessel=5BBBBBBBB720&temperatur={{ states('sensor.wetterstation_htu21_temperature') }}&luftfeuchtigkeit={{ states('sensor.wetterstation_htu21_humidity')}}&luftdruck={{ states('sensor.wetterstation_bme280_pressure')}}&niederschlag=oo&windgeschwindigkeit={{ states('sensor.wetterstation_tx23_speed_act')}}&windrichtung={{ states('sensor.wetterstation_tx23_dir_card')}}&helligkeit={{ states('sensor.wetterstation_bh1750_illuminance')}}