homie-esp8266 icon indicating copy to clipboard operation
homie-esp8266 copied to clipboard

Wemos D1 mini, multiple sensors with Homie

Open ghost opened this issue 7 years ago • 11 comments
trafficstars

Hi Marvin, I LOVE LOVE LOVE the home framework. I’ve used it to monitor doors with home assistant and it works great. I used an Esp8266-01 black version for this project and it worked well.

I’m tinkering with my wemos d1 mini and i wanted to know if its possible to use multiple sensors on one d1 mini with your framework. To give some context i’m looking to run 2 door sensors and a water sensor all from one wemo d1 mini using different I/O pins. Is this possible wth homie? I was reading through the documentary and I couldn’t find something on multiple sensors or example with the code..

Thanks in advance.

ghost avatar Jun 12 '18 17:06 ghost

You make a good point, we should add that example to the docs.

Yes you can, make as many nodes as you need.

HomieNode temperatureNode("temperature", "temperature");

Just keep creating nodes for each sensor and hook them up to the sensor output :)

I normally have many sensor types on one device :)

timpur avatar Jun 12 '18 21:06 timpur

Shamelessly pointing to my own project: Here is an example: https://github.com/jmozmoz/yagds/blob/master/uploadSensorData/src/main.cpp#L30

jmozmoz avatar Jun 12 '18 22:06 jmozmoz

Awesome thanks. However I’m a bit confused on how to create the Json file. If I have one sensor output how does the software know which tripped it? Sorry I’m still somewhat new to this platform but if in the config I call the device “bathroom sensors” and I add a door node and water sensor node, wait as I’m writing it I think I got it lol Is there a board schematic somewhere?

ghost avatar Jun 13 '18 01:06 ghost

@jmozmoz what kind of board are you using? ESP-01?

ghost avatar Jun 13 '18 01:06 ghost

@sats4eva , you can also use this project https://github.com/luebbe/homie-node-collection as a starting point. The demo contains plenty of nodes hooked up to different pins. Just pick whatever you like :)

luebbe avatar Jun 13 '18 06:06 luebbe

@satssehgal Do you always dump your questions into the first unrelated ticket and expect an answer? Do you also buy bread at a barbers shop? Please delete your comment here and open a new ticket with an appropriate description. Try to format your source code so that is properly indented.

luebbe avatar Jun 13 '18 14:06 luebbe

@luebbe I buy bread from my plumber actually and you? did you wake up on the wrong side of bed today? I’m new hear so trying to navigate the rules. Glad to see people here are nice and not jerks :)

satssehgal avatar Jun 13 '18 14:06 satssehgal

@luebbe per your request i’ve deleted the comment, formatted it and posted a new thread. Don’t shoot me if i’ve Goofed up again. Anything else you want? Coffee? Donut?

satssehgal avatar Jun 13 '18 14:06 satssehgal

@satssehgal had a coffee already. Donut would be nice ;)

luebbe avatar Jun 14 '18 07:06 luebbe

Air donut on its way :)

Sent from my iPhone

On Jun 14, 2018, at 3:50 AM, luebbe [email protected] wrote:

@satssehgal had a coffee already. Donut would be nice ;)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

satssehgal avatar Jun 14 '18 10:06 satssehgal

@luebbe thank you for the code demos. Haven't found very many so far. Still can't find one for neopixel or 8212 LEDs that works with the newer format.

ubergeekseven avatar Jun 24 '19 13:06 ubergeekseven