You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I recognized it does not work corretly.
So, digged into meshblu, and found some clues and fixed those.
However, I'm not a meshblu developer, so I am not sure it's fine.
My fixing is below to run https://github.com/octoblu/data-forwarder-mongodb
1) lib/SubscriptionGetter.coffee
8, 9 line has function name of "broadcast" and "config", but does not have about "received".
So, I appended received: 'canReceive' to SECURITY_MAP
Hi~
Recently, I got a necessity of data forwarder.
So, to know how to use it and verify it works properly,
I used https://github.com/octoblu/data-forwarder-mongodb
But I recognized it does not work corretly.
So, digged into meshblu, and found some clues and fixed those.
However, I'm not a meshblu developer, so I am not sure it's fine.
My fixing is below to run https://github.com/octoblu/data-forwarder-mongodb
1) lib/SubscriptionGetter.coffee
8, 9 line has function name of "broadcast" and "config", but does not have about "received".
So, I appended received: 'canReceive' to SECURITY_MAP
@SECURITY_MAP:
broadcast: 'canReceive'
config: 'canDiscover'
received: 'canReceive'
2) src/publish-forwarder.coffee
structure of meshblu.forwarder is
"meshblu": {
"version": "2.0.0",
"forwarders": {
"message": {
"received": [...]
},
"broadcast": {
"received": [...]
}
},
so I fix the code
forwarders = attributes.meshblu?.forwarders?[type] || []
to
forwarders = attributes.meshblu?.forwarders?.message?[type] || []
3) src/controllers/device-controller.coffee in https://github.com/octoblu/data-forwarder-mongodb
fix
messageReceived = {subscriberUuid: uuid, emitterUuid: uuid, type: 'message.received'}
broadcastReceived = {subscriberUuid: uuid, emitterUuid: uuid, type: 'broadcast.received'}
to
messageReceived = {subscriberUuid: uuid, emitterUuid: uuid, type: 'received'}
broadcastReceived = {subscriberUuid: uuid, emitterUuid: uuid, type: 'broadcast'}
4) example.sh in https://github.com/octoblu/data-forwarder-mongodb
fix the type of message.received to received
meshblu-util subscription-create -s $FORWARDER_DEVICE_UUID -e $RECEIVER_DEVICE_UUID -t received ./tmp/data-forwarder-meshblu.json
I just tested it and had proper work.
Could you scrutinize that it is suitable?
Thanks in advance.
p.s) If you want, I can give diff.
The text was updated successfully, but these errors were encountered: