Can I use a DHT-11 Sensor to run balenaSense on a balenaFin ?

I wanna run a DHT-11 with a balenaFin and deploy the balenaSense project ?
So can this work in my case ? Are there some guidelines for using that ?
P.S. I am using a balenaFin v1.0 with a generic DHT-11 Sensor plus using balenaOS.

Hey @arijit

balenaSense doesn’t support the DHT-11 out of the box right now. There is a similar implementation for the DS18B20 and balenaSense the w1thermsensor library under the hood.

So to support the DHT series, you would need to

  1. find a python library and install it. this would be done in the Dockerfile. so maybe if you want to use, you would need to change RUN pip install smbus w1thermsensor enviroplus RPi.GPIO to RUN pip install smbus w1thermsensor enviroplus RPi.GPIO dht11

  2. implement a class similar to this but using the library for the dht11

  3. modify this block to detect the sensor and use the class above and instantiating an object

This would be the general workflow.

Hope this is helpful

@rahul-thakoor Great thanks for the suggestions and reply. There is a bit change in our project cause now we are thinking of using Raspbian instead of balenaOS. Any suggestions for which image and which formatter to use would be grateful. :grinning:

Hi Arijit,

Our Raspbian image for the balenaFin is found here:


1 Like

@phil-d-wilson Thanks for sharing Phil! Could you also please suggest which formatter to use cause we already have the balenaOS in the balenaFin but we wanna remove it and use Raspbian ?


It’s best to use Etcher for this:


I might be wrong but I think Etcher is used for flashing images not removing them. I mean’t to say that @phil-d-wilson we wanna remove the balenaOS out of the Fin and then put the Raspbian. So in that case is it possible ?

Hi Arijit,

Using Etcher to flash the new image will overwrite the previous image. You don’t need to remove anything first.


1 Like

@phil-d-wilson Thanks for sharing. I followed all the steps and successfully downloaded the Raspbian Lite on the balenaFin. We wanted to interface VNC server in the balenaFin which I did all the steps but evertything went in vain. Now I am trying to download the lite desktop using “sudo apt-get install lightdm” … it went upto 74% installed but then continuously shows 404 error whereas both the WiFi and the network to which it is connected to is running everything at a good speed. Could you please help me out of the situation ?

Hello Arijit, Please could you share the console output you see when you get this 404 error?

Hi @srlowe! Sorry for the late response. Here is the 404 error that I see while doing the above work.

Try a sudo apt update first Arijit, then try your install again. :slight_smile:

1 Like

@dtischler Nothing seems to work here. :pensive:
This is what I get after trying sudo apt update for an hour -

Hi Arijit. Thanks for the screenshot I can see what happened. Looks like when running sudo apt update you pressed Ctrl-Z this actually stopped the update. If you use the command jobs you can see which processes you have stopped and use the command fg to resume the process. Once you have resumed the process you should see the update continue and finally finish. Here is a reference how to resume processes stopped with Ctrl-Z

1 Like

Hey @codewithcheese thanks for sharing this. Well I did as per you told but unfortunately it gave out the same 404 error. One good news is there that now SSH gets enabled successfully and is running Putty. But even though I get the 404 error . Could you guys please do something ?

Hey Arijit, this is sounds odd, are you sure the sudo apt update completed successfully? Maybe we can try restarting from scratch with a new raspbian image, make sure you run sudo apt update on that, wait for it to complete successfully, and then try the installation again. Let us know if it still not working then and please add a screenshot of the sudo apt update results.

Hey everyone. Having extremely good news. The desktop got downloaded and yeah it worked with SSH. :grinning: I don’t know how but suddenly it started downloading (might be a server issue) and went on through the entire process. I am very sorry for causing any trouble to you guys.

Again thanks a lot to everyone for helping this out.

That is great to hear. Good job on getting everything working :slight_smile:

1 Like