New Netatmo binding (starting OH 3.3 M5)

Can you post debug logs? This would help hunting this issue. If you are on 4.0M4 this seems like a bug.

Have you tried to reauthenticate following the instructions in the documentation?

I am not able to find and dedicated instructions regarding re-authentication. Maybe you could point it out to me?

Here is the log when I update the thing-file:

2023-07-09 20:42:24.386 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'netatmo.things'
2023-07-09 20:42:24.448 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Shutting down Netatmo API bridge handler.
2023-07-09 20:42:24.581 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Initializing Netatmo API bridge handler.
2023-07-09 20:42:24.612 [DEBUG] [tatmo.internal.handler.DeviceHandler] - Initializing handler for bridge netatmo:home:home:<myapp>
2023-07-09 20:42:24.662 [DEBUG] [tatmo.internal.handler.ModuleHandler] - Initializing handler for thing netatmo:presence:home:<myapp>:Presence_Camera_Pasture
2023-07-09 20:42:24.704 [DEBUG] [tatmo.internal.handler.ModuleHandler] - Initializing handler for thing netatmo:presence:home:<myapp>:Presence_Camera_Gate
2023-07-09 20:42:24.717 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Connecting to Netatmo API.
2023-07-09 20:42:24.720 [DEBUG] [tatmo.internal.handler.DeviceHandler] - bridgeStatusChanged for bridge netatmo:home:home:<myapp> to ONLINE
2023-07-09 20:42:24.721 [DEBUG] [tatmo.internal.handler.ModuleHandler] - bridgeStatusChanged for thing netatmo:presence:home:<myapp>:Presence_Camera_Pasture to UNKNOWN
2023-07-09 20:42:24.722 [DEBUG] [tatmo.internal.handler.ModuleHandler] - bridgeStatusChanged for thing netatmo:presence:home:<myapp>:Presence_Camera_Gate to UNKNOWN
2023-07-09 20:42:27.007 [DEBUG] [tatmo.internal.handler.ModuleHandler] - bridgeStatusChanged for thing netatmo:presence:home:<myapp>:Presence_Camera_Pasture to ONLINE
2023-07-09 20:42:27.007 [DEBUG] [tatmo.internal.handler.ModuleHandler] - bridgeStatusChanged for thing netatmo:presence:home:<myapp>:Presence_Camera_Gate to ONLINE
2023-07-09 20:42:27.008 [DEBUG] [handler.capability.RefreshCapability] - Module refreshed, next one in 180 s
2023-07-09 20:42:29.403 [DEBUG] [handler.capability.RefreshCapability] - Module refreshed, next one in 180 s
2023-07-09 20:42:29.527 [DEBUG] [handler.capability.RefreshCapability] - Module refreshed, next one in 180 s

I notice it says the things (Presence cameras) are online, but they are not (UI shows them as UNKOWN and their items have state NULL).
Please let me know if you need logs from a different scenario.

Regarding the logs, in the pasted logs no problems are seen, for example no error messages or bridge offline status?

Hey,
if you are referring to the change that happened recently, that one I did. I had it running with the updated version for a few weeks.
Regarding the logs. Yes, there is no problem visible and the bridge is listed as online. But the devices-things are UNKNOWN and their items not updated (always state NULL).

Hey,
i am still on the netatmo binding 3.2.0 with OH 3.2.0. I am afraight of breaking my hard work with an update and am not able to do a proper backup right now (holidays :wink:

However, my netatmo binding stopped working suddendly after being fine for month.
Log says: Unable to connect Netatmo API : Error on trying to get an access token!
So the bridge is not connected.

Is there any way for getting it to work with the old 3.2 version or are there netatmo-server changes making this impossible?

Thanks :wink:

You could backport these changes to 3.2:

Or you could implement your own token refresh management in a script and modify the netatmo.things file to trigger token refresh when needed.

Otherwise you would have to update to at least 3.4. Unfortunately 3.3 contained breaking changes for the Netatmo binding - see Release openHAB 3.3.0 · openhab/openhab-distro · GitHub

The best version right now is 4.0 where the OAuth2 implementation from the core framework is used.

So you have some options, but it seems there is no easy solution since you are using a quite old version of openHAB with an evolving cloud service.

1 Like

Thank you,
i will try the update asap :wink:

Hi,
I have upgraded today to 4.0.0 Release build. Registration of the app was working fine. But the binding does not work for me. I have following error in the log:
2023-07-25 16:46:09.787 [WARN ] [l.providers.NetatmoThingTypeProvider] - Unable to define ModuleType for thingType NOC : No known ModuleType matched ‘netatmo:NOC’

2023-07-25 16:46:09.790 [WARN ] [l.providers.NetatmoThingTypeProvider] - Unable to define ModuleType for thingType NAWelcomeHome : No known ModuleType matched ‘netatmo:NAWelcomeHome’

2023-07-25 16:46:11.795 [WARN ] [l.providers.NetatmoThingTypeProvider] - Unable to define ModuleType for thingType NOC : No known ModuleType matched ‘netatmo:NOC’

2023-07-25 16:46:11.802 [WARN ] [l.providers.NetatmoThingTypeProvider] - Unable to define ModuleType for thingType NAWelcomeHome : No known ModuleType matched ‘netatmo:NAWelcomeHome’

Any idea how to solve that? Before the upgrade it working fine.

Many thanks and BR.

From which version did you upgrade?

To better track this issue, it might be better to start a new thread, since this thread is very old and long and was concerning breaking changes in 3.3.

However, if you are upgrading from a version before 3.3, then it’s actually the correct thread, and you might read through it, or simply read Release openHAB 3.3.0 · openhab/openhab-distro · GitHub

Hi,
I upgraded from 3.4.4. So I will open a new one.

BR

hello
i am getting this when i try to add a camera outdoor to openhab 4.0.1

│2023-08-01 12:07:53.301 [ERROR] [core.thing.internal.ThingManagerImpl] - Checking/initializing thing 'netatmo:presence:netatmo:646717edc9721562df07a316:70ee508ad2f4' failed unexpectedly.                     │
│java.lang.IllegalArgumentException: Duplicate channels netatmo:presence:netatmo:646717edc9721562df07a316:70ee508ad2f4:presence#siren                                                                           │
│       at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]                                                                                                            │
│       at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:127) ~[?:?]                                                                                                            │
│       at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:123) ~[?:?]                                                                                                            │
│       at org.openhab.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:123) ~[?:?]                                                                                                        │
│       at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.doChannel(UpdateChannelInstructionImpl.java:140) ~[?:?]                                                                          │
│       at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.lambda$0(UpdateChannelInstructionImpl.java:101) ~[?:?]                                                                           │
│       at java.util.Arrays$ArrayList.forEach(Arrays.java:4204) ~[?:?]                                                                                                                                          │
│       at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.perform(UpdateChannelInstructionImpl.java:101) ~[?:?]                                                                            │
│       at org.openhab.core.thing.internal.ThingManagerImpl.lambda$17(ThingManagerImpl.java:1093) ~[?:?]                                                                                                        │
│       at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]                                                                                                                                                  │
│       at org.openhab.core.thing.internal.ThingManagerImpl.checkAndPerformUpdate(ThingManagerImpl.java:1093) ~[?:?]                                                                                            │
│       at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:917) ~[?:?]                                                                                      │
│       at org.openhab.core.thing.internal.ThingManagerImpl.checkMissingPrerequisites(ThingManagerImpl.java:1122) ~[?:?]                                                                                        │
│       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]                                                                                                                       │
│       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]                                                                                                                              │
│       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]                                                                                │
│       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]                                                                                                               │
│       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]                                                                                                               │
│       at java.lang.Thread.run(Thread.java:833) ~[?:?]

I even tried to configure using items the account and bridge goes online but not the camera stays in unknown state but no more errors in the log

An issue is already opened:

I checked the github bug but does this also affect file based configuration. Any fast fix :slight_smile: .

thank you

After Updating to openHab 4.0.1 from 3.4.4 my rain gauge item shows the following error in openhab.log

2023-08-08 20:16:44.376 [WARN ] [penhab.core.library.items.NumberItem] - Failed to update item 'NetatmoRegenmesser_Niederschlag' because '0 mm/h' could not be converted to the item unit 'm'

the 24h item is working, with the same settings. Could it be, that this is a bug in the binding?

Your item NetatmoRegenmesser_Niederschlag has probably either a wrong number dimension or wrong unit set.

Yes. you were right. Number:Lenght was set as it is on the 1h and 24h. But here Number:Speed is the right value.

THX!

Hi,

my presence camera stopped working after the update to 4.0.1 (coming from 3.4.5). I see an error on the logs:

java.lang.IllegalArgumentException: Duplicate channels netatmo:presence:d3ba4c9df5:62b748e4f51b0c0a717dd7ca:70ee5071a89c:presence#siren
        at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
        at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:127) ~[?:?]
        at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:123) ~[?:?]
        at org.openhab.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:123) ~[?:?]
        at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.doChannel(UpdateChannelInstructionImpl.java:140) ~[?:?]
        at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.lambda$0(UpdateChannelInstructionImpl.java:101) ~[?:?]
        at java.util.Arrays$ArrayList.forEach(Arrays.java:4204) ~[?:?]
        at org.openhab.core.thing.internal.update.UpdateChannelInstructionImpl.perform(UpdateChannelInstructionImpl.java:101) ~[?:?]
        at org.openhab.core.thing.internal.ThingManagerImpl.lambda$17(ThingManagerImpl.java:1093) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at org.openhab.core.thing.internal.ThingManagerImpl.checkAndPerformUpdate(ThingManagerImpl.java:1093) ~[?:?]
        at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:917) ~[?:?]
        at org.openhab.core.thing.internal.ThingManagerImpl.lambda$2(ThingManagerImpl.java:550) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

I use the presence camera workout siren. Anyone has the same?

My doorbell thing now remains in state UNKNOWN. Before the update it was always OFFLINE. In the trace log I see only successful requests (all code 200).

This is a bug:

PR for this issue created.

1 Like

I am on openhab 4.0.3 and trying to add an outdoor camera all good but the camera stays unknown no matter what if I add it via UI or file based the bridges are online.
Any help ?
netatmo.log (165.0 KB)