Hi all!
After quite a loong time here I’m again. Still with Blynk 
Well, today an idea came into my mind. Here is a short summary:
- A working device which sends a multitude of values (by means of Virtual pins naturally) to local server.
- A second device, which “needs” one of those values to it’s own calculations.
Now, I see two possibilities, none of those satisfies my needs:
- using bridge: The problem I see here is that every device serving value needs to “talk” to every other which needs it. That is, every time I need to add a ‘node’ which needs ‘foreign’ value, it is necessary to reflash a ‘serving’ device to add this node to it’s serving list (bridge). Not optimal.
- using duplicated token (same token on every sharing device). Although not tested by myself, this one seems to work. Again not very elegant, as a list of virtual pins for a whole devices network needs to be consolidated. Also it messes up some things, for example. the device present notifications (at least I thing so)
Personally I would love to see the answer, when a “client->server” bridge is possible. I mean, is it possible to initialize bridge from node (be it the FIRST) which ‘borrows’ a value from other node, which knows nothing about the first node? If not: is it possible to implement it without completely redesigning ‘Blynk internals’ (i.e Blynk protocol)?
Welcome back
!
Yeah. The same problem actually was risen few times here already in last month. We were thinking about some kind of new command or some kind of reserved pin (shared pin) that could be accessed by any device.
If you have any ideas - please share.
So I’m not the only one… Actually i was sure about that, but couldn’t find any relevant topic.
Then I’m currently in a position, that the best would be to reverse the bridge functionality.
Currently I have not any idea how it should be implemented - not enough knowledge. But I’m thinking about such a scenario:
- A node “sharing” knows nothing about any other node. Therefore to work, sharing needs pushing data to server with
Blynk.virtualWrite()
- The ‘querying’ node needs to know who to ask. So it needs to know the id (auth code) of the sharing node. So far some similarities with bridge functionality are in my mind…
- Then we could define a READ ONLY virtual pin, and every call to it when reaching the server would return a value from the pin belonging to the “bridged” device.
Naturally I have not idea, how to do it! As the Blynk protocol does not contain auth code, this communication ‘channel’ needs to be opened during initialization, I think… I,m not sure if it needs special command for Blynk protocol, rather special handling on server side. I mean, once initialized it is the server business to send the value from device aabbcc
which has the needed value. The ‘quoting’ node just reads the virtual pin as usual, but the server has to be configured:
- "Hey server, a
<ccddee>
is presenting to you! I may need a value from <aabbcc>
, from pin V15. In such case could you please share it on my V31 pin? And please, keep it secret!
- An usual comm is taking place here…
- And then: “Aaaha! I see node
<ccddee>
is asking for V31… Then i will send <aabbcc>
V15 value, but shhh… I’m not gonna tell him anything.”
Yeah… The above you may consider as an idea… But once again - how to do it??? I have NO IDEA…
1 Like
No problem. We have few ideas. The main challenge here is to implement this with small efforts and make it simple.