Connect Node Red Inject Node with Cayenne


#1

Hi, I have been trying to send the data through inject node red to Cayenne sensor using mentioned below the flow.


Though after deploying I was able to connect by placing the Client ID but on the other hand I am still not able to check out Cayenne IOT dashboard

Is there anything I am missing?
Any suggestion on this will very helpful


#2

can you share the nod-red flow you are using?


#3

Mentioned below is my flow

[{“id”:“3707ad7b.416fa2”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“143f0e0c.50a5b2”,“type”:“cayenne sensor”,“z”:“3707ad7b.416fa2”,“client”:“cd7e046a.be1af8”,“qos”:“0”,“name”:"",“datatype”:"",“dataunit”:"",“channel”:“1”,“datatypeEx”:“weight”,“dataunitEx”:“lbs”,“x”:429.78977966308594,“y”:120.30112075805664,“wires”:},{“id”:“3371d5f9.8bf0ca”,“type”:“inject”,“z”:“3707ad7b.416fa2”,“name”:"",“topic”:“112”,“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:190.7869110107422,“y”:87.97443389892578,“wires”:[[“143f0e0c.50a5b2”]]},{“id”:“cd7e046a.be1af8”,“type”:“cayenne-client”,“z”:"",“broker”:“2f70a0d2.a0ff7”,“username”:“varuljain5@gmail.com”,“clientid”:“6dc13b80-3b30-11e9-8f2a-a7100372a66b”,“name”:“Temperature testing”},{“id”:“2f70a0d2.a0ff7”,“type”:“mqtt-broker”,“z”:"",“name”:“iot.eclipse.org”,“broker”:“iot.eclipse.org”,“port”:“1883”,“clientid”:"",“usetls”:false,“compatmode”:true,“keepalive”:“5”,“cleansession”:true,“birthTopic”:"",“birthQos”:“0”,“birthPayload”:"",“closeTopic”:"",“closeQos”:“0”,“closePayload”:"",“willTopic”:"",“willQos”:“0”,“willPayload”:""}]


#4

i cannot import your flow. looks like there is some issue with your flow. can you readd export and add it again.
one thing i notice is you are using iot.eclipse.org?


#5

Hi
please check, I hope it will work this time,
MQTT server is already running on this name - iot.eclipse.org
Should I have to change the server name also?

[
{
“id”: “3707ad7b.416fa2”,
“type”: “tab”,
“label”: “Flow 1”,
“disabled”: false,
“info”: “”
},
{
“id”: “143f0e0c.50a5b2”,
“type”: “cayenne sensor”,
“z”: “3707ad7b.416fa2”,
“client”: “cd7e046a.be1af8”,
“qos”: “0”,
“name”: “”,
“datatype”: “”,
“dataunit”: “”,
“channel”: “1”,
“datatypeEx”: “weight”,
“dataunitEx”: “lbs”,
“x”: 429.78977966308594,
“y”: 120.30112075805664,
“wires”:
},
{
“id”: “3371d5f9.8bf0ca”,
“type”: “inject”,
“z”: “3707ad7b.416fa2”,
“name”: “”,
“topic”: “112”,
“payload”: “”,
“payloadType”: “date”,
“repeat”: “”,
“crontab”: “”,
“once”: false,
“onceDelay”: 0.1,
“x”: 190.7869110107422,
“y”: 87.97443389892578,
“wires”: [
[
“143f0e0c.50a5b2”
]
]
},
{
“id”: “cd7e046a.be1af8”,
“type”: “cayenne-client”,
“z”: “”,
“broker”: “2f70a0d2.a0ff7”,
“username”: "varuljain5@gmail.com",
“clientid”: “6dc13b80-3b30-11e9-8f2a-a7100372a66b”,
“name”: “Temperature testing”
},
{
“id”: “2f70a0d2.a0ff7”,
“type”: “mqtt-broker”,
“z”: “”,
“name”: “iot.eclipse.org”,
“broker”: “iot.eclipse.org”,
“port”: “1883”,
“clientid”: “”,
“usetls”: false,
“compatmode”: true,
“keepalive”: “5”,
“cleansession”: true,
“birthTopic”: “”,
“birthQos”: “0”,
“birthPayload”: “”,
“closeTopic”: “”,
“closeQos”: “0”,
“closePayload”: “”,
“willTopic”: “”,
“willQos”: “0”,
“willPayload”: “”
}
]


#6

you need to use mqtt.mydevices.com server if you need to send data to cayenne. i made a test flow below which send data to cayenne. you need to add your MQTT credential in the flow.

[{"id":"b3eb01f7.3986d","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"dbaacf13.048a3","type":"inject","z":"b3eb01f7.3986d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":306,"y":162,"wires":[["9754bdfe.93395"]]},{"id":"9754bdfe.93395","type":"function","z":"b3eb01f7.3986d","name":"","func":"msg = {\n topic:\"v1/<username>/things/<slient_id>/data/1\",\n payload:\"temp,c=20\"\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":543,"y":154,"wires":[["b0cd75dc.795b68"]]},{"id":"b0cd75dc.795b68","type":"mqtt out","z":"b3eb01f7.3986d","name":"","topic":"","qos":"2","retain":"","broker":"a30e1e3f.316ba","x":703,"y":174,"wires":[]},{"id":"a30e1e3f.316ba","type":"mqtt-broker","z":"","name":"cayenne","broker":"mqtt.mydevices.com","port":"1883","clientid":"<client_id>","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]


#7

@sanrtcaleb23 I don’t think that node is maintained. I would suggest using the standard MQTT node to send data to Cayenne. Have a look at my post here.