spacemanspiff2007 / HABApp

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

Ping not working (dev version) #389

Closed UrsusS closed 1 year ago

UrsusS commented 1 year ago

HABApp Version 1.1.0.DEV-2 Connected to OpenHAB version 4.0.0.M3 (Milestone Build)

I tried on my test server the dev version of HABApp together with OH4 and I have issues with the ping. My ping-Items stays None

[2023-06-07 13:36:49,825] [           HABApp.EventBus]     INFO | num_Server_HABApp_Ping: <ItemStateUpdatedEvent name: num_Server_HABApp_Ping, value: None>
[2023-06-07 13:36:59,832] [           HABApp.EventBus]     INFO | num_Server_HABApp_Ping: <ItemStateUpdatedEvent name: num_Server_HABApp_Ping, value: None>

I used the same definition as on my production machine (HABApp 1.08, OH 3.4.4) where it is working.

  ping:
    enabled: true                 # If enabled the configured item will show how long it takes to send an update from HABApp and get the updated value back from openHAB in milliseconds
    item: num_Server_HABApp_Ping  # Name of the Numberitem
    interval: 10                  # Seconds between two pings

Number num_Server_HABApp_Ping <none> (gServer)

On the production server the log looks like that:

[2023-06-07 00:00:00,380] [HABApp.EventBus            ]     INFO | num_Server_HABApp_Ping: <ItemStateEvent name: num_Server_HABApp_Ping, value: 30.7>
[2023-06-07 00:00:00,383] [HABApp.EventBus            ]     INFO | num_Server_HABApp_Ping: <ItemStateChangedEvent name: num_Server_HABApp_Ping, value: 30.7, old_value: 18.4>
[2023-06-07 00:00:10,383] [HABApp.EventBus            ]     INFO | num_Server_HABApp_Ping: <ItemStateEvent name: num_Server_HABApp_Ping, value: 14.5>
[2023-06-07 00:00:10,384] [HABApp.EventBus            ]     INFO | num_Server_HABApp_Ping: <ItemStateChangedEvent name: num_Server_HABApp_Ping, value: 14.5, old_value: 30.7>
spacemanspiff2007 commented 1 year ago

Does it work eventually or does it stay on None?

UrsusS commented 1 year ago

I let it run for about 2,5 h, but it is still None.

spacemanspiff2007 commented 1 year ago

I pushed a new version to DEV which fixes the issue. Can you confirum? You have to rename ItemStateEvent changed to ItemStateUpdatedEvent

UrsusS commented 1 year ago

Great, I've tested with DEV-5 and it worked as expected. Thanks for the quick fix!

spacemanspiff2007 commented 1 year ago

Fixed in 1.1.0