Sensor Block not uploading correct

Hello all,
Forgive me but I am new to balena. I’ve added the Sensor block at my device and it worked as intended. I wanted to make some changes in the code for the calculations as well. The first thing that I did was to see if the build procedure and upload is working correctly, so I added at the beginning of the sensor.py a print:

print("\t\t\t\t\t Test for build and upload\n\r")

I also changed the version in balena.yml to 2.0.0. The upload is successful, but the comment that I added dose not show in the terminal in balena. Is there anything else I need to do except pushing?
Thank you

Hello, did you try adding your print line after if __name__ == "__main__": in sensor.py? Once you make your changes, you just need to use the balena CLI to push the updated app to your device. If you are using the docker-compose file, make sure to change the image: balenablocks/sensor line to build: . (assuming your Dockerfile is in the same folder) so it uses your local build instead of the image on the Docker Hub.

1 Like

Thank you Alan for the reply. I have inserted the print comment in the correct position, but I didn’t update the docker-composer.yml file to build: . . This did the job. Once again thank you.