{"action":"created","issue":{"url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/101","repository_url":"https://api.github.com/repos/SignalK/signalk-server-node","labels_url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/101/comments","events_url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/101/events","html_url":"https://github.com/SignalK/signalk-server-node/issues/101","id":168171709,"number":101,"title":"Are sources working right?","user":{"login":"sailoog","id":8145560,"avatar_url":"https://avatars1.githubusercontent.com/u/8145560?v=3","gravatar_id":"","url":"https://api.github.com/users/sailoog","html_url":"https://github.com/sailoog","followers_url":"https://api.github.com/users/sailoog/followers","following_url":"https://api.github.com/users/sailoog/following{/other_user}","gists_url":"https://api.github.com/users/sailoog/gists{/gist_id}","starred_url":"https://api.github.com/users/sailoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailoog/subscriptions","organizations_url":"https://api.github.com/users/sailoog/orgs","repos_url":"https://api.github.com/users/sailoog/repos","events_url":"https://api.github.com/users/sailoog/events{/privacy}","received_events_url":"https://api.github.com/users/sailoog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-07-28T19:03:20Z","updated_at":"2017-04-05T16:59:17Z","closed_at":null,"body":"Maybe I'm misunderstanding how sources work but I'm getting strange behaviours...\nFirst of all this is my settings file:\n\n```\n{\n    \"vessel\" : {\n        \"mmsi\" : \"000000000\",\n        \"uuid\" : \"urn:mrn:imo:mmsi:000000000\"\n    },\n    \"pipedProviders\" : [{\n            \"pipeElements\" : [{\n                    \"type\" : \"providers/udp\",\n                    \"options\" : {\n                        \"port\" : \"55556\"\n                    }\n                }, {\n                    \"type\" : \"providers/liner\"\n                }, {\n                    \"type\" : \"providers/from_json\"\n                }\n            ],\n            \"id\" : \"I2Csensors\"\n        }, {\n            \"pipeElements\" : [{\n                    \"type\" : \"providers/udp\",\n                    \"options\" : {\n                        \"port\" : \"55557\"\n                    }\n                }, {\n                    \"type\" : \"providers/liner\"\n                }, {\n                    \"type\" : \"providers/from_json\"\n                }\n            ],\n            \"id\" : \"1Wsensors\"\n        }\n    ],\n    \"interfaces\" : {}\n}\n```\n\nI 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:\n\n```\n{\n  \"context\": \"vessels.urn:mrn:imo:mmsi:000000000\",\n  \"updates\": [\n    {\n      \"source\": {\n        \"type\": \"1W\",\n        \"src\": \"0316013faeff\"\n      },\n      \"timestamp\": \"2016-07-28T18:18:46.074Z\",\n      \"values\": [\n        {\n          \"path\": \"propulsion.engine1.temperature\",\n          \"value\": 301.837\n        }\n      ]\n    }\n  ]\n}\n```\n\nThis is what I'm getting in full format:\n\n```\n...\n{\"propulsion\": {\n  \"engine1\": {\n    \"temperature\": {\n      \"value\": 301.837,\n      \"$source\": \"1Wsensors.0316013faeff\",\n      \"timestamp\": \"2016-07-28T18:18:46.074Z\"\n    }\n  }\n}\n}\n...\n{\"environment\": {\n  \"outside\": {\n    \"pressure\": {\n      \"value\": 101365.997314,\n      \"$source\": \"I2Csensors.BMP180\",\n      \"timestamp\": \"2016-07-28T18:18:46.297Z\"\n    },\n    \"temperature\": {\n      \"value\": 302.25,\n      \"$source\": \"I2Csensors.BMP180\",\n      \"timestamp\": \"2016-07-28T18:18:46.297Z\"\n    }\n  },\n  \"inside\": {\n    \"humidity\": {\n      \"value\": 58.1872024536,\n      \"$source\": \"I2Csensors.HTU21D\",\n      \"timestamp\": \"2016-07-28T18:18:46.297Z\"\n    },\n    \"temperature\": {\n      \"value\": 302.68,\n      \"$source\": \"I2Csensors.HTU21D\",\n      \"timestamp\": \"2016-07-28T18:18:46.297Z\"\n    }\n  }\n}\n}\n...\n```\n\nAs you can see, sources have this format:\n\n```\n$source:\"<provider id>.<sensor id>\"\n$source\":\"1Wsensors.0316013faeff\"\n$source\":\"I2Csensors.BMP180\"\n$source\":\"I2Csensors.HTU21D\"\n```\n\nBut I would like to have only one provider in my settings file with \"id\" : \"sensors\" and to have this format in all sources:\n\n```\n$source:\"<provider id>.<type>.<sensor id>\"\n$source\":\"sensors.1W.0316013faeff\"\n$source\":\"sensors.I2C.BMP180\"\n$source\":\"sensors.I2C.HTU21D\"\n```\n\nAccording 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:\n\n```\n$source:\"<provider id>.XX\"\n$source\":\"sensors.XX\"\n```\n\nIs it possible that signalk-server-node is only working for NMEA 0183/2000 data and not for custom data?\n"},"comment":{"url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/comments/291927107","html_url":"https://github.com/SignalK/signalk-server-node/issues/101#issuecomment-291927107","issue_url":"https://api.github.com/repos/SignalK/signalk-server-node/issues/101","id":291927107,"user":{"login":"sailoog","id":8145560,"avatar_url":"https://avatars1.githubusercontent.com/u/8145560?v=3","gravatar_id":"","url":"https://api.github.com/users/sailoog","html_url":"https://github.com/sailoog","followers_url":"https://api.github.com/users/sailoog/followers","following_url":"https://api.github.com/users/sailoog/following{/other_user}","gists_url":"https://api.github.com/users/sailoog/gists{/gist_id}","starred_url":"https://api.github.com/users/sailoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailoog/subscriptions","organizations_url":"https://api.github.com/users/sailoog/orgs","repos_url":"https://api.github.com/users/sailoog/repos","events_url":"https://api.github.com/users/sailoog/events{/privacy}","received_events_url":"https://api.github.com/users/sailoog/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T16:59:17Z","updated_at":"2017-04-05T16:59:17Z","body":"Now I am getting:\r\n\r\n`ERROR:websocket:error from callback <function <lambda> at 0x755745b0>: 'source'`\r\n\r\nAnnoying but since is not an stopping error I think I can go with this.\r\nIt will be an alpha version so the target is no fatal errors. The main goal of this release is to become a self-updating image. OpenPlotter code, dependencies (SK included), opencpn, plugins and even raspbian will be able to be updated from OP interface. Hopefully, this will be the last image users will have to burn. Thanks."}}
{"actor":{"display_login":"sailoog"}}