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

can t connect Nefit Easy to Home bridge Sinology NAS #62

Open
ivokik opened this issue Dec 21, 2023 · 26 comments
Open

can t connect Nefit Easy to Home bridge Sinology NAS #62

ivokik opened this issue Dec 21, 2023 · 26 comments

Comments

@ivokik
Copy link

ivokik commented Dec 21, 2023

Hi all, hi Robbert, I have tried at least 40 times to create connection with my Nefit easy thermostat , but unfortunately no luck so far. I am getting general error :

×
Config Syntax Error
Config contains invalid JSON

can't install the install command neither:

Note: This is a restricted shell, sudo cannot be used here.

Homebridge Terminal for Synology DSM

Node.js Version: v18.15.0
Node.js Path: /var/packages/Node.js_v18/target/usr/local/bin/node
Plugin Path: /volume1/homebridge/node_modules

Update Node.js: hb-service update-node

Install Plugin: hb-service add homebridge-plugin-name
Remove Plugin: hb-service remove homebridge-plugin-name

homebridge@SynAs:/volume1/homebridge $ $ npm i homebridge-nefit-easy -g
bash: $: command not found
homebridge@SynAs:/volume1/homebridge $

can somebody help please ?

@robertklep
Copy link
Owner

robertklep commented Dec 21, 2023

When a command example starts with a $, it is implied that $ is your shell prompt and not part of the command 😊

So try executing this command:

npm i homebridge-nefit-easy -g

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

amazing ... LOL

homebridge@SynAs:/volume1/homebridge $ npm i homebridge-nefit-easy -g

added 90 packages in 9s
homebridge@SynAs:/volume1/homebridge $

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

ok, now I still can't save the config window:

×
Config Syntax Error
Config contains invalid JSON

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

Here is how my config looks like : of course the personal data is changed

const NefitEasyCommands = require('nefit-easy-commands');
const client = NefitEasyCommands({
serialNumber : 000000000,
accessKey : FzN9_gLQu_XXXX_XXXX,
password : MyPassword,
[ requestTimeout : Number
]
});

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

this is also not working:

{
"accessory": "NefitEasy",
"name": "thermostat",
"serialNumber" : "XXXXXXXXX",
"accessKey": "FzN9_gLQu_XXXX_XXXX",
"password": “MyPassword”
}

@robertklep
Copy link
Owner

robertklep commented Dec 21, 2023

Try removing the underscores from the access key.

However, that's not what a regular Homebridge configuration file looks like. You first need to have a working Homebridge installation, then you can add support for the Nefit Easy to it. This is explained in the documentation.

You can also take a look here for what the config should look like: https://gathering.tweakers.net/forum/list_message/65893906#65893906

Or you might even want to consider installing Hoobs on your Synology, which will handle a lot of the difficult parts of setting up Homebridge: https://mariushosting.com/how-to-install-hoobs-on-your-synology-nas/

From what I know (I've never used it though), you should be able to install the Nefit Easy plugin from its web interface.

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

My HomeBridge is working great for longer than a year now, so that could not be the problem. I got 10 plug ins installed and all are operating great. Just NefitEasy is not :-)
I will take a look at your info and try another approach. So far I got the system to safe the config file, but now the whole HomeBridge is unstable, crashing etc. when NefitEasy is enabled. ( haven't remove the underscore yet, this would be the next step/ test)

@robertklep
Copy link
Owner

You have to check HomeBridge's log to see why it's crashing, but it's probably because of incorrect credentials.

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

I got HomeBridge working again, config file is saving as well, but Nefit Easy is not working - :-(

@robertklep
Copy link
Owner

"Not working" isn't something I can help with, it can mean 1000 different things.

Since you have Node.js installed, to debug this issue it's easiest to install the CLI client:

npm i nefit-easy-cli -g

Then you should be able to see if it can connect, and if not, why not:

easy --serial=SERIALNUMBER --access-key=ACCESSKEY --password=PASSWORD status

@ivokik
Copy link
Author

ivokik commented Dec 21, 2023

After installing child bridge it's not displaying the QR code so I can ad it to the Home Kit set up. Its asks to restart homebridge en return to the child bridge and that's a loop - the QR code never appear.

"Restart Homebridge to finish setting up this child bridge.
Return to this screen after Homebridge has restarted to view the pairing QR code."

After another restart I see in the log file:

Error: Unhandled error. ('XMPP authentication failure')

This is how my config file looks like now:

{
"_bridge": {
"username": "0E:99:83:6E:78:22",
"port": 47820
},
"accessory": "NefitEasyOutdoorTemp",
"name": "thermostat",
"serialNumber": "SERIAL",
"accessKey": "FzN9gLQuXXXXXXXX",
"password": "MyPassword"
}

here are some logs:

nefit-easy-commands/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:476:21)
XMPP authentication failure
XMPP authentication failure
XMPP authentication failure
Error: Unhandled error. ('XMPP authentication failure')
at new NodeError (node:internal/errors:399:5)
at Client.emit (node:events:502:17)
at Client._handleAuthState (/volume1/homebridge/node_modules/nefit-easy-commands/node_modules/node-xmpp-client/lib/Client.js:295:10)

and the result of your last command line:

Usage:
easy [options] status
easy [options] pressure
easy [options] location
easy [options] active-program
easy [options] program-data
easy [options] display-code
easy [options] supply-temperature
easy [options] user-mode [ clock | manual ]
easy [options] gas-usage [ | "?"]
easy [options] hot-water-supply [ on | off ]
easy [options] get
easy [options] put
easy [options] set temperature
easy [options] set active-program
easy [options] decrypt [--type=TYPE]

@robertklep
Copy link
Owner

robertklep commented Dec 21, 2023

This is how my config file looks like now:

That's not what it should look like at all. The correct format is explained in the documentation:

{
  "_bridge": {
    "username": "0E:99:83:6E:78:22",
    "port": 47820
  },
  "accessories": [
    {
      "accessory": "NefitEasy",
      "name": "thermostaat",
      "options": {
        "serialNumber": "657693091",
        "accessKey": "FzN9gLQuXXXXXXXX",
        "password": "MyPassword"
      }
    },
    {
      "accessory": "NefitEasyOutdoorTemp",
      "name": "buitentemperatuur",
      "options": {
        "serialNumber": "657693091",
        "accessKey": "FzN9gLQuXXXXXXXX",
        "password": "MyPassword"
      }
    }
  ]
}

But this won't fix the "XMPP authentication failure", which is caused by either an incorrect serial number or an incorrect access key.

Also, are you sure you have a Nefit Easy and not a Bosch EasyControl? Those are two different devices, even though they look similar. This plugin only works with the Easy.

@ivokik
Copy link
Author

ivokik commented Jan 29, 2024 via email

@robertklep
Copy link
Owner

Github doesn't support attachments in e-mails, please visit the website and add your images to your comment 😊

@ivokik
Copy link
Author

ivokik commented Jan 29, 2024

Screenshot 2024-01-29 at 13 49 10
Screenshot 2024-01-29 at 15 17 05
Screenshot 2024-01-29 at 15 17 14

@robertklep
Copy link
Owner

Is anything being logged anywhere? I don't HomeBridge myself so no idea where to look.

@ivokik

This comment was marked as outdated.

@ivokik
Copy link
Author

ivokik commented Jan 29, 2024

So, I found a home kit set up code in the log I just send you, so I deleted the bridge and added it manually via the set up code in the log file. Now it seems that it's connecting to my nefit easy thermostat. Communication is stil not ideal. As I can see that the temperature is set to 25', but the heater is not actually starting up with heating. See foto:

Ok, after 3 + min it actually started heating ...
so there is still something going on here 😅

@ivokik
Copy link
Author

ivokik commented Jan 29, 2024

now I got 2 child bridges :-) One is green ( working) other one is red ( not working)
Screenshot 2024-01-29 at 18 06 20

@robertklep
Copy link
Owner

The log suggests that the credentials for NefitEasyOutdoorTemp are not correct. But do you really need that accessory? Because it's not required in any way to control your Nefit Easy device.

@ivokik
Copy link
Author

ivokik commented Jan 29, 2024 via email

@robertklep
Copy link
Owner

robertklep commented Jan 30, 2024

The log says you do:

Error: [homebridge-nefit-easy] Invalid/missing credentials in configuration file.
at new NefitEasyAccessoryOutdoorTemp

@ivokik
Copy link
Author

ivokik commented Jan 30, 2024

yeah I see that... This the default name the thermostat is getting by installing the plug in. I can do what ever I want to try to change it to my own name... it won't take it.
Plug in creates his own thermostat and calls it NefitEasyAccessoryOutdoorTemp :-)

After I insert my data ( passwords etc) it creates a new thermostat with my given name and data, which is fine, and this thermostat works fine, but... there is still a second child bridge that the plug in creates automatically and I can't delete it... what ever I try :-) see my previous screenshots.

I saw you pushed an update yesterday ( based on my input I guess) - LOL

Thank you so far for you support Robbert.

@robertklep
Copy link
Owner

I pushed an update to fix two typos 😅 But to be honest, I don't know why Homebridge would be creating two bridges where one works and the other one doesn't (other than that second bridge/accessory being declared in the configuration, which if I understand correctly it doesn't).

@ivokik
Copy link
Author

ivokik commented Jan 30, 2024

yeah ! It has something to do with the Child Bridge settings im guessing. Because if a child bridge options is not ON - the whole Homebridge can't start at all :-)

@ivokik
Copy link
Author

ivokik commented Jan 30, 2024

also it can't generate QR code after Child Bridge is created:

Screenshot 2024-01-30 at 13 51 01

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

2 participants