GithubHelp home page GithubHelp logo

signalk-mqtt-bridge's People

Contributors

iuriaranda avatar rajlaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

signalk-mqtt-bridge's Issues

path.replaceAll is not a function at signalkPathToMqttTopic

Installed plugin and configured it to a mosquitto broker.
the signalk keepalive topic is published to the broker, but I cannot get any sk paths to be published.
signalk log is full of the following messages:

Feb 17 16:32:31 TypeError: path.replaceAll is not a function at signalkPathToMqttTopic (/data/conf/signalk/node_modules/signalk-mqtt-bridge/index.js:333:17) at handleDelta (/data/conf/signalk/node_modules/signalk-mqtt-bridge/index.js:187:36) at /usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1048:16 at /usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:463:23 at processAfters (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:359:11) at Object.inTransaction (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:439:9) at Dispatcher.push (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1214:24) at Dispatcher.handleEvent (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1267:17) at Bus.sink (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:242:17) at Bus.push (/usr/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:2371:21) at StreamBundle.push (/usr/lib/node_modules/signalk-server/lib/streambundle.js:90:19) at StreamBundle. (/usr/lib/node_modules/signalk-server/lib/streambundle.js:38:22) at Array.forEach () at processIems (/usr/lib/node_modules/signalk-server/lib/streambundle.js:37:19) at StreamBundle. (/usr/lib/node_modules/signalk-server/lib/streambundle.js:57:21) at Array.forEach () at StreamBundle.pushDelta (/usr/lib/node_modules/signalk-server/lib/streambundle.js:52:27) at FullSignalK.emit (events.js:412:35) at FullSignalK.addDelta (/usr/lib/node_modules/signalk-server/node_modules/@signalk/signalk-schema/dist/fullsignalk.js:52:8) at DeltaChain.doProcess (/usr/lib/node_modules/signalk-server/lib/deltachain.js:14:18) at DeltaChain.process (/usr/lib/node_modules/signalk-server/lib/deltachain.js:10:21) at Function.Server.app.handleMessage (/usr/lib/node_modules/signalk-server/lib/index.js:177:32) at Simple. (/usr/lib/node_modules/signalk-server/lib/pipedproviders.js:60:17) at Simple.emit (events.js:412:35) at addChunk (internal/streams/readable.js:290:12) at readableAddChunk (internal/streams/readable.js:265:9) at Simple.Readable.push (internal/streams/readable.js:204:10) at Simple.Transform.push (internal/streams/transform.js:166:32)

Any suggestions?

Can't get data from mqtt to show up in SignalK

I have successfully gotten the plugin to respond to R requests, and publish SignalK data to my mqtt instance.
If it makes any difference, I am running OpenPlotter v3 on a pi4b4Gb.

I am now trying to get data from mqtt to show up in my SignalK. From my understanding if I do:
mosquitto_pub -u -P -m '1' -t 'D/signalk/3160XXXXX/vessels/self/environment/test'

I should be able to see an entry in the data browser of SignalK environment.test with a value of 1, source being the bridge plugin ... however nothing shows up in SignalK.

Ultimately I am trying to get data into SignalK from my Renogy solar controllers, using https://github.com/Olen/solar-monitor to get data from my controllers, and have configured it to use the prefix of 'D/signalk/3160XXXXX/vessels/self/renogy' for its mqtt topic so I get a renogy data tree in SignalK, but of course its not showing up.

This data shows up as expected in the mqtt explorer program I am using to debug, as does my test above, and my tests trying to set D/signalk/3160XXXXX/vessels/self/environment/wind/speedApparent as per your documentation. None of this changed anything in the data browser of SignalK

Am I doing something wrong or is this a bug? Is there a better way of getting data from mqtt into SignalK (maybe node-red?).

Can't subscribe to topics anymore

Hi! Great work on the bridge plugin!
I do have a issue though. Previously I received data for subscribed topics. Not anymore. Not sure if it stopped working because of an update, or something else.
I periodically send a request to topic R/signalk/265807290/keepalive, with the message ["vessels/self/navigation/position"]
The log states this:
May 25 14:55:11 2023-05-25T14:55:11.264Z signalk-mqtt-bridge Received message to topic R/signalk/265807290/keepalive: 0
May 25 14:55:11 TypeError: JSON.parse(...).forEach is not a function at handleKeepalive (/data/conf/signalk/node_modules/signalk-mqtt-bridge/index.js:167:27) at MqttClient.onMessage (/data/conf/signalk/node_modules/signalk-mqtt-bridge/index.js:144:11) at MqttClient.emit (events.js:400:28) at MqttClient._handlePublish (/data/conf/signalk/node_modules/mqtt/lib/client.js:1547:12) at MqttClient._handlePacket (/data/conf/signalk/node_modules/mqtt/lib/client.js:535:12) at work (/data/conf/signalk/node_modules/mqtt/lib/client.js:438:12) at Writable.writable._write (/data/conf/signalk/node_modules/mqtt/lib/client.js:452:5) at doWrite (/data/conf/signalk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:390:139) at writeOrBuffer (/data/conf/signalk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:381:5) at Writable.write (/data/conf/signalk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:302:11) at Socket.ondata (internal/streams/readable.js:726:22) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:290:12) at readableAddChunk (internal/streams/readable.js:265:9) at Socket.Readable.push (internal/streams/readable.js:204:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

Any ideas?

Improve README

While your victron approach is quite nice, I am struggling to get the systemId of my SK installation. Please update your docs to help on this. Thanks

Failed to start: Cannot read property 'split' of undefined

Hi,
just installed on my Pi3B+ with venus OS 3.0 Large.
MQTT is running regularly.

After the reboot I see in the SignalK dashboard the error on the subject.
I'm not able to remove it because it does not appear in the AppStore/Installed, it appear only in the AppStore/Available.

Any help is more than appreciated.

image

Connected to mqtt but no deltas being sent

I am trying to get signalk-mqtt-bridge working for a signalk - node-red connection.

In signalk it will send the initial keep alive message that I can then see in MQTT_Explorer. So I know that the plugin is configured and talking to the mqtt broker. In node-red Im sending an mqtt message with R/signalk/f005dc8c4fcd/keepalive as the topic and empty payload. This also shows in the MQTT_Explorer. But no deltas are getting published to mqtt broker. When I look at the signalk logs I’m getting the following error: Can you advise what I may be doing incorrectly? I’d really like to get this working, its exactly what I am looking for. It would allow me to get all my NMEA and Victron data in a consistant way into node_red for processing and feeding Home Assistant as my frontend. Im using on a live-aboard sailboat.

SignalK version 1.46.3
nodejs version 12.22.12
In signalk data browser all items have paths and look right to me.

I am curently using signalk to pull from Victron Cerbo and my NMEA via canbus on a pi. several options for getting the victron info. But I'm looking specifically for a way to get NMEA data to node-red

‘Jan 16 09:58:40 TypeError: path.replaceAll is not a function at signalkPathToMqttTopic (/home/pi/.signalk/node_modules/signalk-mqtt-bridge/index.js:323:17) at handleDelta (/home/pi/.signalk/node_modules/signalk-mqtt-bridge/index.js:177:36) at /usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1048:16 at /usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:463:23 at processAfters (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:359:11) at Object.inTransaction (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:439:9) at Dispatcher.push (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1214:24) at Dispatcher.handleEvent (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:1267:17) at Bus.sink (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:242:17) at Bus.push (/usr/local/lib/node_modules/signalk-server/node_modules/baconjs/dist/Bacon.js:2371:21) at StreamBundle.push (/usr/local/lib/node_modules/signalk-server/lib/streambundle.js:68:19) at StreamBundle. (/usr/local/lib/node_modules/signalk-server/lib/streambundle.js:36:22) at Array.forEach () at processIems (/usr/local/lib/node_modules/signalk-server/lib/streambundle.js:35:19) at StreamBundle. (/usr/local/lib/node_modules/signalk-server/lib/streambundle.js:55:21) at Array.forEach ()’

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.