I would like to share with you @glhopital my ideas relative to the version 2.0 of the Freebox binding.
The general idea would be to add in the 2.0 version the missing features available in the 1.x version and to take advantage of the discovery feature of openHAB 2.
Here is how I imagine the changes:
- change the main thing to a bridge thing, keeping most of the existing channels on the bridge thing
- Create a new thing type for the phone and attach to this thing all channels relative to the phone and the phone calls
- Add new channels on the phone type to get like in the 1.x binding seperate phone call information for missed / accepeted and outgoing calls
- Add a new thing type for any network device managed by the freebox; this thing will have a channel “reachable”.
- Implement automatic discovery for the bridge thing, the phone thing and all the network devices things.
It would be a way for me to enter in the world of openHAB2 binding developement
What are your thoughts ?
@lolodomo. Sorry, answered by mail but it did not get appended to the thread.
So : I think you’re right - the API shall be considered as a bridge and would allow discovering of network devices.
Great if you want to start this refactoring. As I’m living in Spain until the end of the year - I will have no access to the Freebox - buy if I can help, let me know !
@glhopital ok I will work on that during the next weeks. I will inform you about the progress.
@glhopital: Hi Gael. I have submitted a PR with all my changes (https://github.com/openhab/openhab2-addons/pull/919).
If you want to take a look, don’t hesitate.
For information, the binding was no more working for users that have updated to the firmware 3.4.0.
I implemented a hotfix this weekend; the fix is already merged; it will be available in the next working nightly snapshots (currently broken).
If someone needs the jar as soon as possible, I can make it available.
I confirm that your update works fine ! Thanks @Lolodomo
For your information, the current binding available in 2.5 snapshots has been rewritten to remove dependences with Apache HttpUtil, Jackson JSON processor and freeboxos-java libraries.
The Freebox OS API is not directly implemented inside the binding using Jetty for HTTP calls and Google Gson for JSON processing.
There is no visible changes for the user except that you even don’t need anymore to deal with the SSL certificates.