Reading Entso-e electricity prices (https API) with Miniserver Gen1 / FHEM / MQTT

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Jussi
    Dumb Home'r
    • 10.01.2018
    • 10

    #1

    Reading Entso-e electricity prices (https API) with Miniserver Gen1 / FHEM / MQTT

    Greetings!

    I know Gen1 does not support https. Yet with some websites like getting data from Dark Sky, virtual inputs work. With Entso-e API (publishes daily electricity spot prices incl. in Finland where I live) however I am not having success. I am using FHEM with Raspi but by using HTTPMOD I am facing similar challenge - port 443 needed with Entso-e API. I tried installing the SSL certificate (is this the word) to my Raspi and obviously succeeded as the Raspi was then found in my home-network only with https. But this only resulted in the fact that I lost connection with all those sensors that I am reading in Loxone from FHEM (as Gen1 does not support https, right).

    This is basically the browser version of the API call I would like to make (just replacing the %%token%% with my security token) https://web-api.tp.entsoe.eu/api?sec...Type=A44&in_Do main=10YFI-1--------U&out_Domain=10YFI-1--------U&periodStart=202210042300&periodEnd=20221005230 0

    Which options do I have and would some kind soul have some ready code available as I am really noob, only good in copy pasting ? Loxberry (I have not it installed currently) and HTTPS2HTTP? Or some way to read the daily prices with MQTT - I am running MQTT2 at FHEM and that (don't ask me why) can do the port 8883 which is SSL. Once again, I might sound that I understand something as I have succeeded in installing a nice set-up with MQTT devices and bridges etc. but trust me, copy-paste and endless testing until it works is my method... So all handholding much appreciated...

    The input by Privat58 here https://forum.fhem.de/index.php/topi...tml#msg1236029 would be exactly what I want if the https would only work. This will surely also provide some leads to those who understand https://community.home-assistant.io/...o-e-api/394484

    Please note that in order to get readings from Entso-e platform / API one must request a personal security token, instructions at the end of this document: https://transparency.entsoe.eu/conte...Management.pdf

    Many thanks!!
  • Christian Fenzl
    Lebende Foren Legende
    • 31.08.2015
    • 11234

    #2
    The MQTT Gateway for LoxBerry itself supports requesting https Websites with its http2mqtt transformer: https://wiki.loxberry.de/plugins/mqt...p2mqtt_shipped

    The doc might be confusing at the first glance, as you aren't familiar with MQTT Gateway yet.

    The response of an html file would be sent to a Virtual Text Input of Loxone, where you can use Command Recognition blocks to extract the pure numbers.
    If the API allows to respond with json, MQTT Gateway furthermore would automatically parse the json and submit every value as separate Virtual Input at Loxone. So in the case of a json response, no command recognition/parsing/fiddling/... is required at all.

    LoxBerry's MQTT Gateway allows to connect to a "foreign" MQTT server (like yours on the FHEM machine) and can directly send MQTT data to Loxone with only creating simple subscriptions.


    The other option would be the mentioned https2http Plugin, with the same command recognition like above for html response.

    ​​​​​​
    Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

    Kommentar

    • Jussi
      Dumb Home'r
      • 10.01.2018
      • 10

      #3
      Thank you Christian! Actually I got it working straight from FHEM, using the code mentioned in my first posting (link to the FHEM-forum). This is the easiest and most familiar solution for me anyhow.

      Kommentar

      Lädt...