Node-red-contrib-home-assistant-websocket


#21

Is there a way to remove the node-red-contrib-home-assistant node?


#22

If you are asking how to remove it after replacing it refer to mine comment above. Otherwise not exactly sure what you’re asking.


#23

Even with all flows deleted and the node disabled the remove option is not there.


#24

@Picnic I had that problem, I think I just restarted node-red (docker) and it would allow me to delete it.


#25

I’m also running node red in a container using the latest node-red-docker:rpi-v8 image and have got the same websocket problem. However I’m struggling to update Node to 8.12.0 as you did.

Can you please explain how to do that?

Thanks


#26

I’ve had success with version 0.0.7 of this plugin. For Hassio, don’t use http://hassio/homeassistant for the Base URL. Use either localhost, 127.0.0.1, or better, your server’s IP, and port 8123.


#27

Under Hamburger menu->‘Configuration nodes’, make sure you don’t have unused nodes (with doted lines) that say: ‘Home Assistant’ – those actually use the plugin. Delete them, deploy, and your palette should have the ‘remove’ button for the plugin enabled.


#28

I’m not at my computer right now, but as I remember I ssh onto my RPi, and opened a bash terminal inside the docker container. Then I installed ‘n’ via npm and think the final command was ‘n install 8.12.0’

I hope this can her you closer


#29

I’ve already replied to you on github about this but replying here also for the people who don’t see it there.

I’ve added support and better instructions for hass.io in version 0.1.0. You can now use the hass.io proxy address http://hassio/homeassistant and the node will automatically fill in the access token with the HASSIO_TOKEN from the proxy when you deploy.


#30

Just tried the init command and it didn’t work for me. For now i’m using the notoriousbdg version of node red and it’s working well.


#31

Yes, my instructions for using node-red-contrib-home-assistant-websocket with hass.io are based on the community version of the addon-node-red. I wasn’t actually aware that there were two different add-ons for node-red for hass.io. According to the Github repo for NotoriousBDG version, it has been deprecated.


#32

I have Installed ‘n’ using npm install n. When I type n install 8.12.0 I get bash: n: command not found

Any idea on how to solve it?


#33

I had the same issue , and tried all of purposes , but finally removing the “DNSMASQ” addon solved problems.


#34

Is it possible for you to let us know what changed about the formatting of “current state” and “poll state”?

I have your fork up and running and it seems to be working great, but I have a lot of flows and not exactly sure what I should be checking for.


#35

+1:

@Kermit : Please add a format section in your documentation and advise when there is a format change. I as well have a lot of flows using these nodes.

Great work … keep it going :+1:


#36

Current-State Node Output

Unchecking ‘Override Topic’ and ‘Override Payload’ doesn’t work in node-red-contrib-home-assistant v0.3.2. It always overwrites msg.topic and msg.payload. If you have current-state nodes where you have unchecked the ‘Override Payload’ with node-red-contrib-home-assistant-websocket it will stop overriding payload and put the state object into msg.data

Poll-State Node Output

msg.payload.data moved to msg.data

msg.payload becomes just the state of the state object msg.payload.data.state => msg.payload

msg.payload.dateChanged removed

msg.timeSinceChanged and msg.timeSinceChangedMs moved into msg.data

node-red-contrib-home-assistant v0.3.2

{
  "topic": "sun.sun",
  "payload": {
    "timeSinceChanged": "4 hours ago",
    "timeSinceChangedMs": 15342567,
    "dateChanged": "2018-10-11T14:21:01.004Z",
    "data": {
      "entity_id": "sun.sun",
      "state": "above_horizon",
      "attributes": { ... },
      "last_changed": "2018-10-11T14:21:01.004183+00:00",
      "last_updated": "2018-10-11T18:36:30.002985+00:00",
      "context": { ... }
    }
  },
  "_msgid": "345fd403.6e71ec"
}

node-red-contrib-home-assistant-websocket v0.1.1

{
  "topic": "sun.sun",
  "payload": "above_horizon",
  "data": {
    "entity_id": "sun.sun",
    "state": "above_horizon",
    "timeSinceChanged": "5 hours ago",
    "timeSinceChangedMs": 16236433
    "attributes": { ... },
    "last_changed": "2018-10-11T14:21:01.004183+00:00",
    "last_updated": "2018-10-11T18:51:30.002737+00:00",
    "context": { ... },
  },
  "_msgid": "5071255c.ad802c"
}

#37

Did you fix this? can’t get it to work either.


#38

I switched to this version as I had some general errors and wanted to try something else. Not sure this is related but in the old version I choosed my node and the domain and service showed up automaticly in the drop down list. Now I will have to type them in manually. Is there anything I have done wrong? Do you have them populated automaticly?


#39

you need to use

npm install -g n

and than

n 8.12.0


#40

@Kermit Just installed Node Red Docker v0.19.4 on a RPi3 installed Node-red-contrib-home-assistant-websocket v0.1.1
and cant connect to HA.

I am using a long lived token and http://192.168.x.x:8123. without the use Use Legacy API Password unticked.

The error in Node red is

"RangeError: Invalid WebSocket frame: RSV2 and RSV3 must be clear"

And

"Error calling service, home assistant api error"

The error in HA log is:

INFO (MainThread) [homeassistant.components.websocket_api.http.connection.140653592047744] Connection closed by client

Any help please.