Please say what are the things to get corrected?

@akshayan.sinha threshold value as 250

@Amrita_dey

Then how will you receive the telegram message, if the threshold is not crossed?

In your code, you have written, when the value exceeds the threshold value, then it will send a telegram message. So you have to make sure the reading is higher or equal to the threshold value.

You can either decrease the defined threshold value, or wait for the value to be 250 or higher.

then can i put the threshold as 1080

@Amrita_dey

With A0 pin the range of input is 0-1023, so a threshold value that high is not possible.

I hope you understood the problem statement and the solution of the problem with the threshold concept. Threshold is supposed to be the saturation point beyond which you want to send alert.

For example, when the temperature in a room exceeds 40°C, then send an alert. Because a temperature that high is a clear sign of exceeded temperature.

@akshayan.sinha then what should i put in the threshold?

@Amrita_dey

You can put it as 100, as the chances of getting a value higher than 100 is more. You can use any value you wish to, but if you use a sensor (LM35, LDR, etc) then the threshold value is the one you need to manually give to the sensor so that you get a telegram message (when making projects for practice).


i used 100 in threshold

@Amrita_dey

Yes, now the if condition is fulfilled and the telegram function is initiated.
Please read the output line by line, the problem statement is not your threshold here anymore. As the telegram has mentioned ‘Not Found’, that means it is not able to find the chat/bot you have mentioned.

You didn’t make the above change that I mentioned earlier.

Your bot ID will look somewhat like this “botXXXXXXXXXXXXXXXXX”. With correct Bot credentials, and similar sensor value, you’ll receive the message on your telegram group.

@Amrita_dey

Yes add ‘bot’ in front of Bot ID. Example - “bot5008765459:AAFxi…”

The same has been mentioned in the training as well.

i added “bot”,but still its sgowing the same as before

@Amrita_dey

Then check your token and chat ID. The credentials are incorrect. We have resolved these queries on the forum already, it is preferred to search it up on the forum before posting the query.

yes,i checked all the credentials,all are correct

@Amrita_dey

Please share the screenshot of the bot token on your BotFather section and yur conf.py file with me. You can mail it to me at akshayan.sinha@boltiot.com

The Bot ID is most likely incorrect, or it also be that you haven’t added the bot to the Group, and made it as admin.

ok i m sending u by email

There seems to be an error in configuration file. You must have both used the variable bolt_api_key in the configuration file. In the main script you have used bolt_api_key variable which isn’t present in the configuration file. Correct that and it will be good to go

i cannot get ur point

@Amrita_dey

Can you share the error you are receiving now? I did not receive any further response from your side on your error.

Hello… Actually my wifi module is not working, I think something went loose in the device. So shall I contact the customer care or what shall I do now… Please say

Hi @Amrita_dey,

Please share a video recording of the problem that you are facing on support@boltiot.com.