nefit-easy-http-server icon indicating copy to clipboard operation
nefit-easy-http-server copied to clipboard

SSL fix now different?

Open TheFons-01 opened this issue 4 years ago • 9 comments

For what it is worth: I have followed the wiki page for domoticz to install the nefithttpserver on my pi. I have updated all and everything and followed you tip rearding lowering the openssl setting to none and default. But all my pm2 logs showed me that I had the authentiction error. PM2 log: App [nefiteasyhttpserver:0] exited with code [1] via signal [SIGINT] , folled by a restart and again a exit Getting tired of this I replaced the settings of the etc/ssl/openssl.cnf to MinProtocol = TLSv1.2 CipherString = DEFAULT@SECLEVEL=2

And presto, after having PM2 do a restart of nefiteasyhttpserver, Easyserver is now running! PM2 logs gives this: PM2 | 2020-12-29T00:27:04: PM2 log: App [nefiteasyhttpserver:0] online PM2 | 2020-12-29T00:27:07: PM2 log: App [nefiteasyhttpserver:0] exited with code [1] via signal [SIGINT] PM2 | 2020-12-29T00:27:07: PM2 log: App [nefiteasyhttpserver:0] starting in -fork mode- PM2 | 2020-12-29T00:27:07: PM2 log: App [nefiteasyhttpserver:0] online PM2 | 2020-12-29T00:28:01: PM2 log: Stopping app:nefiteasyhttpserver id:0 PM2 | 2020-12-29T00:28:01: PM2 log: App [nefiteasyhttpserver:0] exited with code [0] via signal [SIGINT] PM2 | 2020-12-29T00:28:01: PM2 log: pid=4828 msg=process killed PM2 | 2020-12-29T00:28:01: PM2 log: App [nefiteasyhttpserver:0] starting in -fork mode- PM2 | 2020-12-29T00:28:01: PM2 log: App [nefiteasyhttpserver:0] online BUT: in domoticz the Netfit http plugin still shows in the logging: 2020-12-29 00:54:06.388 Error: NefitEasy: Error getting http data! ERGO: only half of my problem is fixed, Now I still need a solution for the domoticz part for the Nefit plugin. Can you help?

Originally posted by @TheFons-01 in https://github.com/robertklep/nefit-easy-http-server/issues/35#issuecomment-751899928

TheFons-01 avatar Dec 29 '20 00:12 TheFons-01

By the way: netstat -vpn does not show any port 3000 open for the communication between easy-server and the plugin in Domoticz, although I entered the --port=3000 option in the nefiteasyhttpserver.sh How can I check the connection between the 2?

TheFons-01 avatar Dec 29 '20 01:12 TheFons-01

You may have to start with installing the CLI tool to see if it's actually able to retrieve data from your Easy.

I don't use Domoticz so have no idea how to debug issues with it, but if the server is running properly you should be able to retrieve data from it using, for example, cURL, as explained here.

robertklep avatar Dec 29 '20 06:12 robertklep

I used: [system_default_sect] MinProtocol = None CipherString = DEFAULT

which is now the system-wide setting in a rpi4 and that works. success Leo

hoekbrwr avatar Dec 29 '20 09:12 hoekbrwr

I have trouble with node-red-contrib-nefit-easy2 after updating to Raspbian Bullseye

Now I have installed Raspbian Bullseye and I do not receive any messages. I updated to the latest version of the node! At startup I am connected to Bosch: 15 Jun 14:55:59 - [info] [nefit-easy-config:fbd2d7c20a44ddc8] Nefit Easy 820921714 connected to Bosch backend. 15 Jun 14:55:59 - [info] [nefit-easy-config:9979e7fc.470718] Nefit Easy 820921714 connected to Bosch backend. 15 Jun 14:55:59 - [info] [nefit-easy-config:fbd2d7c20a44ddc8] Nefit Easy software firmware version: 02.22.00 15 Jun 14:55:59 - [info] [nefit-easy-config:9979e7fc.470718] Nefit Easy software firmware version: 02.22.00

At the debug level I get this fault message: "TypeError: Cannot read property 'then' of undefined"

Can the recent update be the cause of this trouble? On Buster it was OK!

hoekbrwr avatar Jun 15 '22 13:06 hoekbrwr

https://github.com/robertklep/nefit-easy-http-server/issues/47#issuecomment-1156449610

I now have installed Node-RED on Windows and I get exactly the same error. It does not like to be a problem with the ssl config!

hoekbrwr avatar Jun 15 '22 15:06 hoekbrwr

Can you post the full stack trace? I need to know where exactly that TypeError occurs.

robertklep avatar Jun 15 '22 16:06 robertklep

Sorry, but this is the first time I am debugging node.js software. I haven't seen any stacktrace until now. If you can guide me how to get that I am willing to provide you with this info! In themean time I am fooling around in the javascript program to get an idea how it works. However there are only 3 .then in the SW. I tried a debug print and found the suspected place where there is coming an undefined value: // Execute command and generate message this.status({ fill: "yellow", shape: "ring", text: "communicating" }); this.log(this.easy.command(node.command, node.uri, node.value)); this.easy.command(node.command, node.uri, node.value).then((data) => {

The marked with ** ** seems to be the root of the problem. Why, I have no idea! This is the output in the node-red-log: 15 Jun 19:29:33 - [info] [nefit-easy:f1db003101a45f3a] undefined 15 Jun 19:29:33 - [error] [nefit-easy:f1db003101a45f3a] TypeError: Cannot read properties of undefined (reading 'then')

hoekbrwr avatar Jun 15 '22 17:06 hoekbrwr

It looks like Bosch changed something in their backend that is preventing some projects from working, there's also a thread on the Home Assistant forum about this.

I'll have to check and see what they changed.

Never mind, I wasn't looking properly.

But your problem seems to exist in the Node RED node implementation, I can't help with that. Perhaps create an issue here: https://github.com/RaimondB/node-red-contrib-nefit-easy/issues

robertklep avatar Jun 15 '22 19:06 robertklep

After a night sleep I realized I made a mistake in configuring the node! Now I am connected!. However this mistake is not detected at deploying the node! I will talk to Raimond Brookman!

hoekbrwr avatar Jun 16 '22 07:06 hoekbrwr