Skip to content

Add Moisture to TTN.js#1

Open
Faileb wants to merge 2 commits intoMakerfabs:mainfrom
Faileb:main
Open

Add Moisture to TTN.js#1
Faileb wants to merge 2 commits intoMakerfabs:mainfrom
Faileb:main

Conversation

@Faileb
Copy link
Copy Markdown

@Faileb Faileb commented Nov 3, 2024

This commit adds an optional Moisture data value that calculates soil moisture percentage from user-defined adcMax and adcMin variables. The default behavior is opt-in. If un-configured, users will receive Makerfabs default data values of only the battery and ADC.

Also adds decimalPlaces as a variable to limit data value output to two (2) decimal places by default, this variable is also configurable to suit the user's needs.

Also changes data object keys to be more descriptive. There wasn't anything wrong with them as-is but this saves time when using the Home Assistant TTN integration.

This commit adds an *optional* `Moisture` data value that calculates soil moisture percentage from user-defined `adcMax` and `adcMin` variables. The default behavior is opt-in. *If un-configured,* users will receive Makerfabs default data values of *only* the battery and ADC.

Also adds `decimalPlaces` as a variable to limit data value output to two (2) decimal places by default, this variable is also configurable to suit the user's needs.

Also changes data object keys to be more descriptive. There wasn't anything wrong with them as-is but this saves time when using the Home Assistant TTN integration.
In retrospect it was a bad idea to add the voltage and percent symbols to the payload formatter, it caused problems in Home Assistant with gauges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant