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

openhab2-in does not handle state changes #57

Open
ckarras opened this issue Dec 29, 2020 · 9 comments
Open

openhab2-in does not handle state changes #57

ckarras opened this issue Dec 29, 2020 · 9 comments

Comments

@ckarras
Copy link

ckarras commented Dec 29, 2020

I created a simple Node-RED flow that uses openhab2-in to watch updates to an item and uses the "debug" node to log the updated value. When I first deploy the flow, I see the value is read and logged as expected. However, when I do any updates to the value, the flow never sees the update unless I deploy the flow again to force it to re-execute.

image

I have confirmed that the update is a real update (the value actually changed, it's not simply the same value that has been rewritten again). Also, if I use openhab rules to watch for the same updates, I confirmed that the rules can successfully be notified immediately of updates to the same item.

I have also confirmed that the flow is still running after the initial update, by also adding to the same flow a simple http listener that sends back the request to the caller. I can then call, for example /testnodered?test=1234, and get back a response multiple times, which confirms the flow is still running (the same flow that contains the openhab2-in node)
image

Am I missing something to make the flow run continuously and receive updates, in opposition to just getting the initial values? Or is something wrong that prevents receiving updates? If something is wrong, what should I do to investigate? (Are there logs I can enable, etc). Also, are there complete sample Node-RED flows using the openhab2 nodes I could review to compare them with what I did?

I'm using the following versions:

  • node-red 1.2.6
  • openhab 2.5.0
  • node version 12.20.0
  • Linux arm71 4.19.75-v7+ (Raspberry PI 3)

Thanks

@posseydon6891
Copy link

just had same issue with node-red-contrib-openhab2 v. 1.1.8 and openHAB 2.5 - no state updates

after upgrading to openHAB 3 it works fine

@lavirott
Copy link

lavirott commented Jan 1, 2021

I had the same issue after upgrading to openhab3 and installing the new node-red-contrib-openhab2 v. 1.1.8.
In fact, after upgrading to node-red-contrib-openhab2 v. 1.1.8, it seems, I did not restarted node-red. The issue did not persits after restarting node-red.

@poki123
Copy link

poki123 commented Jan 3, 2021

I have the same issue after upgrading node-red-contrib-openhab2 1.1.8 - update state for OpenHAB 2 (2.5.11-1) is not working anymore :-(.

@lavirott
Copy link

lavirott commented Jan 3, 2021

Yes, I confirm that upgrading to node-red-contrib-openhab2 1.1.8 can not work with openhab2. The REST API was modified from openhab2 to openhab3, modifing /rest/smarthome/... to /rest/openhab/...
So installing version 1.1.8 will not work with openhab2 anymore. Why not rolling back node-red-contrib-openhab2 to 1.1.7 and creating a node-red-contrib-openhab3 corresponding to v1.1.8.
My 2 cts.

@guny74
Copy link

guny74 commented Jan 15, 2021

I also have the same issue. Upgrading to 1.1.8 my openhab nodes does not work anymore. For a smooth migration, I also have an Openhab3 Instance...but with this the nodes also do not work.

I Always get debugmessage ""ERROR {"type":"error","status":404}" from config Node (Openhab 2)

@shutterfreak
Copy link

Thanks to this thread I managed to find the culprit, as I'm still running openHAB2 and things were broken with the upgrade to 1.1.8.

Probably version 1.1.8 should have been labelled 2.x (or even 3.x to comply with openHAB versioning).

@celevra
Copy link

celevra commented Jun 28, 2021

is there a way to downgrade?

@celevra
Copy link

celevra commented Jun 28, 2021

cd .node-red/node_modules
rm node-red-contrib-openhab2/ -R
wget https://codeload.github.com/pdmangel/node-red-contrib-openhab2/zip/ebbe638fc03705c6bc7668b035e3d222be8c4e49 -O tmp.zip
unzip tmp.zip
mv node-red-contrib-openhab2* node-red-contrib-openhab2/
rm tmp.zip

service nodered restart

@jwillhoeft
Copy link

Had the same problem. Thanks for the analysis and downgrade instructions!

I also agree that such a breaking change should definitely put into a separate add-on. In my case an upgrade to Openhab3 seems to require a complete new setup / configuration.

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

No branches or pull requests

8 participants