Openhab with raspberry pi and Arduino using MQTT

raspberry
openhab2
mqtt
Tags: #<Tag:0x00007fe054979000> #<Tag:0x00007fe054978e98> #<Tag:0x00007fe054978d30>

(Fashanu Olakunle) #1

Hello,
I’m totally new to Openhab. My aim is to setup Openhab on a raspberry pi acting as a server and different arduino boards communicating wirelessly with the raspberry pi using MQTT. For exapmle i want to be able to switch LED on and off and also get teperature reading. i have successfully installed Openhab and MQTT but i dont know what do do net. Please Help. thanks


(Sasha) #2

Next, you can take a look on EasyESP firmware. http://www.esp8266.nu/
It has a mqtt client built-in so makes it easy to talk with OpenHAB


(Sasha) #3

Also, this guide helped me a lot (Part 2 as well)


( ) #4

Be aware that this unofficial guide is for openHAB 1.8. @engrfash stated that he is on 2.0. The guide might still be useful to understand a few details but besides that, you should also look into the official openHAB 2 documentation. It is partly unfinished but still a good starting point: http://docs.openhab.org/overview.html

Regarding your hardware: How are you going to make your Arduinos communicate? If you didn’t buy any till now, consider buying a few ESP8266 instead (as @sasha_jpr already hinted). As for your general approach. That is of course up to you and your experience and willingness to build stuff yourself but consider buying components for the standard tasks to get to a working system faster. These do not have to be expensive, have a look at this for example: ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware


(Fashanu Olakunle) #5

thanks alot. that was life saving


(Fashanu Olakunle) #6

Thanks alot. i need cheap and reliable devices that i can control with openhab
1.Light
2. ceiling fan speed control
3. Light dimmer and RGB led
4. door/window sensor
5. Motion sensor
6.window blind
7.sprinkler
8. door lock
can u suggest or recommend some cheap devices because i’m actually building a prototype for a project and i dont have enough finance to buy expensive ones.
thanks alot.


(Mar) #7

If I was making a low powered esp8266 sensor that runs on batteries would easyesp add any overhead vs just uploading my code via the ide?


(Sasha) #8

Easyesp is a bit heavy. You can use something like Homie instead.
https://homie-esp8266.readme.io/docs


(Mar) #9

Thanks @sasha_jpr I’ll take a look into this. Appreciate the direction.


(Josip Mance) #10

Hello everyone!
I see a lot of people using Raspberry pi with ESP8266 but is it possible to use some kind of wired connection to, e.g. Arduino Nano (ethernet maybe), preferably not USB due to its range limits, and also to connect multiple Arduinos, not only 1 (or max 4 to usb ports)?


(Thiago) #11

Hi everyone, im new here and began past 3 days.
i already installed e config openHab
installed MQTT
instaled the TASMOTA custom firmware on sonoff basic.

Im have some difficult to do the comunication of tasmota and openHab by MQTT.
Someone may help-me?

Thanks in advanced.


(Jerome Luckenbach) #12

For sonoff this topic is a good starting Point:

You should find everything you need there (most needed information all in the first post i think).

If there is something missing after that, feel free to add a specific question over there. :slight_smile: