spacemanspiff2007 / HABApp

Easy home automation with MQTT and/or openHAB
Apache License 2.0
54 stars 23 forks source link

ThingStatusInfoEvent fires twice #408

Closed UrsusS closed 9 months ago

UrsusS commented 10 months ago

In HABApp the ThingStatusInfoEvent is triggered twice while in OH (3.4.4) it is only once in the logs.

[2023-08-23 12:03:48,110] [HABApp.EventBus            ]     INFO | zwave:device:gehirn:node66: <ThingStatusInfoEvent name: zwave:device:gehirn:node66, status: OFFLINE, detail: COMMUNICATION_ERROR, description: "Node is not communicating with controller">
[2023-08-23 12:03:48,122] [HABApp.EventBus            ]     INFO | zwave:device:gehirn:node66: <ThingStatusInfoChangedEvent name: zwave:device:gehirn:node66, status: OFFLINE, detail: COMMUNICATION_ERROR, description: "Node is not communicating with controller", old_status: ONLINE, old_detail: NONE>
[2023-08-23 12:03:48,124] [HABApp.EventBus            ]     INFO | zwave:device:gehirn:node66: <ThingStatusInfoEvent name: zwave:device:gehirn:node66, status: OFFLINE, detail: COMMUNICATION_ERROR, description: "Node is not communicating with controller">
2023-08-23 12:03:47.561 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'num_Server_CPU_Temperature' changed from 71.6 °C to 73 °C
2023-08-23 12:03:48.106 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'zwave:device:gehirn:node66' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Node is not communicating with controller
2023-08-23 12:03:48.596 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dtm_Network_GigaSetGO_LastSeen' changed from 2023-08-23T12:02:48.463+0200 to 
spacemanspiff2007 commented 10 months ago

The openHAB log does not show the ThingStatusInfoEvent- you have to enable the logging first.

@UrsusS I think you might be mixing ThingStatusInfoEvent and ThingStatusInfoChangedEvent. Am I correct?

spacemanspiff2007 commented 9 months ago

@UrsusS Is this a misunderstanding or do you still think this is a bug?

UrsusS commented 9 months ago

Sorry, I was too busy to have a detailed look at it. I'll come back in due course.

Am Montag, dem 11.09.2023 um 00:03 -0700 schrieb spacemanspiff2007:

@UrsusS Is this a misunderstanding or do you still think this is a bug? =E2=80=94 Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

UrsusS commented 9 months ago

It seems that ThingStatusInfoEvent is in fact a ThingStatusInfo_Updated_Event. I tried to switch to ThingStatusInfoChangedEvent. Let's see what's happening, but I expect that (as usual) HABApp is correct ;-)

BTW: is this the correct place to ask for those things, even when it is not proven, or is the forum the better place?

spacemanspiff2007 commented 9 months ago

Let's see what's happening

Please make sure to report your findings back to this issue

BTW: is this the correct place to ask for those things, even when it is not proven, or is the forum the better place?

If you think this is a bug then of course it's okay to open an issue. If you have doubts or it's more of a question then I'd prefer the forum.

UrsusS commented 9 months ago

I could observe it a bit and it seems now fine. Problem was the usage of the wrong Event.