question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are sources working right?

See original GitHub issue

Maybe I’m misunderstanding how sources work but I’m getting strange behaviours… First of all this is my settings file:

{
    "vessel" : {
        "mmsi" : "000000000",
        "uuid" : "urn:mrn:imo:mmsi:000000000"
    },
    "pipedProviders" : [{
            "pipeElements" : [{
                    "type" : "providers/udp",
                    "options" : {
                        "port" : "55556"
                    }
                }, {
                    "type" : "providers/liner"
                }, {
                    "type" : "providers/from_json"
                }
            ],
            "id" : "I2Csensors"
        }, {
            "pipeElements" : [{
                    "type" : "providers/udp",
                    "options" : {
                        "port" : "55557"
                    }
                }, {
                    "type" : "providers/liner"
                }, {
                    "type" : "providers/from_json"
                }
            ],
            "id" : "1Wsensors"
        }
    ],
    "interfaces" : {}
}

I have connected I2C sensors and 1W sensors to the GPIO of a raspberry 3 and all is working right. I send delta format to the providers with this format:

{
  "context": "vessels.urn:mrn:imo:mmsi:000000000",
  "updates": [
    {
      "source": {
        "type": "1W",
        "src": "0316013faeff"
      },
      "timestamp": "2016-07-28T18:18:46.074Z",
      "values": [
        {
          "path": "propulsion.engine1.temperature",
          "value": 301.837
        }
      ]
    }
  ]
}

This is what I’m getting in full format:

...
{"propulsion": {
  "engine1": {
    "temperature": {
      "value": 301.837,
      "$source": "1Wsensors.0316013faeff",
      "timestamp": "2016-07-28T18:18:46.074Z"
    }
  }
}
}
...
{"environment": {
  "outside": {
    "pressure": {
      "value": 101365.997314,
      "$source": "I2Csensors.BMP180",
      "timestamp": "2016-07-28T18:18:46.297Z"
    },
    "temperature": {
      "value": 302.25,
      "$source": "I2Csensors.BMP180",
      "timestamp": "2016-07-28T18:18:46.297Z"
    }
  },
  "inside": {
    "humidity": {
      "value": 58.1872024536,
      "$source": "I2Csensors.HTU21D",
      "timestamp": "2016-07-28T18:18:46.297Z"
    },
    "temperature": {
      "value": 302.68,
      "$source": "I2Csensors.HTU21D",
      "timestamp": "2016-07-28T18:18:46.297Z"
    }
  }
}
}
...

As you can see, sources have this format:

$source:"<provider id>.<sensor id>"
$source":"1Wsensors.0316013faeff"
$source":"I2Csensors.BMP180"
$source":"I2Csensors.HTU21D"

But I would like to have only one provider in my settings file with “id” : “sensors” and to have this format in all sources:

$source:"<provider id>.<type>.<sensor id>"
$source":"sensors.1W.0316013faeff"
$source":"sensors.I2C.BMP180"
$source":"sensors.I2C.HTU21D"

According to Signal K definition, sources can contain this properties: label, type, src, pgn, sentence, talker, +any string. Being required label and type. And this is my problem, whatever I put in the delta message when I send to signal k server, only the src property affects the $source path. With the rest of properties I only get:

$source:"<provider id>.XX"
$source":"sensors.XX"

Is it possible that signalk-server-node is only working for NMEA 0183/2000 data and not for custom data?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:33 (30 by maintainers)

github_iconTop GitHub Comments

1reaction
tkurkicommented, Apr 8, 2017

BTW you don’t necessarily need liner if you do not send the newline in the UDP message: UDP sends one datagram at a time, which in your case means one delta.

0reactions
dmdelormecommented, Apr 13, 2017

the data is all live and i have been using signalK as the central hub. Inputs and outputs though openplotter, node-red, kplex. Node-red is easy but a real system sucker on a pi but it is getting better. I could store the data but. At this point the quality of the data and reliability are more important as its main propose is to be primary navigation so the system should be resilient and fault tolerant, hardware and software. Secondary mapping and storing data Psql opensea map etc. For viewing maps/charts I use OpenCpn on 2 pi 3 via ssh or vnc via phone,linux laptop, etc. Even though there has been a few hicups in the short term the fact is i still had primary data flowing though SK. I interpreted that as resilient. SignalK Slack??? I am old and Canadian … goggle found invite… map ???

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sources of Working Capital - Mynd Fintech
The short-term internal sources of working capital include provisions for tax and dividends. These are essentially current liabilities that ...
Read more >
Working Capital Management Explained: How It Works
Working capital management is a strategy that requires monitoring a company's current assets and liabilities to ensure its efficient operation.
Read more >
Projects & Operations | The World Bank
Some of our projects are cofinanced with governments, other multilateral institutions, commercial banks, export credit agencies, and private sector investors.
Read more >
Financial Management Regulation Volume 3, Chapter 19
Resources used to establish or increase the size of a working capital fund are commonly referred to as “the corpus (total investment) of...
Read more >
Sources of Capital
Source of Equity Capital. Personal Savings; Friends and Relatives; Angels; Corporations; Venture Capitalists (VCs); Going Public (IPOs).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found