Contrôle de la lumière du salon avec un SonOff Basic et Home Assistant
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.5 KiB

3 years ago
  1. inocode:
  2. image: "java:8"
  3. variables:
  4. ESPURL: "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
  5. MEMORY: "custom_FlashSize=generic_1M64"
  6. FLASHFREQ: "custom_FlashFreq=generic_40"
  7. INSTBOARD: "esp8266:esp8266"
  8. BOARD: "${INSTBOARD}:generic"
  9. GITREMDEB: "https://github.com/JoaoLopesF/ESP8266-RemoteDebug-Telnet.git"
  10. before_script:
  11. - apt update
  12. - apt -y install xvfb
  13. - Xvfb :1 -nolisten tcp -screen :1 1280x800x24 &
  14. - export DISPLAY=":1"
  15. - cd /
  16. - wget --quiet "https://downloads.arduino.cc/arduino-1.8.2-linux64.tar.xz"
  17. - tar axf "arduino-1.8.2-linux64.tar.xz"
  18. - /arduino-1.8.2/arduino --pref "boardsmanager.additional.urls=${ESPURL}" --save-prefs
  19. - /arduino-1.8.2/arduino --install-boards "${INSTBOARD}"
  20. - /arduino-1.8.2/arduino --pref "compiler.warning_level=all" --pref "${MEMORY}" --pref "${FLASHFREQ}" --board "${BOARD}" --save-prefs
  21. script:
  22. - /arduino-1.8.2/arduino --install-library "FastLED"
  23. - /arduino-1.8.2/arduino --install-library "PubSubClient"
  24. - cd "/root/Arduino/libraries/"
  25. - git clone "${GITREMDEB}"
  26. - cd "${CI_PROJECT_DIR}/arduino/${CI_PROJECT_NAME}"
  27. - cp "${CI_PROJECT_NAME}.example.h" "${CI_PROJECT_NAME}.h"
  28. - /arduino-1.8.2/arduino --verify "${CI_PROJECT_NAME}.ino"
  29. yaml:
  30. image: "python:alpine"
  31. before_script:
  32. - pip install "homeassistant"
  33. script:
  34. - hass --config "${CI_PROJECT_DIR}/home-assistant" --script check_config