Hello Blynk. At this time, im working in a project using the “Blynk HTTP RESTful API” with the write pin value using PUT.
It works fine with my auth token and value. All tools are in this link
I always recommend using the GET syntax for updating pins. Blynk allows GET in addition to PUT for updates and you can put all the parameters in the url without using the body. Check the docs for the precise syntax.
What type of widget are you sending the value 15 to?
If it’s a button you would have change to normal 0 to 1 parameters in the widget.
I use this command and it works pretty well in V4, i attached images to show that. But also im trying to use this GET featured to send a variable (HCSR) which comes from an arduino board and sent to raspberry via I2C. I also attached my test.py program. Any advice to that?
Hello Blynk, is there any help about this question? @Costas please,if you need more information dont hesitate to send me and email to armando@molautomationpe.com Best regards
This IS the site to get assistance… and “better” answers are based on better questions, clearly supplied details and most of all, keep trying to work it out on your own as well… don’t just wait for another forum volunteer to drop everything and help.
@Gunner i am totally agree with your answer but do you think my question and my images attached not explain what my specific question is? Could you please read it and give me a feedback? thank you and best regards
This is a little snippet I made for reading a DHT:
import Adafruit_DHT
import urllib2
humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT22, 4)
humidity = float(round(humidity, 2))
temperature = float(round(temperature, 2))
if humidity is not None and temperature is not None:
url_humidity = 'http://192.168.178.103:8081/<token>/update/V1?value=%s' % (format(humidity))
url_temperature = 'http://192.168.178.103:8081/<token>/update/V2?value=%s' % (format(temperature))
urllib2.urlopen(url_humidity)
urllib2.urlopen(url_temperature)
else:
print 'Geen data'
I just execute this with crontab every 30s (way overkill, but ok).
@reboot while true ; do python /home/pi/blynk/python/dht.py & sleep 30; done >/dev/null 2>&1