HELP: Arduino w/ESP8266 to MQTT or REST

I thought this would be a easy project as i used Arduino’s before and used the GPIO’s on the rPi, but it appears the Arduino with an built in ESP8266 is more complicated then i thought lol.

I figured the Arduino Mega would best suit my plan as it supports a lot of inputs… I’m configuring wired motion sensors and door sensors througout my house and connecting them all to the Arduino.

I was thinking of either sending a REST command directly to the rPi hosting OpenHAB or publishing it to my MQTT server (whichever is easier).

Has anyone used an Arduino w/ESP8266 together to do this and willing to share some sketches :slight_smile:
The board i’m using is this one from aliexpress:

Thanks :):):slight_smile: