diff --git a/.drone.yml b/.drone.yml index 8317fe5..a13de60 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,8 +10,10 @@ steps: - sed -i "s/WIFIPASS/$iotpwd/" data/homie/config.json - sed -i "s/HOSTNAME/$hostname/g" data/homie/config.json - sed -i "s/HOSTNAME/$hostname/g" data/homie/config.json - - sed -i "s/HOSTNAME/$hostname/g" platformio.ini + - lastknownip=$(mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1) + - sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini - cat data/homie/config.json + - cat platformio.ini - pip install -U platformio - platformio run --environment d1_mini environment: diff --git a/platformio.ini b/platformio.ini index ff1cea5..fd11692 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,6 +25,5 @@ lib_deps = https://github.com/adafruit/DHT-sensor-library https://github.com/adafruit/Adafruit_Sensor upload_protocol = espota -upload_port = 172.23.23.12 # volumeknob3 +upload_port = HOSTNAME # 172.23.23.12 # volumeknob3 upload_flags = --host_port=54321 -#upload_port = 10.90.25.206