{"action":"opened","issue":{"url":"https://api.github.com/repos/jbuehl/solaredge/issues/22","repository_url":"https://api.github.com/repos/jbuehl/solaredge","labels_url":"https://api.github.com/repos/jbuehl/solaredge/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/jbuehl/solaredge/issues/22/comments","events_url":"https://api.github.com/repos/jbuehl/solaredge/issues/22/events","html_url":"https://github.com/jbuehl/solaredge/issues/22","id":171684432,"number":22,"title":"Table driven data interpretation for new devices","user":{"login":"jbuehl","id":3324015,"avatar_url":"https://avatars.githubusercontent.com/u/3324015?v=3","gravatar_id":"","url":"https://api.github.com/users/jbuehl","html_url":"https://github.com/jbuehl","followers_url":"https://api.github.com/users/jbuehl/followers","following_url":"https://api.github.com/users/jbuehl/following{/other_user}","gists_url":"https://api.github.com/users/jbuehl/gists{/gist_id}","starred_url":"https://api.github.com/users/jbuehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbuehl/subscriptions","organizations_url":"https://api.github.com/users/jbuehl/orgs","repos_url":"https://api.github.com/users/jbuehl/repos","events_url":"https://api.github.com/users/jbuehl/events{/privacy}","received_events_url":"https://api.github.com/users/jbuehl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T15:15:51Z","updated_at":"2016-08-17T15:15:51Z","closed_at":null,"body":"Originally, this project was only concerned with 2 device types within the 0500 performance data message - the 0000 optimizer and the 0010 inverter.  As more and more people have begun to use  it, new device types have emerged and some individuals have contributed code to the project to handle their devices.  More and more device types will continue to emerge.  Additionally, only a small subset of messages within the SE protocol are interpreted.  It isn't practical for someone who doesn't have a particular device to do the necessary detective work of figuring out the format of the data fields within the message and what they represent and not everyone using the project is comfortable with coding in python.\r\n\r\nThis issue proposes a feature in semonitor.py that allows for table driven parsing of messages and device data within the 0500 message.  This would be a complete rewrite of seData.py.  Data tables would contain an entry for each message type or device type, each with a list of fields containing the length, data type, and name of the field.\r\n\r\nExact syntax is TBD,  but an example might look something like this:\r\n\r\n```\r\n{messages:\r\n   {0x0012, PROT_CMD_PARAMS_GET_SINGLE:\r\n     {2, H, param},\r\n   },\r\n   {0x0011, PROT_RESP_PARAMS_SINGLE:\r\n     {4, L, value},\r\n     {2, H, param},\r\n   },\r\n   {0x0090, PROT_CMD_PARAMS_SET_SINGLE:\r\n     {2, H, param},\r\n     {4, L, value},\r\n   },\r\n     ...\r\n   }\r\n 0500data:\r\n   {0x0000, optimizer:\r\n     {4, L, Inverter}, \r\n     {4, L, Uptime},\r\n     {4, f, Vmod},\r\n     {4, f, Vopt}, \r\n     {4, f, Imod}, \r\n     {4, f, Eday}, \r\n     {4, f, Temp},\r\n   },\r\n   {0x0010, inverter:\r\n     {4, L, Uptime}, \r\n     {4, L, Interval},\r\n     {4, f, Temp},\r\n     {4, f, Eday}, \r\n     {4, f, Eac}, \r\n     {4, f, Vac}, \r\n     {4, f, Iac},\r\n     {4, f, freq},\r\n     {4, x, unknown},\r\n     {4, x, unknown},\r\n     {4, f, Vdc},\r\n       ...\r\n   },\r\n}\r\n\r\n```\r\nNote - the 0080 optimizer would not be able to be parsed by this method because of the bit shifting required.  The data table format would need to accomodate such a special case."}}
{"actor":{"display_login":"jbuehl"}}