-
Notifications
You must be signed in to change notification settings - Fork 98
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
Rest interface for miflora #86
Conversation
4 similar comments
@jeroenterheerdt thanks for the contribution. Some questions:
|
Great questions. I whipped this up quickly because (use case) : the reach of Bluetooth in my situation is not enough, so I build this rest api to run on a gateway. The gateway talks to the sensor and my consumer uses the rest api. It works fine this way. I was not planning to introduce caching etc. Thought the least I could do is share the code back to maybe serve as an extra demo or sample. |
Are you aware of the existing solutions for this problem using MQTT (instead of REST)? |
Well yes, but why stand up MQTT on a limited chip when you can have a simple rest interface? Regardless, include the code or not. I do not mind, it serves my purpose. If you do not want it, fine by me. |
I'm against the addition of such a feature here. "miflora" is a library for a pretty obvious reason - to decouple the hardware access from the use case specific integration. To that end I've for example developed the MQTT daemon but a REST API based on the library is also a great idea! Your question if REST is better then MQTT can't be answered... Which is more useful solely depends on your use case, don't you agree? If you want to profit from my already existing systemd service unit implementation you are also invited to add your functionality in https://github.com/ThomDietrich/miflora-mqtt-daemon as a PR ;) |
I agree with @ThomDietrich |
I created a simple REST interface for miflora.