node-red / node-red/node-red-nodes

Multiple sensortags does not seem to work

Open
#486 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

I have been trying to use multiple sensortags connections but it seems to connec only one at a time. is this not possible? my node-red implementation is as follows:

[{"id":"c5c9f88d.45e068","type":"sensorTag","z":"e3210246.bbe9a","name":"tag","topic":"sensorTag","uuid":"24718908e804","temperature":true,"humidity":false,"pressure":false,"magnetometer":false,"accelerometer":false,"gyroscope":false,"keys":false,"luxometer":false,"x":70,"y":160,"wires":[["77cc9637.f0fbd"]]},{"id":"88e31936.435b8","type":"mosca in","z":"e3210246.bbe9a","mqtt_port":1883,"mqtt_ws_port":8080,"name":"MQTTBroker","username":"test","password":"user1","dburl":"","x":210,"y":60,"wires":[[]]},{"id":"6edbff97.121ac8","type":"mqtt in","z":"e3210246.bbe9a","name":"","topic":"sensorTag","qos":"2","broker":"638eb4d1.c908fc","x":560,"y":60,"wires":[["8fc9e6df.fcec7"]]},{"id":"8fc9e6df.fcec7","type":"debug","z":"e3210246.bbe9a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":710,"y":60,"wires":[]},{"id":"77cc9637.f0fbd","type":"switch","z":"e3210246.bbe9a","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"temperature","vt":"str"},{"t":"cont","v":"pressure","vt":"str"},{"t":"cont","v":"lux","vt":"str"},{"t":"cont","v":"humidity","vt":"str"},{"t":"cont","v":"accelerometer","vt":"str"},{"t":"cont","v":"gyroscope","vt":"str"},{"t":"cont","v":"magnetometer","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":190,"y":220,"wires":[["e594a5a6.d2b7"],[],[],[],[],[],[]]},{"id":"58f878b0.554748","type":"function","z":"e3210246.bbe9a","name":"","func":"global.set("amb_temp", parseFloat(msg.payload.ambient));\nglobal.set("obj_temp", parseFloat(msg.payload.object));\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":300,"wires":[["7a0ecc0a.0ed7c4"]]},{"id":"f486040a.563008","type":"debug","z":"e3210246.bbe9a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":710,"y":160,"wires":[]},{"id":"73d18d52.dfea34","type":"mqtt out","z":"e3210246.bbe9a","name":"","topic":"sensorTag","qos":"","retain":"","broker":"638eb4d1.c908fc","x":710,"y":220,"wires":[]},{"id":"8adfcc77.a9335","type":"function","z":"e3210246.bbe9a","name":"","func":"var amb_temp = global.get("amb_temp");\nvar obj_temp = global.get("obj_temp");\nvar amb_temp1 = global.get("amb_temp1");\nvar obj_temp1 = global.get("obj_temp1");\nmsg.payload = {amb_temp,obj_temp,amb_temp1,obj_temp1};\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":240,"wires":[["f486040a.563008","73d18d52.dfea34"]]},{"id":"7a0ecc0a.0ed7c4","type":"delay","z":"e3210246.bbe9a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":660,"y":400,"wires":[["8adfcc77.a9335"]]},{"id":"e594a5a6.d2b7","type":"delay","z":"e3210246.bbe9a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350,"y":160,"wires":[["58f878b0.554748"]]},{"id":"708ad0a7.8013e","type":"sensorTag","z":"e3210246.bbe9a","name":"tag1","topic":"sensorTag","uuid":"24718908d207","temperature":true,"humidity":false,"pressure":false,"magnetometer":false,"accelerometer":false,"gyroscope":false,"keys":false,"luxometer":false,"x":50,"y":380,"wires":[["559c16a7.9ddc6"]]},{"id":"559c16a7.9ddc6","type":"switch","z":"e3210246.bbe9a","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"temperature","vt":"str"},{"t":"cont","v":"pressure","vt":"str"},{"t":"cont","v":"lux","vt":"str"},{"t":"cont","v":"humidity","vt":"str"},{"t":"cont","v":"accelerometer","vt":"str"},{"t":"cont","v":"gyroscope","vt":"str"},{"t":"cont","v":"magnetometer","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":210,"y":420,"wires":[["6fcb7c2d.3cab74"],[],[],[],[],[],[]]},{"id":"538db134.276138","type":"function","z":"e3210246.bbe9a","name":"","func":"global.set("amb_temp1", parseFloat(msg.payload.ambient));\nglobal.set("obj_temp1", parseFloat(msg.payload.object));\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":340,"wires":[["7a0ecc0a.0ed7c4"]]},{"id":"6fcb7c2d.3cab74","type":"delay","z":"e3210246.bbe9a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":390,"y":440,"wires":[["538db134.276138"]]},{"id":"638eb4d1.c908fc","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the flow with its two sensorTag nodes and UUIDs, 24718908e804 and 24718908d207. Start by locating the sensorTag node entry point and checking how it manages connections, then verify whether both tags can publish temperature readings concurrently. Done means the expected multi-tag behavior is confirmed or the limitation is documented with a clear failure case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.