First off, I’d like to say that I am so sorry for the confusion and chaos my fork caused for people, I have released a new version which the api-current-state has been tested to be backwards compatible with AYapejian’s version, but still includes the status indicators from my fork.
This fork was for my own personal use before it was discovered by a Redditor about a week ago, since then i have been trying to find the time to get it up to standards.
@Spartan.II.117
Your fork is great and new contributions are always welcome. Please don’t be discouraged by the first positive and then negative publicity. There are many of us really hoping for a stable, yet actively developed alternative to AYapejian’s version (which, though great, is a bit neglected now).
Backward compatibility would be highly appreciated where possible, as updating numerous flows from ages ago, is a pretty painful task and negatively impacts WAF due to sudden automation failures throughout the house
@frenck Thanks a ton for providing the option to still use other forks within the add-on!
@Spartan.II.117 and @frenck thanks for being two stand up individuals who at the end of the day just want to make things the best for all the users and not let any crazy egos get in the way. Its situations like this that definitely make me enjoy and proud to be a part of the HomeAssistant community here! Well done gentlemen!
I would also like to chime in and offer an apology of sorts I just wanted to share the fork on Reddit, I didn’t anticipate the amount of traction the post got!
Thanks to the @Spartan.II.117 and @frenck, sorry for everyone’s lost time, and I hope no-one’s WAF was permanently affected.
I am still using the fork as I think it’s great. I’ve just modified msg.payload to msg.payload.state where necessary. Just waiting out the whole current-state node thing until it’s completely finalised.
To manually use the spartan fork, add this to your node-red addon, but remember that it might change whenever the spartan fork is updated. You’ll need to update all your current_state nodes by editing it, removing the last letter and choose the correct entity again.
Also, the spartan fork changes how the msg.payload is presented, the payload after a current_state node is “msg.payload.state”, but there are also more information to get from it, like “last_changed” and “last_updated”
Here’s an example of the payloads from a current_state node
Please note, the example might be wrong, since the remote fork updates as well. The example shows v0.3.3 as the pinned version, nevertheless, the fork might be on a newer version already. I know for a fact, that @Spartan.II.117 works/worked on a fix for this, to gain more backwards compatibility. So I would suggest you take a look at the fork and use the latest version which works for you.
Oh by the way, the log of the add-on itself says: [error] [server:Home Assistant] Error: Request failed with status code 403 over and over again. 172.30.32.2: banned_at: '2018-07-21T12:10:18' keeps getting added to my ip_bans.yaml as well.
Interesting case @tielemans.jorim. I’ve installed the add-on with all the latest and greatest version of everything, but am unable to reproduce it.
Could you provide some more information? Like:
are using the new Auth system (which is tech preview)?
What URL do you have configured in your Node-RED?
Did you manually specify a password for Home Assistant in Node-RED?
Currently I don’t even have any flows setup in Node-RED,
just a clean installed add-on a few days ago on a fresh HassOS install.
1 user, default port, ssl and require_ssl true.
I just wanted to report I have errors, just made a quick flow (tried to toggle/turn on a switch) and can confirm it didn’t work.
Sytem log shows that the toggle service is called:
18-07-21 14:45:35 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-07-21 14:45:36 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/stream access from a0d7b954_nodered
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] Home-Assistant EventStream start
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] Home-Assistant EventStream close
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from a0d7b954_nodered
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-07-21 14:45:37 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services/switch/toggle access from a0d7b954_nodered
18-07-21 14:45:38 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-07-21 14:45:39 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/stream access from a0d7b954_nodered
18-07-21 14:45:39 INFO (MainThread) [hassio.api.proxy] Home-Assistant EventStream start
18-07-21 14:45:39 INFO (MainThread) [hassio.api.proxy] Home-Assistant EventStream close
18-07-21 14:45:39 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from a0d7b954_nodered
18-07-21 14:45:39 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
18-07-21 14:45:40 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_nodered
21 Jul 16:54:02 - [error] [server:Home Assistant] Error: Request failed with status code 403
21 Jul 16:54:03 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:03 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:04 - [error] [server:Home Assistant] Error: Request failed with status code 403
21 Jul 16:54:05 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:05 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:05 - [warn] [api-call-service:ad6228ba.003498] Error calling service, home assistant api error
21 Jul 16:54:05 - [error] [api-call-service:ad6228ba.003498] Error calling service, home assistant api error
21 Jul 16:54:06 - [error] [server:Home Assistant] Error: Request failed with status code 403
21 Jul 16:54:07 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:07 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:08 - [error] [server:Home Assistant] Error: Request failed with status code 403
21 Jul 16:54:09 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
21 Jul 16:54:09 - [error] [server:Home Assistant] Home assistant connection failed with error: Connection to home assistant could not be established with config: http://hassio/homeassistant <password redacted>
That’s just a part of it but wanted to show logs corresponding with the service call.
Edit: Hm, the ip ended up in the ban list again: 172.30.32.2; I’ll try to remove it and try again.
Edit2: Yeah, just keeps getting added to the list, was considering to add it as trusted_networks but that won’t fix the problem that it can’t login correctly: Login attempt or request with invalid authentication from 172.30.32.2.
HI I also getting the same error.
I have duckdns but Ima using inside the nodered as https://192.168.1.190:8123 is working (loaded) but in the log I can see lot off errors. What that is mean ?
Home assistant connection failed with error: Connection to home assistant could not be established with config: https://192.168.1.190:8123
That is not the recommended setup. You are either using an different add-on, or modified the settings yourself.
That will causes issues and is not supported by this add-on.