QNimbus / node-red-contrib-openhab-v2

MIT License
9 stars 3 forks source link

support of openhab 3.0.0 #18

Closed serg013 closed 4 years ago

serg013 commented 4 years ago

Could you please add support of openhab 3.0.0. I've just upgrade it to 3.0.0 version and it looks like everything works except I'm unable to control my devices from node red. I really enjoy nede-red-contrib-openhab-v2 and thank you for your great job. Could you please check it it will be least time to spend to add this support. I understand that it is beta but I like new versions of software to see new features.

If you are interested in my request I have no status update in "openhab in" and have following error while trying to control "openhab out": Everything work before upgrade. ) "response error '{"statusCode":415,"body":"","headers":{"connection":"close","date":"Thu, 24 Sep 2020 18:43:11 GMT","content-length":"0","server":"Jetty(9.4.20.v20190813)"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"myhost:8080","port":"8080","hostname":"myhost","hash":null,"search":null,"query":null,"pathname":"/rest/items/cor_lt_st","path":"/rest/items/cor_lt_st","href":"http://myhost:8080/rest/items/cor_lt_st"},"method":"POST","headers":{"content-length":3}}}' on 'myhost:8080/rest/items/cor_lt_st'"

QNimbus commented 4 years ago

Hello, I'm currently working on a new major release for this plugin with quite a few improvements. I will install OpenHAB 3.0.0 and make sure it works with this version although I cannot give you an estimate of when it will be done unfortunately.

If you depend on the working of NodeRED and this plugin, I would suggest waiting with upgrading OpenHAB to 3.0.0 - as you said yourself, it is still in beta.

I will keep you posted!

serg013 commented 4 years ago

Thank you so much. It's great to have a prompt feedback. Yes, in this case I think to stay on openhab 2 as working with node red is the priority. Looking forward to have have major release. ) Best luck!

MattL0 commented 4 years ago

Is that the version that had orange nodes?

QNimbus commented 4 years ago

Thank you so much. It's great to have a prompt feedback. Yes, in this case I think to stay on openhab 2 as working with node red is the priority. Looking forward to have have major release. ) Best luck!

I've release a new version of node-red-contrib-openhab-v2 yesterday. I have briefly tested it in a Docker container with OpenHAB 3.0.0 and it seemed to work fine. I'm currently using this new and updated version of node-red-contrib-openhab-v2 in my own home to control my scenes et all.

Please be aware that this new version of node-red-contrib-openhab-v2 is not backwards compatible and you will probably have to recreate your flows and nodes so please keep this in mind.

I tested it running NodeRED v1.1.3 and OpenHAB v3.0.0 all running in Docker containers.

serg013 commented 4 years ago

I've just tried it on docker with same version of nodered as yours. It works perfectly. Thank you very much for fast implementation. I used to work with version by link below. When I'm using "in" node it has note below showing current status. If it is possible It would be great to see it in "...openhab-v2" as I do not need to debug input to see actual item status. Thank you for your help and great job! https://flows.nodered.org/node/node-red-contrib-openhab2

QNimbus commented 4 years ago

@serg013 Thank you for your kind words - I'm happy to know the new version is working for you.

Would you be so kind as to file a seperate 'issue' (that I can tag as a feature request) with an exact description of what you would like to have changed? I'm not exacty sure what you are trying to suggest so maybe you can go into some more detail for me.

In either case I will close this issue since it seems to be resolved.

serg013 commented 4 years ago

Sorry, I faced with error. When I used "...contrib-openhab2" there was a problem with sending control state to item and I could read states. Now I just checked state control and I can do it but unable to read states. First time I restarted node red I had "in" connected. After second restart connection is lost I have couple error messages: Cannot destructure property state of 'undefined' or 'null'. Error: Request failed with status code 404 TypeError: Cannot read property 'temp' of undefined TypeError: Cannot read property '1' of undefined

response error '{"statusCode":404,"body":"","headers":{"connection":"close","allow":"DELETE,POST,GET,PUT,OPTIONS,HEAD","date":"Tue, 06 Oct 2020 19:45:15 GMT","content-length":"0","server":"Jetty(9.4.20.v20190813)"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"myhost:8080","port":"8080","hostname":"myhost","hash":null,"search":null,"query":null,"pathname":"/rest/items","path":"/rest/items","href":"http://myhost:8080/rest/items"},"method":"GET","headers":{}}}' on 'http://myhost:8080/rest/items' SSE http://192.168.0.103:8080/rest/events - Not found ERROR {"type":{"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"myhost","port":8080}}

I restarted ones again & do not see error messages but anyway unable read item status.