Push notification alert

HELLO everyone i am not receiving alert notification , below are the screenshot of my code and alert configuration
please help me with this so i can move forward
please reply ASAP as this is second post on this and i am not getting any reply

@yeshwant.naik alert1|426x500 alert2

Sir I have configured to a product but still I am not receiving alerts please guide me


Can you share the screenshot of the hardware config and the code that you have written?


here are all the screenshoot please help as soon as possible

Hello sir I am waiting for your reply please help me ASAP


Hello can you help me solve this

@abutalahabelvadi are you getting this error in case of Alert On button only?

yeah i am not getting alert

In case of both buttons? Or just with the On button!

i have done as they instructed but i am not getting alert for both buttons
i have used analogwrite 240 in code
and in alert configuration i have set it to 0 pin greater than 20

but still i am not getting alert

@abutalahabelvadi according to the condition it means that whenever the value at pin 0 exceeds 200 an alert is given.
In the code of the Alert On button, remove the double quotes around text-color.
But still I am a bit confused with what you have written and what are you asking!
You are using the analogWrite function, so you are setting the value of the pin yourself and in the condition part you are requesting an alert whenever it exceess the value of 200.
Means it doesn’t make any sense as you are yourself setting the value and then checking the condition!

explain what should me my code and how to get alert

Sorry’ I haven’t studied this topic

In the Bolt IoT & ML kit, there are following devices included. It has a Temperature Sensor (LM35) , Light Sensor (LDR) , LED and a piezo-buzzer. So basically you can write a program to give alert when you are using an input device (through which you can read a value). LM35 and LDR are two input devices. So you can use any of the two devices to make a product which will give an alert whenever the value crosses a threshold value.

LDR requires a simple hardware configuration, so I will give detail about a program using the LDR.

Hardware configurations for the LDR Sensor

So do the above connections in the Bolt Module. Make sure that you use a resistor of 10k ohm (color code: Brown Black Orange). I have made a clear configuration diagram, but you can also find the same in the Training.

Product Code
I have implement this via python code, which I ran on the UBUNTU OS. Before sharing that python file code with you, I want to confirm that you were making your initial prject with BOlt Cloud Pro? Are you familiar with UBUNTU and coding in python!

1 Like

thank you i am not a pro member

Because when we use the analogRead or digitalRead function, in response of our request we get a JSON object from the Bolt Cloud. The response is in this fashion:
{“success”: “1”, “value”: “245”} , the value attribute will hold the value recorded by a particular input device.
So in order to extract that value from the JSON object we will have to use the json module of Python. Also in order to get the response from the sever we will have to use the requests modeule to make the HTTP request.
All this stuff can’t be done in the Bolt Cloud dashboard so you have to use a programming langugae to do so. And in order to given an alert notification we can use the 3rd part services like (SMS service named Twilio or Email service named Mailgun).

So if you are eager to know then I can share the code :smile:

1 Like

please share the code
with the below code will i get an alert or not for buzzzeralert2

@abutalahabelvadi , did you try removing the quotes around text-color because it should not be in quotes as it is a key-value pair of the object singleButton.
In the initial post done by you, you have shared the screenshot of a page where you are manually filling up the condition and alert notification. What is that? How are you accessing that. ARe you using the Bolt Cloud via mobile?

@abutalahabelvadi so as I have told you that you have to use an input device and through the readings fetched by that device, you can make the Buzzer work accordingly.

I have used a LDR sensor to sense the value of the light falling on it and I have attached a buzzer to the GPIO 1 pin so that whenver the value crosses a threshold then buzzer starts producing sound. As the LDR reading can vary from 0 to 1024, so I have proposed different buzzer intensities for different input values.

I have written the code on UBUNTU server by the help of Python language.

Result of the following code is:

So this will run inside an infinite while loop and accordingly the buzzer make noises of different intensities according to the LDR value

I hope this clears your doubt.

1 Like