Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetSensorHistory - Get raw value #71

Closed
iambigred opened this issue Apr 8, 2019 · 2 comments
Closed

GetSensorHistory - Get raw value #71

iambigred opened this issue Apr 8, 2019 · 2 comments
Labels
enhancement Items that are on the todo list for incorporating into PrtgAPI in a future release

Comments

@iambigred
Copy link

Hi,

Currently it appears that the raw data values are not accessible from the GetSensorHistory method. Is my understanding correct? Is there any way to retrieve these?

Thanks,
Alex

@lordmilko lordmilko added the enhancement Items that are on the todo list for incorporating into PrtgAPI in a future release label Apr 8, 2019
@lordmilko
Copy link
Owner

Hi @iambigred,

I can see you're right, currently only the display value is accessible.

I will rename the current Value property to DisplayValue and add add a new Value property containing the raw value in the next release of PrtgAPI. Until then I believe you'll need to continue manipulating the current Value property to try and get a numeric value.

Regards,
lordmilko

lordmilko added a commit that referenced this issue May 6, 2019
-Implemented new Value property on ChannelHistoryRecord. Displays the raw numeric value of the channel (#71)
@lordmilko
Copy link
Owner

Hi @iambigred,

Please be advised that PrtgAPI 0.9.7 has now been released, which includes a fix for this issue

The existing ChannelHistoryRecord.Value member has been renamed to DisplayValue, and a new Value property containing the raw value has been added. The new Value property will always be expressed in the lowest unit value possible for a given channel (e.g. if the DisplayValue is in megabytes, the Value will be in bytes)

Also note that the SensorHistoryData type has been renamed to SensorHistoryRecord. To update to the latest version, run

Update-Package PrtgAPI

from within the NuGet Package Manager. For a full list of changes (including any breaking changes that may affect you) please see the release notes

Regards,
lordmilko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Items that are on the todo list for incorporating into PrtgAPI in a future release
Projects
None yet
Development

No branches or pull requests

2 participants