Skip to main content

Foncia smart home integration, free and open source

Foncia integration for Gladys Assistant

Your MyFoncia account in Gladys: balance, calls for funds, documents and incidents.

This integration brings your MyFoncia account (Foncia, property management: co-ownership and rentals) into Gladys: account balance, next amount due, open incidents, new documents and the next general assembly. It also adds scene triggers, scene actions and a dashboard widget.

Unofficial integration. Foncia publishes no API: the integration reads your account the way the my-foncia.fonciamillenium.net web site does. If Foncia changes its site, the integration may stop working until it is updated.

Requirements​

  • Gladys Assistant 5.3 or later.
  • A MyFoncia account (e-mail and password) without a second factor (SMS or app code at each sign-in): the integration cannot answer it.
  • Internet access for Gladys. This is a cloud integration: nothing runs on your local network.

Configuration​

FieldWhat to enter
MyFoncia e-mailThe e-mail you sign in with on my-foncia.fonciamillenium.net.
MyFoncia passwordYour password. Stored by Gladys as a secret, only sent to Foncia's sign-in page.
Sync interval (min)How often MyFoncia is read. 60 by default, 15 minimum.
Due reminder (days)How many days before a due date the "Payment due soon" trigger fires. 7 by default.
Advanced settingsLeave empty, see Advanced settings.

Then press Test the connection: the message lists the accounts found. Sync now reads MyFoncia right away.

Devices​

One Gladys device per MyFoncia account (one lot of a co-ownership, one rental), named Foncia – <account>. Create it from the Discover tab. Its features are read-only and keep their history:

FeatureUnitMeaning
Account balance€As shown by MyFoncia (negative: you owe money).
Next amount due€Amount of the next call for funds or rent.
Days until the due datedaysNegative once the date has passed.
Open incidents—Requests to Foncia (repairs, incidents, questions) not closed yet.
New documents—Documents added since you last marked them as seen.
Days until the general assemblydaysNext general assembly of the co-ownership.

The badge of the device says cloud, or unreachable when the last sync failed.

Scene triggers​

Fired only for what is new: the first sync after installing only learns what already exists. At most 5 events of each kind per sync, so a scene that sends a notification per document never floods your phone.

TriggerFiltersVariables
New Foncia documentaccount, document typeaccount, title, date
Foncia incident updatedaccount, new statusaccount, title, previous status
Payment due soonaccountaccount, amount, due date, days left
General assembly announcedaccountaccount, title, date, days left

Document types: call for funds, general assembly, statement of charges, invoice or receipt, other. Incident statuses: open, in progress, closed.

Example: "When a new Foncia document of type call for funds arrives, send me a message: New call for funds: {{triggerEvent.data.title}}".

Scene actions​

  • Sync Foncia: reads MyFoncia now and gives the next actions the figures of one account (empty = the first one): success, account, balance, amount due, due date, open incidents, new documents.
  • Mark Foncia documents as seen: sets the "New documents" counter back to 0 (for one account, or all of them).

Dashboard widget​

Foncia account: balance, amount due (0 € when nothing is due), last payment and new documents, connection and last sync, next due date and next general assembly, the five latest documents, and two buttons: Sync now and Mark as seen. In its settings, pick the account to show (empty = the first one).

A dash (—) means MyFoncia could not be read: see the integration logs.

Privacy​

  • The password is only sent to Foncia's sign-in page (login.my-foncia.fonciamillenium.net). It is never written in the logs.
  • The access tokens stay in memory. The only file written is /data/foncia-state.json: the ids of the documents, incidents and meetings already seen, so that no trigger fires twice after a restart.

Troubleshooting​

MessageWhat to do
MyFoncia refused the e-mail or the passwordCheck them by signing in on my-foncia.fonciamillenium.net.
asks for a second factorNot supported: the account needs a code at each sign-in.
The MyFoncia account is lockedUnlock it on my-foncia.fonciamillenium.net, then press Test the connection.
The MyFoncia client id is missingSee Advanced settings.
MyFoncia cannot be reachedCheck the Internet access of Gladys.
MyFoncia answered with an errorLook at the integration logs; Foncia may have changed its site.

Advanced settings​

The integration signs in and reads your account with the same settings as the MyFoncia web site: its Okta client id and the address of its API. Both are built in: leave the two fields empty.

If one day Foncia changes them and every sync fails with an API error, read the new values in https://my-foncia.fonciamillenium.net/config.js: clientId under oktaConfig is the Okta client id, url under graphql is the MyFoncia API URL. Enter them in the advanced settings, save, then press Test the connection. Please also open an issue on the repository so that the built-in values can be updated for everyone.

Configuration settings​

These are the settings Foncia asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoEnter the e-mail and password you use on my-foncia.fonciamillenium.net. The integration reads your account every hour: one Gladys device per account, with its balance, the next amount due, the open incidents and the new documents. Accounts protected by a second factor (SMS, app) are not supported.
MyFoncia e-mailstringYes
MyFoncia passwordsecretYes
Sync interval (min)numberNoHow often MyFoncia is read, in minutes (15 minimum).
Due reminder (days)numberNoThe "Payment due" scene trigger fires this many days before a due date.
Advanced settingssectionNoBuilt in: leave these fields empty. Only fill them in if Foncia changes its settings (see the documentation).
Okta client idstringNo
MyFoncia API URLstringNo

How to install Foncia in Gladys​

  1. In Gladys, open Integrations: Foncia appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/prohand/gladys-foncia:2.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/prohand/gladys-foncia.

Foncia requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Foncia is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by prohand, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂