In case it is not possible to send data to Blynk claud via WiFi, I use SigFox. It’s great communication.
Data from my device is sent to https://backend.sigfox.com and then by Callback to blynk-cloud.com Everything works correctly. Well, there’s one problem. Data to Blynk is sent in hexadecimal format, max. 12 bytes. That’s why I use Payload and save every bit!
For example: a temperature of -10.5 ° C cannot be sent directly, but I have to recalculate it to a new range. The sensor scans in the range of -40 to 80 ° C and an accuracy of 0.5 is sufficient. The new range will be (80 + 40) /0.5 = 240. So -40 ° C = 0 and 80 ° C = 240. Then the value -10.5 ° C = 59.
(-10.5 + 40) / 0,05 = 59. This way I only occupy 4 bits.
But there is a problem!
This value in BLYNK Widgets cannot be recalculated back to ° C.
Here it is possible to map input 0 - 1023 only to 0-100%.
A mapping function with a resolution of at least two decimal places would be useful here: map (value, fromLow, fromHigh, toLow, toHigh)
Hello. Currently - no. What you send is what you get. We introduced formulas in new Blynk 2.0 version to deal with that kind of problems. However, it is not yet available in the public.
Hello.
Thank you for the information.
Can you help me adjust the data format before sending it in Callback from https://backend.sigfox.com/?
I can’t find the correct syntax.
Recalculate 59 back to -10.5 ° C
For example:
I’m also interested in how to target multiple values on Blynk claud through one Callback.
This does not work: http://139.59.206.133/xxx..../update/V1?value={customData#tep}&V2?value={customData#bat0}&V3?value={customData#vah0}&V4?value={customData#bat1}&V5?value={customData#vah1}&V6?value={customData#bat2}&V7?value={customData#vah2}&V8?value={customData#bat3}&V9?value={customData#vah3}&V10?value={customData#bat4}&V11?value={customData#vah4}&V12?value={customData#bat5}&V13?value={customData#vah5}
The more I read about your workarounds, and your workarounds for the workarounds, the more I’m convinced that you are approaching this from the wrong angle.
You need a piece of middleware - either software or hardware to translate between the two systems.
This might be do-able in IFTTT (although that wouldn’t be my preferred approach).
My preferred approach would be to use Node-Red as this would be the simplest and most efficient. However, you’ve already rejected this approach.
This leaves a hardware approach - something like a NodeMCU that sits on your home network and frequently queries the Sigfox server, gets the data and transforms it into the desired format then writes it to the Blynk server for use in the app.
Hi!
I first try to find a direct solution for SigFox and BLYNK.
Communication is already running smoothly thanks to your help.
I am waiting for a response from SigFox support to see if it is possible to use the Callback syntax directly to recalculate the value.
I can try IFTTT, I already know. I don’t refuse Node-Red, I just don’t know yet.
The second question is, can I write more variables via one callback? For example, through Thingspeak, it works.
Excuse me.
I thought it was clear from the context. I wrote it up.
Ide o callback eod https://backend.sigfox.com/
I can send values to Blynk one by one. http://139.59.206.133/xxx..../update/V1?value={customData#tep} http://139.59.206.133/xxx..../update/V2?value={customData#bat0} http://139.59.206.133/xxx..../update/V3?value={customData#vah0} ...
There are up to 13 such callbacks.
When I send it to Thingspeak I use the “&” character there:
I was simply taking this as a rejection of that approach:
but, if you are open to that idea then you should investigate it further. Node-Red can be run on a PC or something like a Raspberry Pi. If you’ve already used MQTT, as you’ve indicated in your other topic, then the two go hand in hand.