[Framework] Homie for ESP8266

You’re the second person having this issue. Can you tell me exactly what you fill in the UI? Obviously, change the passwords :wink:

And you need to only enter the IP, this is not HTTP but MQTT.

1 Like

And please open the serial monitor and report what is logged when the sending fails.

hi thanks for reply. just tried to do config again ran serial monitor on laptop and did config from an i-pad here is result of serial debug:
✖ /homie/config.json doesn’t exist
Triggering HOMIE_CONFIGURATION_MODE event…
** Booting into config mode **
Device ID is fca59de0
AP started as Homie-fca59de0
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Received heart request
Received device info request
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Received networks request
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Received CORS request for /config
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
thanks Chris.

@Chaos Ah, an iPad! As you can see, the CORS request is done, so the Web UI actually sends the configuration to the device. However, the next PUT request is not done and this is normally handled by the browser. This only happens with Apple devices (somebody also had this problem on an iPhone), so I guess there is an issue with how Apple devices handle CORS request, or something like this. I don’t have an Apple device to test, but I successfully tested the Web UI on Windows, Ubuntu and Android. Therefore, I am pretty sure this is an Apple bug.

Hello,

I have the same error here on two windows 10 pc’s

Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed
Received CORS request for /config
Received config request
✖ name is not a string
Triggering Wi-Fi scan…
✔ Wi-Fi scan completed

@Snowboarder What are the homie-esp8266 / ArduinoJson version? What do you put as a name for your device?

i use a LoLin nodemcu v3 esp8266 with Homie version: 1.4.1

for the friendly name i used mhc

I identified the bug. I’ll fix it as soon as I can, thanks for the report. :slight_smile:

@Snowboarder this is fixed in the v1.5.0. The Arduino for ESP8266 v2.2.0 revealed an issue with how I handled the JSON configuration, that did not appeared on the v2.1.0. :slight_smile:

All oke now with the new version

Thanks a lot :slight_smile:

For anyone using Homie, @jpmens and I have been working on an OTA server (written in python) which might be useful for managing firmware and scheduling updates.

3 Likes

Give it a day or so to settle down … Lots of work in progress :laughing:

1 Like

@ben_jones12 @jpmens this is awesome! Thanks for contributing to the Homie ecosystem, I appreciate!

Feel free to open a PR on the homie-esp8266 repo, if you want to add your project to the docs, in the OTA section. :slight_smile:

Hi thanks for update. Configureation now seems to work OK , but device dosnt seem to connect to wifi, its probley me here is the serial debug
riggering HOMIE_NORMAL_MODE event…
** Booting into normal mode **
{} Stored configuration:
• Hardware device ID: fca59de0
• Device ID: esp001
• Boot mode: normal
• Name: ESP
• Wi-Fi
â—¦ SSID: ChaosNet
â—¦ Password not shown
• MQTT
â—¦ Host: 192.168.0.22
â—¦ Port: 1883
â—¦ Base topic: devices/
â—¦ Auth? no
â—¦ SSL? no
• OTA
â—¦ Enabled? no
↕ Attempting to connect to Wi-Fi…
↕ Attempting to connect to Wi-Fi…
↕ Attempting to connect to Wi-Fi…
↕ Attempting to connect to Wi-Fi…
anything obvious in my settings? i thought i may of typed password wrong, but went through config again with same result
Thanks Chris

@marvinroger
Hey Marvin, can you give a dummies guide explanation to how the Homie devices knows to boot up in configuration mode?

I’m fining that with my Wemos D1 mini it appears random… If I just plug/unplug the power a few times it boots up properly and connects to the wifi using the saved settings, but then all of a sudden if I plug it in again then it boots into config mode and seems to have lost it’s settings?

Known problem with the Wemos(https://github.com/marvinroger/homie-esp8266/issues/5). Seems to be related to the Windows driver.

That is why the OTA updates are so useful - no need to plug into PC so no chance of resetting!

@Chaos can you take a look at https://github.com/marvinroger/homie-esp8266/issues/75? Is it the same issue?

@TommySharp when the device finds a valid configuration file on the filesystem, it boots into normal mode, otherwise it boots into config mode. As @ben_jones12 said, there is a problem with Wemos devices that seems to corrupt the filesystem.

Hey Ben, thank you for your small lightweight server. I installed it yesterday on my pi for testing. The last message in the log file is:
* 2016-04-24 23:47:56,340 DEBUG Attempting connection to MQTT broker at localhost:1883…
homie-ota.log (END)*
Shouldn’t be there a positive feedback when the OTA-Server is well connected?

Greetings from Hamburg
Christan

Ahhhh … :wink:

I forgotten a slash in the ini at “ota-endpoint”. Now a home device was found.

Ahoi Christian

1 Like

FYI - https://github.com/jpmens/homie-ota is ready for prime time now. Supports firmware management including uploading and OTA scheduling. See the repo README for more details.

1 Like