peteh/doorman

Installation/Compiling instructions/documentation

Closed this issue · 4 comments

Hey,

first, thanks for the project/work.

I wanted to start using it, but have no clue how to compile/build the project and how to flash it.
Would it be possible to write a short guide/documentation on how to build and flash it?

Thanks in advance.

peteh commented

Hi Marc,

I think adding detailed instructions is a bit redundant as it's the standard way to open a project in vscode with platform io and flash it to a standard dev board.

You will need vscode with platformio extension installed on your pc.

You will have to rename config.h.sample to config.h in the project and enter your wifi/mqtt details.

You can more or less follow this instruction about how to build a project with platform io: https://www.youtube.com/watch?v=nlE2203Q3XI

Let me know if you get stuck somewhere after watching the video.

peteh commented

I'll close the issue, let me know if you need further help.

Sorry for the late response.

I cant use PlatformIO, it throws a error when i try to open "PIO Home" in VSCode. (platformio/platformio-vscode-ide#3912)
Is there a way to build & upload the project from a other way, especially the sample codes?

EDIT:
Reading and browsing the issues for the platformio vscode extension its really buggy and nearly unusable.
The cant take up to the amount of issues that are reported. The last "handled" issue is from 2021, where they assigned badges to.

I think platformio is not great solution to work with.
They focus more on support 1000+ boards than on stability of the tools they provide.

Is it possible to build this with ArudinoIDE or some other tool rather than platformio?

Thanks in advance :)

peteh commented

You can always build in Arduino IDE.

  1. Rename the main.cpp to main.ino
  2. You might have to remove the Arduino.h import in main.ino
  3. You have to manually install all the libraries that are listed in platformio.ini

Platformio is pretty stable if you don't run on 4 year old LTS versions of your operating system (based on your kernel I assume you are running ubuntu 20.04). My guess is that there is a python incompatibility because you are still on Python 3.6 while the most recent version is python 3.12 and most distros run on 3.10 or 3.11.

Your problem is this:
https://stackoverflow.com/questions/52796630/python3-6-attributeerror-module-asyncio-has-no-attribute-run

The functionality used that produces your error in platformio is because the functionality has only been added in Python 3.7 but you are running python 3.6.

If you want to use it on your old system, you could look into pyenv, but it's also a painful path.

My recommendation is to update to the latest LTS version which is 22.04. This would solve your issue as it ships with python 3.10.