ci-richard-mcelhinney / nhaystack

Niagara module for Project Haystack
https://www.project-haystack.org
Academic Free License v3.0
36 stars 23 forks source link

nHaystack v3.0.1 / WatchSub and poll when curStatus=fault #9

Closed tblong closed 3 years ago

tblong commented 3 years ago

Posted originally via haystack forums: https://project-haystack.org/forum/topic/886

In Niagara there is a point configured which has an alarm extension set to place the point's value in its fault state. When making either a WatchSub or WatchPoll request against this point, the curStatus=fault as expected however both the zinc and json responses come back with a null value as shown below:

The json reponse:

{
    "meta": {
        "ver": "2.0",
        "watchId": "143da86f-7fa7-4681-9be0-c2c0745249d9",
        "lease": "n:10000 ms"
    },
    "cols": [
        {
            "name": "curStatus"
        },
        {
            "name": "curVal"
        },
        {
            "name": "id"
        }
    ],
    "rows": [
        {
            "curStatus": "ok",
            "curVal": true,
            "id": "r:C.Examples.AHU~2d01.FanStatus"
        },
        {
            "curStatus": "fault",
            "id": "r:C.Examples.AHU~2d01.SupplyTemp"
        }
    ]
}

The zinc response:

ver:"3.0" watchId:"3b9e058b-5830-4557-bc73-d7726f9b968f" lease:10000ms
curStatus,curVal,id
"ok",T,@C.Examples.AHU~2d01.FanStatus
"fault",,@C.Examples.AHU~2d01.SupplyTemp

Is it expected that nHaystack should return a null curVal when curStatus is in fault? If this is expected behavior what would be the reasoning for not returning the value when the point is in fault?

tblong commented 3 years ago

https://project-haystack.dev/doc/lib-phIoT/curStatus

Closing this one. Brian pointed me to the updated curStatus page above which makes it more obvious when curVal is not to be expected.