Home Assistant Community Add-on: Node-RED

Same here :frowning:

Another one here

I don’t think it is a pure node red problem. Appdaemon add -on does the same.

Confirmed I have the same issue with Appdaemon too.

:raising_hand_man:

Thanks for all the replies.
All of you are confirming an issue, but no one is supplying full details, which we need to find out the issue at hand.

Things we’d need:

  • Hass.io type: Generic Linux (Ubuntu Bionic, xenial?), ResinOS, HassOS?
  • OS version?
  • Hass.io Supervisor version?
  • Beta channel?
  • Home Assistant version?
  • Add-on version?
  • When did this issue start occurring?
  • Is the used server URL in node-red http://hassio/homeassistant?
  • Is the password used by node-red to connect to the server a weird long token like string? Your password? Or empty?
  • Please provide Node-RED add-on logs which shows a failure (or taken at the moment the issue occurred)
  • Please provide Hass.io System logs which shows a failure (or taken at the moment the issue occurred)

Take the answers to these questions and put them into a GitHub ticket (or add it to a matching existing ticket).

Thanks.

My setup:

Hassio / ResinOS
Supervisor 118
Hardware Pi3B

Add-on: AppDaemon, Node Red. Problem with both.

Issue started this morning. My outside lights turned off fine at 3.40 CET, but during the morning it went wrong.

My log (from AppDaemon though):

2018-07-24 17:32:01.100086 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 17:48:12.888088 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 17:48:12.890092 WARNING AppDaemon: Unexpected error in worker for App Hjemme:
2018-07-24 17:48:12.893761 WARNING AppDaemon: Worker Ags: {'name': 'Hjemme', 'id': UUID('f435e8a1-cfcc-46a6-8265-f8dcb3ee4f1a'), 'type': 'attr', 'function': <bound method presence.hjemme of <presence.presence object at 0x746312b0>>, 'attribute': 'state', 'entity': 'device_tracker.samsung_galaxy_s7_edge', 'new_state': 'home', 'old_state': 'not_home', 'kwargs': {'handle': UUID('cf2086b5-a45b-4bb5-989d-510e03f82523')}}
2018-07-24 17:48:12.896426 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 17:48:12.900825 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 590, in worker
    self.sanitize_state_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/presence.py", line 15, in hjemme
    self.turn_on("input_boolean.house_mode")
  File "/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 22, in func_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 330, in turn_on
    self.call_service("homeassistant/turn_on", **rargs)
  File "/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 22, in func_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 457, in call_service
    r.raise_for_status()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://hassio/homeassistant/api/services/homeassistant/turn_on
2018-07-24 17:48:12.902024 WARNING AppDaemon: -------------------------------------

I get constant: "Login attempt failed

Login attempt or request with invalid authentication from 172.30.32.2"

Hass.io type: HassOS
OS version? HassOS 1.5,
Hass.io Supervisor version? 118
Beta channel? No
Home Assistant version? .74
Add-on version? .4 Node-Red
When did this issue start occurring? Upon a Restart on Yesterday - 07/23
Is the used server URL in node-red http://hassio/homeassistant?
Is the password used by node-red to connect to the server a weird long token like string? Your password? Or empty? My Password
Please provide Node-RED add-on logs which shows a failure (or taken at the moment the issue occurred)

24 Jul 12:21:03 - [error] [server:Home Assistant1] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant

Please provide Hass.io System logs which shows a failure (or taken at the moment the issue occurred)

Trying to find the exact error.

Same issue as @ZStanard (same version numbers etc… as well)

Just done it in an already opened issue.

Thanks

hi all, im getting this

[error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant

It should not be your password. It should not have been changed from the token that was there.

1 Like

Hi, I also getting the same error. It happened today.

How do you get the token back? I’ve tried multiple things including uninstalling, reinstalling add-on.

Uninstall, delete the node-red-folder in /config and reinstall. The token is stored in that folder as far as I know.

Guys hold on your horses… implementing a more solid fix NOW… (testing)

Update 21:02 (UTC+2): Testing successful. Awaiting new dev builds
Update 21:15 (UTC+2): Dev build succeeded. Second test run…
Update 21:22 (UTC+2): Test went fine. Awaiting release build
Update 21:35 (UTC+2): Done. See release below.

4 Likes

@frenck does that also include appdaemon?

:tada: Release v0.5.0

This release adds a little piece of automation to the add-on, because of the recent issues occurring after the 118 release of the Hass.io Supervisor.

Let me be straight here. This is not a bugfix on the Node-RED add-on. This release helps you fixing your (broken or maybe migrated from older or alternative add-on) Node-RED configuration!

This current release checks your Node-RED flows and Home Assistant server configuration. If it finds that the configuration is incorrect, it will fix this, right before Node-RED starts.

Be sure of the following:

Your Home Assistant server URL should be: http://hassio/homeassistant

If the add-on finds a configured server with the above URL, it will take care of using/configuring the correct Hass.io API token.

So in case, you are using something else. Change your server URL, deploy your workflow. Close the Node-RED tabs in your browser. Restart add-on. Done.

Full Changelog

Added

  • Adds automatic configuration of the Hassio API token

Fixed

  • Fixes incorrect title in add-on README template
  • Fixes shellcheck warning
3 Likes

Lets keep it on topic here. Thank you.

still the same :frowning:

FYI: I have Supervisor 119 installed

Which logs do you need?

Node Red Addon Log:

24 Jul 21:36:12 - [warn] [api-call-service:OFF] Error calling service, home assistant api error
24 Jul 21:36:12 - [error] [api-call-service:OFF] Error calling service, home assistant api error
24 Jul 21:36:44 - [warn] [api-call-service:ON] Error calling service, home assistant api error
24 Jul 21:36:44 - [error] [api-call-service:ON] Error calling service, home assistant api error
24 Jul 21:36:45 - [warn] [api-call-service:ON] Error calling service, home assistant api error
24 Jul 21:36:45 - [error] [api-call-service:ON] Error calling service, home assistant api error
24 Jul 21:36:46 - [warn] [api-call-service:ON] Error calling service, home assistant api error
24 Jul 21:36:46 - [error] [api-call-service:ON] Error calling service, home assistant api error