1
0
Fork 0
This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
kekskurse.de-old/content/posts/2020-10-01-Edifier-remote.md
2020-11-11 15:43:41 +01:00

2.3 KiB

title date draft description tags categories startpage lang
Edifier R1700BT Remote Control 2020-10-01T14:44:25+02:00 false Use a Wemos to create an mqtt-based remote control
WeMos
Arduino
Blog
Electronics
true gb

After I got the Edifier R1700BT Speaker I notice that i want to control them like all my other stuff with my moile phone and MQTT. So i got some IR reciver and LEDs to simulate the Edifier Remote with a Wemos who is connected to my MQTT Server.

{{< tweet 1310694353187344385 >}}

I figure out the IR-Codes used:

  • 149389439 -> power on/off
  • 149356799 -> mute
  • 149369039 -> Volume Up
  • 149393519 -> Volume Down
  • 149377199 -> Switch input to Bluetooth
  • 149399639 -> Switch input to Line In

Hardware

I connected the IR-LED to the D4 Pin of a Wemos. I used this question as basic idea.

{{< figure src="/img/2020/10/ir-remote/plan.png" >}}

Software

With this Numbers, and the pubsubclient and IRremoteESP8266 i just can subscripe to some topics, and every time a message aravid at one of the topics i could send the code to the speaker:

if(String(topic)=="musik/power") {
  irsend.sendNEC(149389439, 32);
  Serial.println("EDIFIER: Power");
}

if(String(topic)=="musik/mute") {
  irsend.sendNEC(149356799, 32);
  Serial.println("EDIFIER: Mute");
}

if(String(topic)=="musik/down") {
  irsend.sendNEC(149369039, 32);
  Serial.println("EDIFIER: Down");
}
  
if(String(topic)=="musik/up") {
  irsend.sendNEC(149393519, 32);
  Serial.println("EDIFIER: UP");
}

if(String(topic)=="musik/bluetooth") {
  irsend.sendNEC(149377199, 32);
  Serial.println("EDIFIER: Bluetooth");
}

if(String(topic)=="musik/line") {
  irsend.sendNEC(149399639, 32);
  Serial.println("EDIFIER: Line");
}

Final Result

After solder everything to a perforated board I got the following result.

{{< figure src="/img/2020/10/ir-remote/result.jpg" >}}

Maybe I will create another smaller version to hide next to the speaker. For now it works.

Complete Code

You can got the complete code here: Complete Code

{{< load-photoswipe >}}