Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery messages for non-namespaced components cause errors #168

Open
bergie opened this issue Feb 25, 2018 · 0 comments
Open

Discovery messages for non-namespaced components cause errors #168

bergie opened this issue Feb 25, 2018 · 0 comments

Comments

@bergie
Copy link
Member

bergie commented Feb 25, 2018

The MicroFlo MsgFlo compatibility mode (see microflo/microflo#143) makes participants that don't have a namespace. This causes errors within MsgFlo:

Participant discovery failed: Cannot set property 'definition' of undefined
TypeError: Cannot set property 'definition' of undefined
   at Library._updateComponents (/opt/c-flo/node_modules/msgflo/lib/library.js:262:36)
   at Library._updateDefinition (/opt/c-flo/node_modules/msgflo/lib/library.js:297:17)
   at Coordinator.updateParticipant (/opt/c-flo/node_modules/msgflo/lib/coordinator.js:306:18)
   at Coordinator.participantDiscovered (/opt/c-flo/node_modules/msgflo/lib/coordinator.js:284:19)
   at Coordinator.handleFbpMessage (/opt/c-flo/node_modules/msgflo/lib/coordinator.js:261:19)
   at broker.subscribeParticipantChange (/opt/c-flo/node_modules/msgflo/lib/coordinator.js:221:18)
   at MessageBroker._onMessage (/opt/c-flo/node_modules/msgflo-nodejs/lib/mqtt.js:155:20)
   at MqttClient.client.on (/opt/c-flo/node_modules/msgflo-nodejs/lib/mqtt.js:50:21)
   at MqttClient.emit (events.js:159:13)
   at MqttClient._handlePublish (/opt/c-flo/node_modules/mqtt/lib/client.js:905:12)
   at MqttClient._handlePacket (/opt/c-flo/node_modules/mqtt/lib/client.js:301:12)
   at process (/opt/c-flo/node_modules/mqtt/lib/client.js:257:12)
   at Writable.writable._write (/opt/c-flo/node_modules/mqtt/lib/client.js:267:5)
   at doWrite (/opt/c-flo/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:406:64)
   at writeOrBuffer (/opt/c-flo/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:395:5)
   at Writable.write (/opt/c-flo/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:322:11)
{"protocol":"discovery","command":"participant","payload":{"component":"FeinstaubSensor","label":"","icon":"","id":"staub/arboretum","role":"staub/arboretum","outports":[{"id":"temperature","type":"any","queue":"staub/arboretum/temperature"},{"id":"humidity","type":"any","queue":"staub/arboretum/humidity"},{"id":"pm25","type":"any","queue":"staub/arboretum/pm25"},{"id":"pm10","type":"any","queue":"staub/arboretum/pm10"}],"inports":[{"id":"in","type":"any","queue":"staub/arboretum/sampleinterval"},{"id":"in","type":"any","queue":"staub/arboretum/sendinterval"}],"extra":{"lastSeen":"2018-02-25T00:49:09.124Z"}}}
bergie added a commit to c-base/c-flo that referenced this issue Feb 25, 2018
bergie added a commit to c-base/microflo-luftdaten that referenced this issue Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant