saltcorn / mqtt

mqtt events plugin
MIT License
0 stars 0 forks source link

Error Publishing MQTT Message #1

Open upstreamproductions opened 8 months ago

upstreamproductions commented 8 months ago

Tried configuring to publish on insert get error:

"Cannot read properties of undefined (reading 'publish')"

Get error no matter what type of event is triggered

Saltcorn log:

TypeError: Cannot read properties of undefined (reading 'publish') at Object.run (/home/saltcorn/plugin_packages/@saltcorn/mqtt/index.js:79:16) at Trigger.runWithoutRow (/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/data/models/trigger.ts:295:14) at /home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/server/routes/actions.js:621:30 at processTicksAndRejections (node:internal/process/task_queues:95:5)

glutamate commented 8 months ago

Looks like the client is not configured, have you set up the broker URL in the module configuration? Are you able to receive messages by adding a trigger on the MqttReceive event?

upstreamproductions commented 8 months ago

It is setup in the module and will receive MQTT messages it will just not let me send them. should is just be the host name or does it need mqtt:// or ws://?

Kevin Revelle

Director of Operations

[cid:c8f1ccb8-ca49-456a-941e-f7b7256e0105]https://upstreamproductions.ca


From: Tom Nielsen @.> Sent: Wednesday, December 13, 2023 3:27 AM To: saltcorn/mqtt @.> Cc: Kevin Revelle @.>; Author @.> Subject: Re: [saltcorn/mqtt] Error Publishing MQTT Message (Issue #1)

Looks like the client is not configured, have you set up the broker URL in the module configuration? Are you able to receive messages by adding a trigger on the MqttReceive event?

— Reply to this email directly, view it on GitHubhttps://github.com/saltcorn/mqtt/issues/1#issuecomment-1853466823, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3ZSRXIINRWIISO2LXDMHBTYJFRIFAVCNFSM6AAAAABASIY4N2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGQ3DMOBSGM. You are receiving this because you authored the thread.

The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.