{"action":"closed","issue":{"url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega/issues/9","repository_url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega","labels_url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega/issues/9/comments","events_url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega/issues/9/events","html_url":"https://github.com/raphaelthurnherr/algobot_onionOmega/issues/9","id":330719172,"node_id":"MDU6SXNzdWUzMzA3MTkxNzI=","number":9,"title":"Continuous FRP optimization","user":{"login":"YannCaron","id":5962300,"node_id":"MDQ6VXNlcjU5NjIzMDA=","avatar_url":"https://avatars1.githubusercontent.com/u/5962300?v=4","gravatar_id":"","url":"https://api.github.com/users/YannCaron","html_url":"https://github.com/YannCaron","followers_url":"https://api.github.com/users/YannCaron/followers","following_url":"https://api.github.com/users/YannCaron/following{/other_user}","gists_url":"https://api.github.com/users/YannCaron/gists{/gist_id}","starred_url":"https://api.github.com/users/YannCaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YannCaron/subscriptions","organizations_url":"https://api.github.com/users/YannCaron/orgs","repos_url":"https://api.github.com/users/YannCaron/repos","events_url":"https://api.github.com/users/YannCaron/events{/privacy}","received_events_url":"https://api.github.com/users/YannCaron/received_events","type":"User","site_admin":false},"labels":[{"id":844276194,"node_id":"MDU6TGFiZWw4NDQyNzYxOTQ=","url":"https://api.github.com/repos/raphaelthurnherr/algobot_onionOmega/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":{"login":"raphaelthurnherr","id":11596109,"node_id":"MDQ6VXNlcjExNTk2MTA5","avatar_url":"https://avatars2.githubusercontent.com/u/11596109?v=4","gravatar_id":"","url":"https://api.github.com/users/raphaelthurnherr","html_url":"https://github.com/raphaelthurnherr","followers_url":"https://api.github.com/users/raphaelthurnherr/followers","following_url":"https://api.github.com/users/raphaelthurnherr/following{/other_user}","gists_url":"https://api.github.com/users/raphaelthurnherr/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelthurnherr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelthurnherr/subscriptions","organizations_url":"https://api.github.com/users/raphaelthurnherr/orgs","repos_url":"https://api.github.com/users/raphaelthurnherr/repos","events_url":"https://api.github.com/users/raphaelthurnherr/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelthurnherr/received_events","type":"User","site_admin":false},"assignees":[{"login":"raphaelthurnherr","id":11596109,"node_id":"MDQ6VXNlcjExNTk2MTA5","avatar_url":"https://avatars2.githubusercontent.com/u/11596109?v=4","gravatar_id":"","url":"https://api.github.com/users/raphaelthurnherr","html_url":"https://github.com/raphaelthurnherr","followers_url":"https://api.github.com/users/raphaelthurnherr/followers","following_url":"https://api.github.com/users/raphaelthurnherr/following{/other_user}","gists_url":"https://api.github.com/users/raphaelthurnherr/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelthurnherr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelthurnherr/subscriptions","organizations_url":"https://api.github.com/users/raphaelthurnherr/orgs","repos_url":"https://api.github.com/users/raphaelthurnherr/repos","events_url":"https://api.github.com/users/raphaelthurnherr/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelthurnherr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-06-08T16:12:04Z","updated_at":"2018-06-13T14:56:43Z","closed_at":"2018-06-13T14:56:42Z","author_association":"COLLABORATOR","body":"Prefer use an associative array (key value pair) than a list for better performances.\r\n\r\nthe actual message is the following :\r\n```javascript\r\n{\r\n    // ....\r\n        \"MsgValue\": [\r\n            {\r\n                \"name\": \"algo_98f8\",\r\n                \"upTime\": 0,\r\n                \"firmwareVersion\": \"18.06.02\",\r\n                \"mcuVersion\": \"10\",\r\n                \"boardRev\": \"17\",\r\n                \"battery_mv\": 4181\r\n            },\r\n            {\r\n                \"din\": 0,\r\n                \"state\": 0\r\n            },\r\n            {\r\n                \"din\": 1,\r\n                \"state\": 0\r\n            }\r\n    // ....\r\n}\r\n```\r\n\r\nIt is better to use associative array / map for msg values.\r\nThis is the expected message :\r\n\r\n```javascript\r\n{\r\n    \"MsgTo\": \"unknown\",\r\n    \"MsgFrom\": \"algo_98f8\",\r\n    \"MsgID\": 0,\r\n    \"MsgData\": {\r\n        \"MsgType\": \"event\",\r\n        \"MsgParam\": \"status\",\r\n        \"MsgMap\": {\r\n            \"name\": \"algo_98f8\",\r\n            \"upTime\": 0,\r\n            \"firmwareVersion\": \"18.06.02\",\r\n            \"mcuVersion\": \"10\",\r\n            \"boardRev\": \"17\",\r\n            \"battery_mv\": 4181,\r\n            \"din\": [0, 0, 1, 0, 1],\r\n            \"rgb\": [[255, 255, 127, 55], [255, 255, 255, 55]]\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nthen I can access to data as the following :\r\n```javascript\r\nvar speed = MsgData.MsgValue.motor0.speed;\r\n```\r\n\r\nfor example"}}
{"actor":{"display_login":"raphaelthurnherr"}}