Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deconz] status of sensors will not be updated #9517

Closed
stepi2 opened this issue Dec 25, 2020 · 20 comments
Closed

[deconz] status of sensors will not be updated #9517

stepi2 opened this issue Dec 25, 2020 · 20 comments
Assignees
Labels

Comments

@stepi2
Copy link

stepi2 commented Dec 25, 2020

System:
Raspi 4 4GB
openhab 3.0.0 stable
DEConz/Phoscon v2.7.1
40 Xiamoi-Aquara-sensors (multisensor, open/close...)

Description:

  1. All sensors are in deconz-API available, status-updates are available -->anything OK

  2. After installing the bridge all sensors are available in discovery -->anything OK

  3. After installing the bridge all sensors raw data are available -->anything OK

- 2020-12-25 16:49:05.234 [TRACE] [nternal.netutils.WebSocketConnection] - Raw data received by websocket OH-httpClient-deconz-deconz-bridge$24485957: {"e":"changed","id":"20","r":"sensors","state":{"lastupdated":"2020-12-25T15:49:05.231","open":false},"t":"event","uniqueid":"00:15:8d:00:04:9f:f6:0e-01-0006"}
- 2020-12-25 16:49:05.236 [DEBUG] [nternal.netutils.WebSocketConnection] - Couldn't find listener for id 20 with resource type SENSORS. Either no thing for this id has been defined or this is a bug
  1. Create all Things of the sensors -->anything OK
2020-12-25 17:08:15.480 [TRACE] [nternal.netutils.WebSocketConnection] - Raw data received by websocket OH-httpClient-deconz-deconz-bridge$24485957: {"e":"changed","id":"20","r":"sensors","state":{"lastupdated":"2020-12-25T16:08:15.477","open":true},"t":"event","uniqueid":"00:15:8d:00:04:9f:f6:0e-01-0006"}

2020-12-25 17:08:15.482 [TRACE] [ernal.handler.SensorBaseThingHandler] - deconz:openclosesensor:bridge:00158d00049ff60e010006 received SensorMessage{type='', config=null, state=SensorState{dark=null, daylight=null, lightlevel=null, lux=null, temperature=null, humidity=null, open=true, fire=null, water=null, alarm=null, tampered=null, vibration=null, carbonmonoxide=null, pressure=null, presence=null, power=null, battery=null, consumption=null, voltage=null, current=null, status=null, buttonevent=null, gesture=null, valve=null, windowopen='null', lastupdated='2020-12-25T16:08:15.477', xy=null}, e='changed', r='SENSORS', t='event', id='20', manufacturername='', modelid='', name='', swversion='', ep='', lastseen='null', uniqueid='00:15:8d:00:04:9f:f6:0e-01-0006'}
  1. Create items of thing-channels-->Problems are beginning
    5a) create one or two items-->anything OK
    5b) create more items -->any sensor items including step5a) get no updates
    DECONZ-REST-API is still delivering all updates but in the openhab-log-file you can see that openhab-deconz-binding stops receiving any rawdata-->no entries like ...Raw data received by websocket.. in the logfile

  2. delete some items-->nothing happens

  3. only solution is to delete all sensor items, delete all sensor things an start in step 4

@stepi2 stepi2 added the bug An unexpected problem or unintended behavior of an add-on label Dec 25, 2020
@stepi2 stepi2 changed the title [deconz] status of sensors will not be updates [deconz] status of sensors will not be updated Dec 25, 2020
@J-N-K
Copy link
Member

J-N-K commented Dec 25, 2020

I do not understand what you mean by „create items“. Are you linking items to the channels?

What do you mean by „stops receiving raw data“. What is in the log before that happens?

@J-N-K J-N-K self-assigned this Dec 25, 2020
@stepi2
Copy link
Author

stepi2 commented Dec 25, 2020

I do not understand what you mean by „create items“. Are you linking items to the channels?

linking an channel to an item

What do you mean by „stops receiving raw data“. What is in the log before that happens?

before

2020-12-25 17:56:03.805 [TRACE] [nternal.netutils.WebSocketConnection] - Raw data received by websocket OH-httpClient-deconz-deconz-bridge$24485957: {"e":"changed","id":"20","r":"sensors","state":{"lastupdated":"2020-12-25T16:56:03.802","open":false},"t":"event","uniqueid":"00:15:8d:00:04:9f:f6:0e-01-0006"}

2020-12-25 17:56:03.807 [TRACE] [ernal.handler.SensorBaseThingHandler] - deconz:openclosesensor:bridge:00158d00049ff60e010006 received SensorMessage{type='', config=null, state=SensorState{dark=null, daylight=null, lightlevel=null, lux=null, temperature=null, humidity=null, open=false, fire=null, water=null, alarm=null, tampered=null, vibration=null, carbonmonoxide=null, pressure=null, presence=null, power=null, battery=null, consumption=null, voltage=null, current=null, status=null, buttonevent=null, gesture=null, valve=null, windowopen='null', lastupdated='2020-12-25T16:56:03.802', xy=null}, e='changed', r='SENSORS', t='event', id='20', manufacturername='', modelid='', name='', swversion='', ep='', lastseen='null', uniqueid='00:15:8d:00:04:9f:f6:0e-01-0006'}

after linking some more "sensor"-channels to items
absolut no entries for sensors in the log.. all entries for lights are still OK

@J-N-K
Copy link
Member

J-N-K commented Dec 25, 2020

And there is NO error message?

@stepi2
Copy link
Author

stepi2 commented Dec 25, 2020

I found no error message...
-->all the lights have normal log entries: "receive raw-data ...". and then "channel xy receive ..."
-->all sensors have absolut no entry

@J-N-K
Copy link
Member

J-N-K commented Dec 25, 2020

How do you define the things and the items and how do you link them? The binding has no knowledge if the channels are linked or not.

@IntCleastwood
Copy link

IntCleastwood commented Dec 28, 2020

Can confirm the issue. No updates anymore. Deconz REST API is still updating properly each item, but no updates sent to openhab. No log messages written.
I just updated the deconz to latest stable version 2.07.01 because i used just a beta version before (for early device support). But devices are now integrated in stable version.

I also had just two things configured before which worked fine

Bridge deconz:deconz:homeserver [ host="...", apikey="...", httpPort="9080", port="443"] {
    presencesensor      corridor-presence               "Corridor Presence"                 [ id="2" ]
    onofflight          bedroom-switch                  "Bedroom Switch"                    [ id="2" ]
}

Now i have the following config

Bridge deconz:deconz:homeserver [ host="...", apikey="...", httpPort="9080", port="443"] {
    presencesensor      corridor-presence               "Corridor Presence"                 [ id="2" ]
    onofflight          bedroom-switch                  "Bedroom Switch"                    [ id="2" ]
    openclosesensor     bedroom-balkony-window-contact  "Bedroom Balkony Window Contact"    [ id="3" ]
}

Which does not work anymore. But i don't know if the sw update is the reason or the new config or a combination of all.

@J-N-K
Copy link
Member

J-N-K commented Dec 28, 2020

Is it working with UI defined things?

@stepi2
Copy link
Author

stepi2 commented Dec 28, 2020

How do you define the things and the items and how do you link them? The binding has no knowledge if the channels are linked or not.

All things where definend in the new 3.0-UI from Inbox. The Items and the channellinks where defined in the UI too by "add Equipment" in "Model"

@IntCleastwood
Copy link

Tried to add things via PaperUI and scanned explicit for deconz binding incoming items. Coriously there is just the plug to select (see configured "onofflight" in my previous post.)
Cant find any other items (beside the Phillips Daylight item).
The plug is still working perfectly. Seems its just a problem with the two sensors.

I created the things manully, also the items ... they also get no update (also not in logs)

@J-N-K
Copy link
Member

J-N-K commented Dec 28, 2020

So you say you accept things from the INBOX and after you link items to the channel all other sensors stop updating? And there is nothing in the log?

@IntCleastwood
Copy link

IntCleastwood commented Dec 28, 2020

I added all things long before already via config files, thats true. But now I went to the inbox and accepted the only thing that appeared: the switch (which is already added via config, but I dont know how openhab notice that its already existing or not). But i used the generated id that comes from openhab, not my id from the config file, so there is no intersection.
I created and linked a test item for it and tried to represent it on a sitemap ... that was not working, but usually, there is always a log entry when an items state changed. But sadly not for this one.

So you say you accept things from the INBOX and after you link items to the channel all other sensors stop updating? And there is nothing in the log?

So no, it was not working before either

Only log after adding

2020-12-28 23:03:01.733 [.ItemChannelLinkAddedEvent] - Link 'OpenCloseSensor_OpenClose-deconz:openclosesensor:191bc93a:open' has been added.

2020-12-28 23:03:01.737 [vent.ItemStateChangedEvent] - OpenCloseSensor_OpenClose changed from NULL to CLOSED

But no updates for this item anymore, no matter what i do with the sensor

@stepi2
Copy link
Author

stepi2 commented Dec 28, 2020

So you say you accept things from the INBOX and after you link items to the channel all other sensors stop updating? And there is nothing in the log?

yes it was crazy:

  • at first I defined all Things (approx 40) -->All logs are normal-->first read raw-data then assign to channel then updated items
  • second I defined step by step items and channel links --> after the first 5 or 6 items anything was ok... but then suddenly the log of all sensor acitivitis stops.. abolut no more entries.. also no errors in defining items

After deleting all "sensor"-things and - items an recreating them anything works fine. I have normal logs all all items will be updated..

I tried to do the same like the last attemps an defined things an items step by step and checked every time the logs. But i had no more errors..
Sorry so I can't help to concrete the issue at this time

@J-N-K
Copy link
Member

J-N-K commented Dec 28, 2020

@PicCharr Mixing textual and UI configuration often failed (e.g. because of double - things).

@stepi2 So now everything is working? Is it possible that one channel you linked before is not linked now? I could imagine that the problem is that there is wrong itemtype/datatype somewhere and that is the culprit. We have seen something similar before for lights.

@stepi2
Copy link
Author

stepi2 commented Dec 28, 2020

@stepi2 So now everything is working? Is it possible that one channel you linked before is not linked now? I could imagine that the problem is that there is wrong itemtype/datatype somewhere and that is the culprit. We have seen something similar before for lights.

This is possible. I Think you are right. Now I defined only the really necessary items/channels and I corrected all items and the setting after presetting by UI right away. This is the only difference.

@IntCleastwood
Copy link

I revoke my statements. Seems, that added stuff via UI is working now magically. But i cant see any difference between config files and item via PaperUI
The only thing i see is, that PaperUI added my item with the channel path

deconz:openclosesensor:191bc93a:open

But for the docs you have to point out the bridge explicitly like i do in my item

deconz:openclosesensor:homeserver:balkony-window-contact:open

The first seems to work but is not as documented ... whts the reson for this?

@IntCleastwood
Copy link

IntCleastwood commented Dec 28, 2020

After openhab restart number 10 its now working as expected (so far). Sorry for confusion.

@J-N-K J-N-K closed this as completed Dec 29, 2020
@J-N-K J-N-K added invalid and removed awaiting feedback bug An unexpected problem or unintended behavior of an add-on labels Dec 29, 2020
@darkstoneathome
Copy link

Same Problem here. Same Symptoms. Had to downgrade deconz to get back my status in openhab.

There are more users with the same problem: https://www.facebook.com/groups/303797373437980/permalink/1025873591230351/?comment_id=1025902851227425&reply_comment_id=1026233944527649

I'm wondering that the problem solves on its own... sounds like magic ;-)

@stepi2
Copy link
Author

stepi2 commented Dec 31, 2020

now I have the same problem again...

From one second to another there are no status updates on all sensors. No entries in logs again...
I maked no changes, so i think it's not a problem with items or item-configuration

@J-N-K
Copy link
Member

J-N-K commented Dec 31, 2020

Please try tomorrow’s snapshot.

@stepi2
Copy link
Author

stepi2 commented Jan 31, 2021

Maybe i have the solution.
My phoscon installation had set the time to a wrong timezone after an update. So the time of phoscon was one hour earlier then openhab. After setting the correct time in phonscon all status where updated, all worked fine.

But I'm not shure, because I did some updates at same time..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants