logo elektroda
logo elektroda
X
logo elektroda

How to retrieve data from the storm.dzis.net API via ESP8266 in the Arduino IDE?

Marcinolak xD 1170 9
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18421953
    Marcinolak xD
    Level 12  
    Welcome.

    How can I retrieve data (having an API key) from the storms.dzis.net website?
    I'm keen on some examples of how to call queries. I am programming the whole thing in an Arduino IDE environment.

    I would like to make a mini "weather station" with a storm warning function.

    https://burze.dzis.net/?page=api_interfejs
    https://burze.dzis.net/soap.php?wsdl
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 18422017
    szwagros
    Level 33  
    Want to make a SOAP client on an Arduino? Thick...
  • ADVERTISEMENT
  • #3 18422046
    Marcinolak xD
    Level 12  
    And what can it be realised on?

    I don't need to use this site at all. Do you know of any others providing an API key?
  • #4 18422431
    Slawek K.
    Level 35  
    szwagros wrote:
    Want to make a SOAP client on an Arduino? Thick...
    .
    I hope you distinguish between Arduino (AVR) and ESP8266 ;) .

    Greetings
  • ADVERTISEMENT
  • #5 18422469
    Marcinolak xD
    Level 12  
    Slawek K. wrote:
    szwagros wrote:
    Want to make a SOAP client on an Arduino? Thick...
    .
    I hope you distinguish between Arduino (AVR) and ESP8266 ;) .

    Greetings


    Colleague @szwagros probably not. Reminder. It's not an Atmega...

    Back on topic. My board is a NodeMCU V3. I have the environment set up to work with this board. I just don't have an idea for a sensible software (and how to go about it). I don't mean a "ready-made" one, but a way of getting data from the website (storms.dzis.net) and writing it to variables.
    Is this even possible on this board? .
  • ADVERTISEMENT
  • #7 18425083
    khoam
    Level 42  
    Marcinolak xD wrote:
    I'm not talking about a "ready-made" here, but about how to get the data from the site (storms.dzis.net) and write it to variables.
    .
    Since you don't want a "ready-made", laudable attitude ;) , then start with the following document:
    https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html

    Marcinolak xD wrote:
    Is it even possible on this board?
    .
    As much as possible, there is a 32-bit RISC processor.
  • #8 18425087
    Marcinolak xD
    Level 12  
    Slawek K. wrote:
    Here is another service https://antistorm.eu/deweloperzy.php
    Just use JSON.

    Greetings
    .

    Well yes, but unfortunately it does not support my locality.

    There is no method to make a SOAP/WSDL client on ESP?
  • Helpful post
    #9 18425925
    khoam
    Level 42  
    Do you mean the automated creation of XML code to send and receive requests to/from the SOAP server, or the way in which the network communication itself is handled, e.g. via REST?
  • Helpful post
    #10 18430502
    krzbor
    Level 27  
    SOAP is not simple if we want to program it universally. However, at the lowest level it is simply XML sent via the POST method. Often the easiest way is to craft a query and just send it. I recommend the SOAPUI tool - it creates functions based on WSDL and allows you to send queries and receive a response. An interesting feature to set in the programme configuration is the RAW view of the query - that is, the entire complete query.
    You can see exactly what the query looks like and what the headers look like. You can get rid of "Accept-Encoding" if you do not want a packed response. The "SOAPAction" parameter is very important. - most servers require it. Also important is "Content-Length", which tells you the length of the text after the header (the length of the XML file calculated in bytes). The server response is also XML. In SOAPUI you can also see it as "RAW". Reading data from the response should be based on analysing the XML, which often has a namespace definition. However, it can be simpler to find the right part as a string. This is not elegant, but it works.
    Another solution is also worth considering - if you have access to a server with PHP you can make a 'broker' on it. It will broker the communication - you ask the broker, and it communicates via SOAP with "storms.dzis.net" and sends the answer in a convenient form. The advantage of the solution is that you can do the communication with PHP over http rather than https.

Topic summary

The discussion revolves around retrieving data from the storms.dzis.net API using an ESP8266 in the Arduino IDE. The user seeks guidance on making API calls, specifically for a mini weather station with storm warning capabilities. Responses highlight the distinction between Arduino and ESP8266, with suggestions to utilize JSON for data retrieval. Alternatives to the storms.dzis.net API are mentioned, and the complexity of implementing a SOAP client on the ESP8266 is acknowledged. Recommendations include using SOAPUI for crafting XML queries and understanding the necessary headers for SOAP requests.
Summary generated by the language model.
ADVERTISEMENT