DFPlayer and Iobroker

The dfplayer doesn’t have an IP address. It is attached to the esp.

Ah ok, got it.
Then I vote for @Hellis81’s proposal to use MQTT if it is not too much hassle for you to install an MQTT server. You could use it to communicate with many ESPs and other components and it is much more lightweight within ESPHome. In fact the web server component that you would need to implement a REST endpoint needs a lot of internal memory. I also read about instabilities but I have no first hand experience with it.

the IP is the ESP

That is correct

I’m sorry for my late answers.
I have MQTT.
But I have problems with the interface.

mqtt:
broker: IP from IoBroker with MQTT / OK
username: Ok
password: ok
id: ???

What do I have to enter for Piuser?

I think your problems are more related to iobroker actually.

You might wanna try to solve your issue @ https//forum.iobroker.net as they have lots of topics covering esphome in combination with iobroker.

1 Like

The connection is ok. I also read in the weblog that the SD card was recognized.



I need help again.
I got the DFPlayer to work.
Track 1 & Track 2 are displayed to me as a bool variable in the iobroker and allow the tracks to be played.
How do I get it out that I only transfer a number and say play?

# Track 1
switch:
  - platform: template
    name: "Track 1"
    id: track1
    optimistic: true
    turn_on_action:
      then:
        - switch.turn_off: track2
        - delay: 1s
        - dfplayer.play:
            file: 1
            loop: false
    turn_off_action:
      then:
        - dfplayer.stop

This is not the iobroker forum.

1 Like

Thanks, for your helpful question.
What does the Iobrroer have to do with that of my last question?

To quote you

Is there any way you can expose a number from iobroker to ESP-Home?
The Home Assistant API means I can share sensors or input numbers to ESP-Home and use them in actions in ESP-Home.

The change must be made in EPHome and not in IoBroker

Use lambdas to make your parameters variable.

Actually the iobroker integration for esphome just doesn’t support all esphome features like services for example.

On the other hand all features from esphome work with home assistant. Like sending a number via service to esphome devices to trigger something.

Maybe you need to open a issue in the iobroker esphome integration/adapter?