Working http call to esphome rest api for slimmelezer+ sensor

Hi,

I’m trying to get my slimmelezer to talk to evcc using the esphome REST api.

I’m trying to get some basic http GET calls working but I keep on getting 404 errors. I think I’m just struggling to find the correct api endpoints because I know that the webserver is running (and thus the REST api too) and I know there’s no encryption.

does anyone have an example of a working http GET for a sensor on the slimmelezer+? I should be able to take it from there.

thanks a lot
L

Are you able to give an example of what does and doesn’t work?

You understand the esphome REST api is for reaching the ESPHome device from the external world, right? I.e. not the equivalent of the RESTfull integration of HA.

If you do, I don’t quite understand how that would enable communication between slimlezer and evcc, and examples of your attempts are welcome.

I’ve included a screen of what my postman workspace looks like. AFAIK I’m just sending a simple GET command to an api endpoint for uptime. am I doing it wrong?

thanks for helping!

EVCC can talk to RESTful API’s such as the one from esphome. I want EVCC to send http get’s to the esphome api of the slimmelezer to get the values it need to work. does that answer your question?

I guess evcc just don’t understand mDNS. Try using the ip address rather than “slimlezer.local”

hey koying, thanks for replying.

I’m trying to talk to the slimmelezer api from my pc using postman. at this point evcc is not in the picture yet.

thanks a lot for your suggestion. using the ip gives me the same result. 404 means page not found, but it is a response from the esphome board. I’m sure that part is fine.

Could you show your esphome code, please.

hey koying, thanks again for helping.

substitutions:
  name: slimmelezer

packages:
  zuidwijk.slimmelezer: github://zuidwijk/dsmr/slimmelezer.yaml@main

esphome:
  name: ${name}
  name_add_mac_suffix: false

api:
  encryption:
    key: xxxxxxxx

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

The sensor name is, well, the sensor “name”.
So use, e.g. http://slimmelezer.local/sensor/slimmelezer_uptime

1 Like

you’re kidding me. that works! thanks a lot :slight_smile: so you just literally copy/paste the sensor name from HA

1 Like