sunspec / models Goto Github PK
View Code? Open in Web Editor NEWSunSpec Model Definitions
License: Apache License 2.0
SunSpec Model Definitions
License: Apache License 2.0
These Points refer to V_SF but it is not defined in this model.
15 point id="StrVMax" offset="9" type="uint16" sf="V_SF" units="V" />
16 point id="StrVMaxStr" offset="10" type="uint16" />
17 point id="StrVMin" offset="11" type="uint16" sf="V_SF" units="V" />
18 point id="StrVMinStr" offset="12" type="uint16" />
19 point id="StrVAvg" offset="13" type="uint16" sf="V_SF" units="V" />
Suggestion: one could replace
point id="Pad1" offset="24" type="pad" mandatory="true"
for this.
Found a couple ones:
❯ ./bin/misspell spec/smdx/smdx*.xml
spec/smdx/smdx_00010.xml:58:21: "Unkown" is a misspelling of "Unknown"
spec/smdx/smdx_00007.xml:106:40: "reponse" is a misspelling of "response"
spec/smdx/smdx_00004.xml:84:53: "specifed" is a misspelling of "specified"
spec/smdx/smdx_00004.xml:185:40: "reponse" is a misspelling of "response"
spec/smdx/smdx_00003.xml:74:53: "specifed" is a misspelling of "specified"
spec/smdx/smdx_00014.xml:32:55: "capabilites" is a misspelling of "capabilities"
spec/smdx/smdx_00305.xml:36:19: "Lattitude" is a misspelling of "Latitude"
spec/smdx/smdx_00501.xml:79:47: "producting" is a misspelling of "production"
spec/smdx/smdx_00502.xml:83:47: "producting" is a misspelling of "production"
spec/smdx/smdx_64020.xml:191:72: "writting" is a misspelling of "writing"
spec/smdx/smdx_64020.xml:196:72: "writting" is a misspelling of "writing"
spec/smdx/smdx_64112.xml:35:20: "Ninty" is a misspelling of "Ninety"
spec/smdx/smdx_64112.xml:36:20: "Ninty" is a misspelling of "Ninety"
spec/smdx/smdx_64112.xml:224:18: "Ninty" is a misspelling of "Ninety"
spec/smdx/smdx_64112.xml:229:18: "Ninty" is a misspelling of "Ninety"
See https://github.com/sunspec/models/blob/master/smdx/smdx_00005.xml#L98 - there's "andatory" instead of "mandatory".
All other smdx use in strings, this one uses on some.
Do you know any reason why ModTmpAvg is uint16 instead of int16 like Model 804?
I'm currently implementing a parser for the JSON models according to the information model specification and found some issues when using the current models as a test case, because the currently provided models do not fully conform to the (admittedly also not quite yet consistent or final) information model specification:
A model's 'name' shows up three times in the XML file (see below). In the case of model 103 there are two different values between the three locations. The spreadsheet has the name once on the index page and again as the ID point's label. In both cases in the spreadsheet it is 'Inverter (Three Phase)'. It would be nice to have the spreadsheet include the <model name="...">
version (simply "inverter") for reference since that is what is used by the sunspec/pysunspec library.
Other values address this by having the 'computer name' in the 'Name' column and the 'human name' in the 'Label' column, but since the 'Name' for the model must be 'ID' we are left with this missing piece.
https://github.com/sunspec/models/blob/94a0d35a2db8f011f88d1fa62424046bc11709b8/smdx/smdx_00103.xml
<!-- 103: inverter -->
<model id="103" len="50" name="inverter">
<strings id="103" locale="en">
<model>
<label>Inverter (Three Phase)</label>
Model 701 needs the following updates based on review and working group discussion:
All,
I just wanted to give you a heads up that SunSpec is about to release a draft of some modeling extensions and propose moving from xml to json for the model definition encoding. I wanted to let you know as it seems like there is some work being considered based on the current model definitions and the smdx encoding. I would invite everyone to participate in evaluating the new specifications and providing comments. The draft spec should be available shortly and I will post the location to this issue. The modeling extensions are backward compatible and the plan is to migrate the existing models to the json encoding.
Page 12 of the Information Model refers to Model 302 (Irradiance) as being an example of a model with repeating blocks.
However, the model is not declared that way in the SMDX model.
<!-- 302: Irradiance Model -->
<model id="302" len="5" name="irradiance">
<block len="5">
<point id="GHI" offset="0" type="uint16" units="W/m2" mandatory="false"/>
<point id="POAI" offset="1" type="uint16" units="W/m2" mandatory="false"/>
<point id="DFI" offset="2" type="uint16" units="W/m2" mandatory="false"/>
<point id="DNI" offset="3" type="uint16" units="W/m2" mandatory="false"/>
<point id="OTI" offset="4" type="uint16" units="W/m2" mandatory="false"/>
</block>
</model>
The MAC address of a network interface is defined
in model 11 as
<point id="MAC" offset="3" type="eui48" />
and in model 16 as
<point id="MAC" offset="46" type="uint64" access="r" />
In both cases 4 registers are used to store the MAC address and most likely (the eui48 is not mentioned in the specifications) in both case the value is returned as a 64 bit number(long).
Proposed fix:
I've working with a third-party device that mostly adheres to Sunspec, but it has some incompatibilities that make reading it with the standard smdx files through tools like pysunspec unworkable. Since I can't force them to prioritize updating their firmware (I can only politely request, then wait and hope), my best work-around would be to duplicate this repo and add a branch wherein I edit the smdx files to match their map. That duplicate would, of course, be private.
However, since this repo doesn't have any explicit license the official GitHub "no-license" license is too restrictive for me to legally do that. So my question is two-fold:
and
Update RGra units to reflect W or A.
altendky@lt:~$ git clone https://github.com/sunspec/models
Cloning into 'models'...
remote: Enumerating objects: 495, done.
remote: Total 495 (delta 0), reused 0 (delta 0), pack-reused 495
Receiving objects: 100% (495/495), 328.82 KiB | 1.34 MiB/s, done.
Resolving deltas: 100% (368/368), done.
altendky@lt:~$ cd models/smdx/
altendky@lt:~/models/smdx$ make
Using xmllint to validate all files...
smdx_00001.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00001.xml fails to validate
smdx_00002.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00002.xml fails to validate
smdx_00003.xml validates
smdx_00004.xml:94: element note: Schemas validity error : Element 'note': This element is not expected. Expected is ( notes ).
smdx_00004.xml:99: element note: Schemas validity error : Element 'note': This element is not expected. Expected is ( notes ).
smdx_00004.xml:132: element point: Schemas validity error : Element 'point', attribute 'offset': The attribute 'offset' is not allowed.
smdx_00004.xml:132: element point: Schemas validity error : Element 'point', attribute 'type': The attribute 'type' is not allowed.
smdx_00004.xml:132: element point: Schemas validity error : Element 'point', attribute 'access': The attribute 'access' is not allowed.
smdx_00004.xml:132: element point: Schemas validity error : Element 'point', attribute 'mandatory': The attribute 'mandatory' is not allowed.
smdx_00004.xml fails to validate
smdx_00005.xml:98: element point: Schemas validity error : Element 'point', attribute 'andatory': The attribute 'andatory' is not allowed.
smdx_00005.xml fails to validate
smdx_00006.xml:100: element point: Schemas validity error : Element 'point', attribute 'andatory': The attribute 'andatory' is not allowed.
smdx_00006.xml fails to validate
smdx_00007.xml:29: element point: Schemas validity error : Element 'point', attribute 'andatory': The attribute 'andatory' is not allowed.
smdx_00007.xml:58: element point: Schemas validity error : Element 'point', attribute 'offset': The attribute 'offset' is not allowed.
smdx_00007.xml:58: element point: Schemas validity error : Element 'point', attribute 'type': The attribute 'type' is not allowed.
smdx_00007.xml:58: element point: Schemas validity error : Element 'point', attribute 'access': The attribute 'access' is not allowed.
smdx_00007.xml:58: element point: Schemas validity error : Element 'point', attribute 'mandatory': The attribute 'mandatory' is not allowed.
smdx_00007.xml:125: element note: Schemas validity error : Element 'note': This element is not expected. Expected is ( notes ).
smdx_00007.xml:130: element note: Schemas validity error : Element 'note': This element is not expected. Expected is ( notes ).
smdx_00007.xml fails to validate
smdx_00008.xml validates
smdx_00009.xml validates
smdx_00010.xml validates
smdx_00011.xml validates
smdx_00012.xml validates
smdx_00013.xml validates
smdx_00014.xml validates
smdx_00015.xml validates
smdx_00016.xml validates
smdx_00017.xml validates
smdx_00018.xml validates
smdx_00019.xml validates
smdx_00101.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00101.xml fails to validate
smdx_00102.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00102.xml fails to validate
smdx_00103.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00103.xml fails to validate
smdx_00111.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00111.xml fails to validate
smdx_00112.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00112.xml fails to validate
smdx_00113.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00113.xml fails to validate
smdx_00120.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00120.xml fails to validate
smdx_00121.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00121.xml fails to validate
smdx_00122.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00122.xml fails to validate
smdx_00123.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00123.xml fails to validate
smdx_00124.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00124.xml fails to validate
smdx_00125.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00125.xml fails to validate
smdx_00126.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00126.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00126.xml fails to validate
smdx_00127.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00127.xml fails to validate
smdx_00128.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00128.xml fails to validate
smdx_00129.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00129.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00129.xml fails to validate
smdx_00130.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00130.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00130.xml fails to validate
smdx_00131.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00131.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00131.xml fails to validate
smdx_00132.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00132.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00132.xml fails to validate
smdx_00133.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00133.xml fails to validate
smdx_00134.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00134.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00134.xml fails to validate
smdx_00135.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00135.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00135.xml fails to validate
smdx_00136.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00136.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00136.xml fails to validate
smdx_00137.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00137.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00137.xml fails to validate
smdx_00138.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00138.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00138.xml fails to validate
smdx_00139.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00139.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00139.xml:20: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00139.xml fails to validate
smdx_00140.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00140.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00140.xml:20: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00140.xml fails to validate
smdx_00141.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00141.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00141.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00141.xml fails to validate
smdx_00142.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00142.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00142.xml:18: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00142.xml fails to validate
smdx_00143.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00143.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00143.xml:20: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00143.xml fails to validate
smdx_00144.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00144.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00144.xml:20: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00144.xml fails to validate
smdx_00145.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00145.xml:3: element model: Schemas validity error : Element 'model', attribute 'status': The attribute 'status' is not allowed.
smdx_00145.xml fails to validate
smdx_00160.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00160.xml:38: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00160.xml fails to validate
smdx_00201.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00201.xml fails to validate
smdx_00202.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00202.xml fails to validate
smdx_00203.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00203.xml fails to validate
smdx_00204.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00204.xml fails to validate
smdx_00211.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00211.xml fails to validate
smdx_00212.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00212.xml fails to validate
smdx_00213.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00213.xml fails to validate
smdx_00214.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00214.xml fails to validate
smdx_00220.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00220.xml fails to validate
smdx_00302.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00302.xml fails to validate
smdx_00303.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00303.xml:5: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00303.xml fails to validate
smdx_00304.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00304.xml:4: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00304.xml fails to validate
smdx_00305.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00305.xml fails to validate
smdx_00306.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00306.xml fails to validate
smdx_00307.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00307.xml fails to validate
smdx_00308.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00308.xml fails to validate
smdx_00401.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00401.xml:37: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00401.xml fails to validate
smdx_00402.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00402.xml:42: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00402.xml fails to validate
smdx_00403.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00403.xml:39: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00403.xml fails to validate
smdx_00404.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00404.xml:47: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00404.xml fails to validate
smdx_00501.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00501.xml fails to validate
smdx_00502.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00502.xml fails to validate
smdx_00601.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00601.xml:33: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00601.xml:85: element note: Schemas validity error : Element 'note': This element is not expected. Expected is one of ( notes, symbol ).
smdx_00601.xml:92: element note: Schemas validity error : Element 'note': This element is not expected. Expected is one of ( notes, symbol ).
smdx_00601.xml fails to validate
smdx_00801.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00801.xml fails to validate
smdx_00802.xml:3: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00802.xml fails to validate
smdx_00803.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00803.xml:33: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00803.xml fails to validate
smdx_00804.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00804.xml:125: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00804.xml fails to validate
smdx_00805.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00805.xml:33: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00805.xml fails to validate
smdx_00806.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00806.xml:8: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00806.xml fails to validate
smdx_00807.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00807.xml:75: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00807.xml fails to validate
smdx_00808.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00808.xml:8: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00808.xml fails to validate
smdx_00809.xml:4: element model: Schemas validity error : Element 'model', attribute 'name': The attribute 'name' is not allowed.
smdx_00809.xml:8: element block: Schemas validity error : Element 'block', attribute 'name': The attribute 'name' is not allowed.
smdx_00809.xml fails to validate
smdx_63001.xml validates
smdx_63002.xml validates
smdx_64001.xml validates
smdx_64020.xml validates
smdx_64101.xml validates
smdx_64110.xml validates
smdx_64111.xml validates
smdx_64112.xml validates
Makefile:41: recipe for target 'check' failed
make: *** [check] Error 3
Many of the errors which have been identified (and are being merged :]
) could be caught automatically. We should make a model checker script beyond just XML schema validation to catch these things. My first thought is a pytest-based system with tests using a model fixture which is parametrized against all the models.
We've noticed that there were some type changes in models smdx_00211, smdx_00212, smdx_00213 and smdx_00214 in commit 3b75315 on Feb 4th 2016 and have some questions regarding the changes.
Best regards, Martin Preinfalk
See:
Line 35 reads:
<point id="AzTrgt" offset="10" type="int32" units="Degrees" sf="SF" mandatory="false" />
However, there is no scale-factor with that name. Is it supposed to say
"sf="Dgr_SF"
?
I'm trying to use gosunspec to work with an SMA grid inverter. Reading model 11 fails with a modbus exception when I try to read the first 6 words according to the model 11 definition:
<block len="13">
<point id="Spd" offset="0" type="uint16" mandatory="true" units="Mbps" />
<point id="CfgSt" offset="1" type="bitfield16" mandatory="true" >
<symbol id="LINK">0</symbol>
<symbol id="FULL_DUPLEX">1</symbol>
<symbol id="AUTO_NEG1">2</symbol>
<symbol id="AUTO_NEG2">3</symbol>
<symbol id="AUTO_NEG3">4</symbol>
<symbol id="RESET_REQUIRED">5</symbol>
<symbol id="HW_FAULT">6</symbol>
</point>
<point id="St" offset="2" type="enum16" mandatory="true" >
<symbol id="UNKNOWN">0</symbol>
<symbol id="ENABLED">1</symbol>
<symbol id="DISABLED">2</symbol>
<symbol id="TESTING">3</symbol>
</point>
<point id="MAC" offset="3" type="eui48" />
<point id="Nam" offset="7" type="string" len="4" access="rw" />
<point id="Ctl" offset="11" type="bitfield16" access="rw" >
<symbol id="AUTO">0</symbol>
<symbol id="FULL_DUPLEX">1</symbol>
</point>
<point id="FrcSpd" offset="12" type="uint16" access="rw" units="Mbps" />
</block>
It does seem to work if I read 7 words. Is it possible that the MAC should actually start at offset 4 and a padding or else be applied before it?
These models are all apparently related with 201 being an optional subset of the larger models.
Model 201 has these elements:
<point id="PPVphAB" offset="10" type="int16" sf="V_SF" units="V" />
<point id="PPVphBC" offset="11" type="int16" sf="V_SF" units="V" />
<point id="PPVphCA" offset="12" type="int16" sf="V_SF" units="V" />
The other models have these elements:
<point id="PhVphAB" offset="10" type="int16" sf="V_SF" units="V" mandatory="true" />
<point id="PhVphBC" offset="11" type="int16" sf="V_SF" units="V" mandatory="true" />
<point id="PhVphCA" offset="12" type="int16" sf="V_SF" units="V" mandatory="true" />
The strings section of models 202, 203 and 204 has definitions for "PPVphAB", etc which are not used by these models, whereas these sections do not have definitions for "PhVphAB", etc which are used by these models.
Ideally, all these models would use the same identifiers for these offsets and all have string definitions only for the strings that are actually used in the model definition.
The other models that have only repeating blocks have a model length which is identical to the length of a single repeating block. In the case of model 303 this convention is not followed (See 304 for comparison).
<model id="303" len="2" name="bom_temp">
<block type="repeating" len="1" name="temp">
<point id="TmpBOM" offset="0" type="int16" units="C" sf="-1" mandatory="true"/>
</block>
</model>
Line 8 in that model defines:
<point id="SigType" offset="1" access="rw" type="enum16" len="1" mandatory="false" sf=" ">
and line 19 has:
<point id="Sig_SF" offset="6" access="r" type="sunssf" len="1" mandatory="true" sf=" "/>
Note the scale factor names consisting of a single space character (sf=" "
). There is no such scale factor defined in the model.
I assume these are typos since it wouldn't make sense to apply a scale factor for a enum16 or a scale-factor itself.
Make the default of 1 explicit for the group count attribute in the model schema.
Models 1 and 17 only have length specified for strings. Model 120 has length for every point despite having no strings and all being length 1. It would be much nicer if this were consistent. As is I've had to develop a custom diff tool to account for all the variations. I should have been able to use a simple textual diff tool, or a generic xml diff tool at worst.
I haven't dug into the rest of the models or whether there are other attributes which are handled inconsistently.
The following issues need to be addressed in models 701-705:
All:
701:
702:
703:
704:
705:
Update power priority enum with additional options
5 models (160, 401, 402, 403, 404) use a type called 'count' which is not explicitly defined by the information model.
Is this type equivalent to uint16 or to int16? If not, in what ways does it different from these other types?
Update model description typo in model 712
I'm implementing some software to read SunSpec and I have not been able to find the character encoding that is used for string typed fields.
The documentation I have been able to find only shows a simple example that is limited to the English letters of ASCII.
Given only this example it is still possible that the real encoding standard is something like UTF8.
Does anyone know where I can find the chosen encoding?
Models 2, 160, 501, and 502 have multiple symbols with an ID of 'RESERVED'. This causes duplicate symbol IDs to be detected when converting to JSON encoding.
Update IDs to be unique.
The repeating block in model 803 has a declared block length of 28 but the actual length is 32.
Hello @AndrewMiller1E and @bobfox,
There are a flurry of open pull requests fixing typos, invalid XMLs, and other things.
There are even repos from other users fixing all the issues so the models can be used in production, such as https://github.com/altendky/models/tree/master_plus_pull_requests.
I am guessing there are many willing contributors wanting to fix the issues in this repo, but leaving pull requests open for 3+ years does not inspire helping "upstream".
Sincerely,
cfstras
Model 701 needs the following updates based on review and working group discussion:
Theres a string object:
Value1
Copy of value from register Off1.
Unused values shall return 0xFFFF (unimplemented)
But no such Point
As currently declared, EvtVnd2 and SetEna overlap. Either ExtVnd2 should be re-declared as a single 16 bit register, or all subsequent points should have their offsets adjusted so that adjacent points do not overlap.
<point id="EvtVnd2" offset="28" type="bitfield32" />
<point id="SetEna" offset="29" access="rw" type="enum16" />
The accumulator point type is being deprecated in favor of the equivalent unsigned point type due to the poor choice of unimplemented value for the acc point type. Update accumulator points in models 701 and 713.
Not a bug in the models presumable, but I'd appreciate help. I'm using gosunspec to walk the model chain on a Kostal grid inverter. Trying to read the next model id + length (2 words) after 802, instead of returning 0xFFFF 0xXXXX, I get a modbus 131 error.
If I instead read 1 word (model id) I get 0x0000 (instead of model id 0xFFFF).
What is the right way to check for end of model chain?
Add missing scale factors for points in models 702, 705, 712, 713.
Change name of Alrm point in model 713 to PrtAlrms to increase clarity.
I'm working with a Fronius inverter, and while comparing their register map to yours, I've found some inconsistencies. Here's their doc:
http://take.ms/7Ikq3
On Page 89, their common model includes an SID, ID, and L property that isn't reflected in smdx_00001.xml. Also, their model length is 65, while yours is 66 (this may be just the 'Pad' value)
They always include an ID, L property in each model, whereas in your docs, it's always missing.
My understanding is that their products are sunspec certified though, so I'm assuming that your docs and theirs ARE saying the same thing, but that I'm misunderstanding something.
I don't suppose someone could enlighten me?
I'm working on this OSS elixir client (master).
https://github.com/jeffdeville/ex_sunspec
Now that I've found this project, I'm hoping to be able to create clients as easily as:
defmodule Fronius.Inverter do
use ExSunspec, start: 40_000, models: [1, 101, 120, 123]
end
This is working, except that my memory addresses are incorrect!
The NPt element has an error in its description. From the SMDX file:
<point id="NPt">
<label>NPt</label>
<description>Number of curve points supported (maximum of 10).</description>
<notes> </notes>
</point>
The spreadsheet shows 20 points, and all other curves support 20 points.
Found a minor one in spelling the VAR:
model103.VAr
model203.VAR
Did not check if this is anywhere else, too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.