Closed t-huyeng closed 1 year ago
Since all checks (github action) are starting for this pull-request I think we could also change the workflow again that only a few boards get tested during a pull request.
What about:
Or any other boards?
Yes, we can merge this, no problem. But wouldn't it be kind of dead code without a sensor usecase & hal file?
Yes that is probably true. I could add the function as a comment in the sensor.cpp. This still means that the code is not really used.
I used it for my gy21 see this.
Maybe an example for a custom sensor would also be at least a start (in the readme or in an extra example folder ).
Let's complete this as an example for integration of a custom sensor, good idea!
Originally paxcounter had one use: count pax. But there were many users who added functions. Now the code is kind of multi use case. Not good since it growed step by step and, thus, is not a platform approach. But seems to work as is for many users and their use cases. That's why i think the sensor example makes sense.
I see what you mean and I think you are right. For me it would also be okay if we do not merge this (this is why a made this a draft as well). I will try to work on an example in the next days and maybe we can just leave this in my fork and add it to the readme here or something like that.
I am actually using this project as a "template" since I feel there is no better project with so many configuration out there.
I added and update most of this code to the docs. See: https://t-huyeng.github.io/ESP32-Paxcounter/configuration/custom-sensors/ or: https://github.com/t-huyeng/ESP32-Paxcounter/blob/mkdocs/docs/configuration/custom-sensors.md
So I would suggest to close this PR and keep the code in the docs.
ok & thx!
I was looking for an easy way to send temperature and humidity data. Since I did not find the right
PayloadConvert
for this, I just added one.This function can be used for any user specific sensor which measures temperature and humidity.
@cyberman54 what are your thoughts on such generic function?
FYI: I currently tested only the packed format function.