Arduino / Homeduino met ESP8266 aansturen pinnen op Arduino

This was posted in Dutch firts, so now a translated version (also the answer from Robert):
I’ve been digging into Arduino for a few days and into Homey since yesterday. Clearly a beginner, but I’m glad that there is already quite a lot that works: Arduino linked to ESP8266WiFi module and linked it to Homey using standard code. Now I have started the next project and that is that I want to control LEDs from a Homey flow. I used the code of plant waterer from github and modified it to make it work with wifi shield instead of ethernet:


That went well, in the serial monitor can read what I should see: if I indicate via a homey flow that the pump will pump for 5 seconds (it writes pump started 5,4,3,2,1, etc) but I did not get the pump ( test LED lamp) to work on port 2 of the Arduino board. After a few hours of struggeling, I found out that I was controlling port 2 on the ESP8266. When cable is connected to this device my LED goes on for 5 seconds when I start the flow with value 5.

On the ESP8266 there are only 2 ports and I would like to control several LEDs from a flow. Can someone explain to me how that works? Please help me with sample code that I should upload so that I can use the ports on the arduino.

I have attached a picture and shared code via drive doc:

Het ESP8266-bordje dat je gebruikt leidt maar 2 (of 3?) GPIO pins “naar buiten”, maar de ESP8266 chip zelf heeft er veel meer. Ik gebruik zelf vaak een Wemos D1 Mini kloon, die leidt veel meer GPIO pins naar buiten (met bijkomend voordeel dat er een USB-aansluiting zit voor programmeren én power).

Eventueel zou je de code ook op de Arduino zelf kunnen draaien, die heeft meer I/O poorten beschikbaar. Ik meen dat er een library is waarbij je de ESP8266 kunt aansturen vanuit de Arduino (waarbij de ESP8266 alleen functioneert als WiFi-modem, en niet als microcontroller), maar ik zou zo niet weten hoe die heet (die opzet gebruik ik zelf ook nooit, de ESP8266 is qua microcontroller een stuk krachtiger dan de Arduino dus die laatste gebruik ik eigenlijk nooit meer).

Overigens moet ik je er even op wijzen dat Homeyduino niet meer wordt bijgehouden door Athom, en dat het ook niet meer werkt met de nieuwe “v2” firmware van Homey die eraan zit te komen.

En als laatste: dit forum is eigenlijk Engelstalig :wink:

Verplaatst naar Nederlands.

Hi Robert, Sorry I was not aware of the english language. It was a bit late :persevere:

Thanks for the tip of the Wemos. I have a NodeMCU and will try it with that one. Your second last remark worries me a bit. In v2 of Homey the homeduino is not supported anymore. Is that defenite or might it be supported later? If not are there any alternatives? I saw ann app called Mysensors.org. Is this an alternative? I thought you can only sens sensor values to himey while I like to send stuff to an arduino and read from it as well.

I translated your answer to english as well so if you want to upadte your answer the rest of the world can read with us :wink:.

The ESP8266 board you use only leads 2 (or 3?) GPIO pins “out”, but the ESP8266 chip itself has a lot more. I often use a Wemos D1 Mini clone 1, which leads a lot more GPIO pins outside (with the added advantage that there is a USB connection for both programming and power).

You could possibly also run the code on the Arduino itself, which has more I / O ports available. I believe that there is a library where you can control the ESP8266 from the Arduino (where the ESP8266 only functions as a WiFi modem, and not as a microcontroller), but I would not know how it is called (I never use that design myself) , the ESP8266 is a lot more powerful in terms of microcontroller than the Arduino so I never use the latter anymore).

By the way, I have to point out that Homeyduino is no longer being updated by Athom, and that it no longer works with the new “v2” firmware from Homey.

@robertklep in the Github code I see
“id”: “com.athom.homeyduino”,
“sdk”: 2,
“name”: {
“en”: “Homeyduino”
does this not mean it is compatible with Homey V2?

SDKv2 is something else than firmware v2.

1 Like

Omdat je vraag naar de NL groep is verplaatst gaan we gewoon weer lekker door in het Nederlands :wink:

Afgelopen week heeft iemand van Athom te horen gekregen dat Homeyduino niet geupdate zal worden voor v2: Homey 2.0.0 Community App Compatibility List - #157 by dewenni

MySensors is best leuk, maar daarvan heeft de ontwikkelaar laten weten dat ie geen Homey meer heeft en dat die app dus ook niet geschikt gemaakt zal worden voor v2: Homey 2.0.0 Community App Compatibility List - #162 by Blarp

Er blijft helaas maar weinig over, tenzij iemand zich geroepen voelt om één van beide apps over te nemen van de oorspronkelijke ontwikkelaar.

I moved the topic back to devices so in english :wink:
OK, yeah that is a challange than. I’m just a noob so no change i will be able to do that… I will stay with version 1 than a little longer i assume. Just start to see the fun in this and have and hopefully someone wil take it over. Do Athom volenteer developers have crowd funding options maybe so some people can sponsor that person?
I see you are the developer of sonoff. Is that maybe an alternative for me? Can you flash it and create your own code?

There’s a “donation” field that you can set for an app. I believe the only option there is Paypal.

Other than that, there are no official crowd funding options for developers (that is not to say that crowd funding isn’t an option, or is frowned upon, it means that a developer has to handle it themselves).

Sonoff devices contains an ESP8266 that can be flashed. The Sonoff app only works with one particular alternative firmware, the Sonoff-Tasmota firmware, which is quite nice. Not all features of it are supported by the Sonoff app though, mostly the sensor-related features.

OK, thanks. Prefer to have it all on my own hands ;-).

Anyone who wants to support the Homeduino or has alternatives please let me know. Realy happy with the tip of Robert to use another board. I juts got the NODEMCU V2 working with a LDR sensor. Now a motion sensor and then other leds. Amazing what you can learn (and copy) in a few day’s. Thanks to all developers who make this possible.

You’re kidding me!?
I just bought a Nodemcu + extra stuff to use homeyduino and Itho
I want to update to Homey to V2
So now I can’t???

1 Like

I find it strange to. The homeyduino has so much potential and is developed by Athom (eventhough intern) itself. Find it strange they make an update to a newer OS and not update an app which is just 1 year old.

1 Like

I’m convinced if enough people ask for support, they’ll keep supporting it…

Boy, since the last time I checked Theo Arends has surely expanded the range of his work. Good busy.
You can flash it also on a nodemcu and a wemos d1 mini as well. And it supports a bunch of sensors. Lightsensors like the BH1750 or the temperature/humidity/pressure sensor BME280 or a HC-SR501 PIR motion detection. And I do see some 1/2/4/8 relay support although not sure of the details on that.

Haven’t tried flashing Tasmota on a wemos d1 mini and attaching a sensor on it. Yet. Have you?

Well, don’t hold your breath. If they haven’t shown any love the past time and they say they are not willing to support it… Then just take there word for it. (But you still kinda can use that app in 1.5/2.0, if it installs correctly that is.)
What is the lifespan of an app? I’m not mad at them, it is what it is.

But I must admit, I was a little bit disgruntled when they published the app, made a nice blog about it, but then instantly basically dropped support with open issues. But life goes on.

Yeah, every time I look, there’s more stuff that it supports, really great. Still have to implement most of it in my app, though.

Yes, I think I tested with a BME280 and also a NeoPixel shield, worked very well.

Sorry, but who is Theo Arends and what app does he support?

In case the Homeduino app is not supported anymore I was wondering of creating a webserver on the ESP8266 would be a solution when you combine it with the “HTTP request flowkaarten app”.

I use it to controll my homey via my PEBBLE (yes I’m proud :grin:) watch that is able to trigger flows via http get events. I do it with local IP so it can only be used at home (but via webhooks also external would be possible).

Here a movie of a webserver for the ethernet shield: https://www.youtube.com/watch?v=dWM4p_KaTHY
I suppose this must be possible with wifi as well? And does anyone know if you could use a webserver to send and receive events? Anyone with examples?

And the KEY Question: Will this app be suppurted on version 2???

Sorry for the confusion: Theo Arends is the developer of the Sonoff Tasmota firmware for ESP8266’s. It’s not a Homey app.

A reasonable amount of features provided by this firmware are supported by my Sonoff app for Homey, but there’s still a lot of work to be done (mostly with respect to sensor support).

Sonoff Tasmota also has a built-in HTTP server that you can use to send commands to the device, so that might be a reasonable workaround.

Wow steep learning curve I’m in. But think I better invest in that path instead of betting on the homeduino. How can I get information on the support of the “HTTP request flowkaarten app” in V2 of Homey?

If anyone has an example of a ESP8266 webserver that can:

  1. send requests
  2. receive request,
  3. turn on and of some digital pins via received request
  4. sends analog readings from pens via http get event to Homey
    I would be more then HAPPY

If you know where to post that request I’m more then willing to support your request. Although I think I have an alternative I think for many people wanting to learn and use arduino’s this project was great. Maybe not so many users but it are the hardcore Homey fans and (the young ones) potential Athom employees, they are searching for…