Freebox Binding / OpenHAB 2.3 / activation request

Hi all,

I am trying to setup Freebox Binding adding with OpenHAB 2.3 running on QNAP/Docker.

OpenHAB installation is running well, but Freebox Binding addon is still offline with the following status:

Status: OFFLINE - CONFIGURATION_ERROR App token not set in the thing configuration

Any idea where to get this token… nothing visible from the logs files.

Thanks for your support

Max

According to the docs from your Freebox server:

thanks for the link. I am expecting to find this information in the logs… but nothing. Do i need to activate a specific log level to get this information?

You need to login to your openHAB’s console. The Binding documentation clearly says that this onformation is displayed in the OSGi console.

Hi,
Exactly the same behaviour, with Openhan 2.4.0-1 running on a RPI 3B.

Once the Freebox binding is installed, it discovers my freebox but during startup, the following message is not displayed on OSGI console :

            ####################################################################
            # Please accept activation request directly on your freebox        #
            # Once done, record Apptoken in the Freebox Item configuration     #
            # bEK7a7O8GkxxxxxxxxxxXBsKu/xxxttttwj5bXSssd5gUvSXs4vrpuhZwelEo804 #
            ####################################################################

And nothing displayed on freebox LCD screen.

I’ve tried to get the freebox app_token with a wget request, but I received a ‘403’ answer.

Thanks for any suggestion.

Claude

Be sure that the application token thing configuration setting is first empty.

The 2.5 openHAB snapshot include my refactoring of the Freebox binding. If 2.4 binding is not working, please try the 2.5 binding.

Hi Lolodomo,

This was one of my ideas (that something went wrong during first attempt, creating something wrong in some config file, and so preventing other trials to succeed).

So I’ve tried to remove/reinstall the Freebox binding, before making an other testing. But no succes.
Is the remove/reinstall sufficient to clear the configuration setting ?

Anyway I’ll update my OH and try again.

Thanks for the support,

Claude

Hi,

I’m having the same issue with the new release (2.5).

Thanks for any help/suggestion.

Claude

The configuration setting is on the bridge thing and is named “application token”. First keep it empty and at next init the binding will try to generate a new one. Follow the logs in console and validate the authorization on the Freebox server relatively quickly. Then copy & paste the displayed token in the thing setting. Init is restarted immediately and the connection is established.

Hi,

I’ve tried the procedure, but same result : no app_token generated.

First I’ve restored my freebox to the factory setting.

Then I’ve removed the freebox thing, and discovered it again.
So the application token was empty, but the binding didn’t create one.
And no message on freebox LCD screen.

Hereafter a copy of the logs (http://openhabianpi:9001/) :

2019-01-19 11:17:31.263 [INFO ] [ry.FreeboxServerDiscoveryParticipant] - Created a DiscoveryResult for Freebox Server freebox:server:fc81d52b3d143c16fdfb1fb6209442c5 on IP 192.168.0.254

2019-01-19 11:17:31.316 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ to inbox.

==> /var/log/openhab2/events.log <==

2019-01-19 11:17:31.316 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ has been added.

2019-01-19 11:18:10.241 [vent.ItemStateChangedEvent] - neato_vacuumcleaner_GPC16418_F045DA6A5C66_battery_level changed from 99 to 100

2019-01-19 11:18:10.259 [vent.ItemStateChangedEvent] - neato_vacuumcleaner_GPC16418_F045DA6A5C66_is_charging changed from ON to OFF

2019-01-19 11:22:40.063 [me.event.InboxRemovedEvent] - Discovery Result with UID ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ has been removed.

2019-01-19 11:22:40.228 [hingStatusInfoChangedEvent] - ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ changed from UNINITIALIZED to INITIALIZING

2019-01-19 11:22:40.243 [hingStatusInfoChangedEvent] - ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ changed from INITIALIZING to UNKNOWN

2019-01-19 11:22:40.278 [.ItemChannelLinkAddedEvent] - Link ‘freebox_server_fc81d52b3d143c16fdfb1fb6209442c5_reboot-freebox:server:fc81d52b3d143c16fdfb1fb6209442c5:reboot’ has been added.

2019-01-19 11:22:40.291 [.ItemChannelLinkAddedEvent] - Link ‘freebox_server_fc81d52b3d143c16fdfb1fb6209442c5_lcd_orientation-freebox:server:fc81d52b3d143c16fdfb1fb6209442c5:lcd_orientation’ has been added.

2019-01-19 11:22:40.318 [.ItemChannelLinkAddedEvent] - Link ‘freebox_server_fc81d52b3d143c16fdfb1fb6209442c5_wifi_status-freebox:server:fc81d52b3d143c16fdfb1fb6209442c5:wifi_status’ has been added.

2019-01-19 11:22:40.399 [.ItemChannelLinkAddedEvent] - Link ‘freebox_server_fc81d52b3d143c16fdfb1fb6209442c5_xdsl_status-freebox:server:fc81d52b3d143c16fdfb1fb6209442c5:xdsl_status’ has been added.

2019-01-19 11:22:40.412 [.ItemChannelLinkAddedEvent] - Link ‘freebox_server_fc81d52b3d143c16fdfb1fb6209442c5_line_status-freebox:server:fc81d52b3d143c16fdfb1fb6209442c5:line_status’ has been added.

2019-01-19 11:22:41.301 [hingStatusInfoChangedEvent] - ‘freebox:server:fc81d52b3d143c16fdfb1fb6209442c5’ changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): App token not set in the thing configuration

Thanks for any help.

Claude

Please enable the DEBUG logs: log:set DEBUG org.openhab.binding.freebox
And check that on the freebox OS, you did not uncheck the field “Permettre des nouvelles demandes d’association” dans “Gestion des accès”.

Hi,

Thanks for the suggestion.

The mentioned option in freebox OS is cheched.
In the console (opened by “openhab-cli console”) I’ve enabled the logs with the given command, but no result …

Regards
Claude

If you enabled the DEBUG logs, you should see a message “Error while opening a session” with a stack trace. I would like to see that to understand.
The binding probably does not succeed communicating with your Freebox server. Probably due to a wrong FQDN set as parameter. What value did you set ? Try with mafreebox.freebox.fr

I just tested again without application token and here are the logs I get:

2019-01-20 10:41:30.270 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:425  ] - executeUrl POST login/authorize/ requestContent {"app_id":"org.openhab.binding.freebox","app_name":"Freebox Binding","app_version":"2.5","device_name":"openHAB"}
2019-01-20 10:41:31.028 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:459  ] - evaluateJsonReesponse Json {"success":true,"result":{"app_token":"xxxxxxxxxx,"track_id":0}}
2019-01-20 10:41:31.028 [INFO ] [.o.b.f.i.api.FreeboxApiManager:142  ] - ####################################################################
2019-01-20 10:41:31.028 [INFO ] [.o.b.f.i.api.FreeboxApiManager:143  ] - # Please accept activation request directly on your freebox        #
2019-01-20 10:41:31.028 [INFO ] [.o.b.f.i.api.FreeboxApiManager:144  ] - # Once done, record Apptoken in the Freebox thing configuration    #
2019-01-20 10:41:31.028 [INFO ] [.o.b.f.i.api.FreeboxApiManager:145  ] - # xxxxxxxxxx #
2019-01-20 10:41:31.028 [INFO ] [.o.b.f.i.api.FreeboxApiManager:146  ] - ####################################################################
2019-01-20 10:41:33.035 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:425  ] - executeUrl GET login/authorize/0 requestContent null
2019-01-20 10:41:33.691 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:459  ] - evaluateJsonReesponse Json {"success":true,"result":{"status":"pending","challenge":"zzzzz","password_salt":"uuuuu"}}

You got this last request returning “pending” during around 1 minute and 30 seconds and then you got this:

2019-01-20 10:43:03.073 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:425  ] - executeUrl GET login/authorize/0 requestContent null
2019-01-20 10:43:03.762 [DEBUG] [.o.b.f.i.api.FreeboxApiManager:459  ] - evaluateJsonReesponse Json {"success":true,"result":{"status":"timeout","challenge":"zzzzz","password_salt":"uuuuu"}}
2019-01-20 10:43:03.762 [DEBUG] [o.b.f.i.handler.FreeboxHandler:243  ] - Thing freebox:server:3385f74b: App token not set in the thing configuration
2019-01-20 10:43:03.762 [INFO ] [ome.event.ThingStatusInfoEvent:53   ] - 'freebox:server:3385f74b' updated: OFFLINE (CONFIGURATION_ERROR): App token not set in the thing configuration
2019-01-20 10:43:03.762 [INFO ] [nt.ThingStatusInfoChangedEvent:53   ] - 'freebox:server:3385f74b' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): App token not set in the thing configuration

Hi,
Thanks for your support.

The problem is that, on my freebox, the POST request returns a failure message (“erreur interne”).

Hereafter is my log :
2019-01-20 11:29:27.424 [DEBUG] [ebox.internal.handler.FreeboxHandler] - initializing Freebox Server handler for thing freebox:server:fc81d52b3d143c16fdfb1fb6209442c5
2019-01-20 11:29:27.430 [DEBUG] [al.discovery.FreeboxDiscoveryService] - Freebox discovery - discoverPhone : true
2019-01-20 11:29:27.433 [DEBUG] [al.discovery.FreeboxDiscoveryService] - Freebox discovery - discoverNetDevice : true
2019-01-20 11:29:27.437 [DEBUG] [al.discovery.FreeboxDiscoveryService] - Freebox discovery - discoverNetInterface : true
2019-01-20 11:29:27.440 [DEBUG] [al.discovery.FreeboxDiscoveryService] - Freebox discovery - discoverAirPlayReceiver : true
2019-01-20 11:29:27.446 [DEBUG] [ebox.internal.handler.FreeboxHandler] - Binding will schedule a job to establish a connection…
2019-01-20 11:29:28.449 [DEBUG] [ebox.internal.handler.FreeboxHandler] - Authorize job…
2019-01-20 11:29:28.478 [DEBUG] [eebox.internal.api.FreeboxApiManager] - executeUrl POST login/authorize/ requestContent {“app_id”:“org.openhab.binding.freebox”,“app_name”:“Freebox Binding”,“app_version”:“2.5”,“device_name”:“openHAB”}
2019-01-20 11:29:28.509 [DEBUG] [eebox.internal.api.FreeboxApiManager] - evaluateJsonReesponse Json {“msg”:“Erreur interne”,“success”:false,“error_code”:“internal_error”}
2019-01-20 11:29:28.515 [DEBUG] [eebox.internal.api.FreeboxApiManager] - Error while opening a session

I get the same answer when I try to send a similar command from the command line :
curl http://mafreebox.freebox.fr/api/v6/login/authorize -d ‘{“app_id”:“my_app”,“app_name”:“app”,“app_version”:“1.0”,“device_name”:“App”}’

I’ve sent a request to the customer support of Free, but not sure to get real help from them.

Claude

What is the model of your Freebox server ?

Hi,

It’s a Freebox Revolution, running under freebox OS V4.0.2.

But when connecting to it (http://mafreebox.freebox.fr), it displays a splash screen with the title “Freebox OS version 3.3” and a popup message “Erreur lors de la mise a jour de cet objet”.
In english it means something like “Error during object update”.

Maybe I have an issue with my freebox configuration.
That’s why I’ve tried to reset it to its factory settings, but same result.

One of my next attempts, will be to google this freebox error message (“Erreur lors de la mise a jour de cet objet”).

Thanks,
Claude

Hi,

The explanation was : freebox HDD full !

So the freebox OS was not able to store new settings etc.

Everything OK after making room on freebox HDD.
Sorry about that. Personnally I’ve never stored anything on this HDD, but my children did …

Thanks for your support - freebox binding works fine now :slightly_smiling_face:

Claude

1 Like