jpmens/homie-ota

Can't get homie-ota.py to run (Debian or Ubuntu). Fails missing global section?

Closed this issue · 3 comments

With some mangling I was able to get Homie-OTA to work on a Raspberry Pi Zero W, but now I'm trying to set it up in a more permanent fashion on a Ubuntu 16.04 VM (Proxmox KVM) or on Debian 8. I'm failing, but not sure why. I'm not an experienced user of either Ubuntu or Debian, so I could easily be missing something obvious.

I've following the install instructions, but I can't get homie-ota.py to run manually. As best I can tell, this is where it's failing:

Traceback (most recent call last):
  File "/root/homie-ota/homie-ota.py", line 39, in <module>
    DEBUG = config.getboolean("global", "DEBUG")
  File "/usr/lib/python2.7/ConfigParser.py", line 368, in getboolean
    v = self.get(section, option)
  File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'global'

Does that make sense? Is there something else I need to do on either a Ubuntu or Debian VM? Both seemed to fail at the same spot. Not sure why an RPi would work, but these would not.

I really like the project! This is a great addition to Homie - makes updates and monitoring of units extremely easy. Thank you!

I believe I've discovered my issue, I had the MQTT broker set in the homie-ota.ini file set as localhost, when I didn't have MQTT set up on the same host. When I switched from localhost to the IP of my broker, the server started up. Previously I had MQTT and Homie-OTA set up on the same host.

Maybe an improvement would be to check the availability of an MQTT broker?

I'd have imagined "Missing global section" would mean something ... maybe we can improve on error messages, yes.

As to your 2nd comment: no.

Just tested a new git clone and install and everything works, thank you!