andrei-tatar / node-red-contrib-nora

Node Red Google Home integration
74 stars 25 forks source link

Blind input doesn't update the status displayed beneath the node #17

Closed douvers closed 5 years ago

douvers commented 5 years ago

I understand that the Blind node is experimental but I am sending it an input (from the Bigtimer node) however the status displayed beneath the Blind node doesn't update. When I do this with the Light node the status updates and Google Home is aware of the state change. I have tried sending inputs such as openPercent - 0 and openPercent - 100 (as shown in the node info) and also openPercent: 0 & 100 but the status doesn't change. I have selected the option to pass the input msg through to output and this works correctly however Google Home is not aware of the state change. Can you advise if what I am trying to do is possible?

andrei-tatar commented 5 years ago

The message you send to the node is probably not correct. The payload must be an object with an openPercent property that is a number.

msg: {
  payload: {
    openPercent: 100
  }
}
douvers commented 5 years ago

Thank you.

I've been testing with an Inject node using the string

openPercent: 100 and openPercent: 0

into the Blind input however the status does not change and there is no output passed through (with "If msg arrives on input, pass through to output" ticked).

andrei-tatar commented 5 years ago

You need to use inject node with a json object. I don't parse strings...

[{"id":"6e4679d1.b075c8","type":"inject","z":"84a16807.9b9378","name":"","topic":"","payload":"{\"openPercent\": 100}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"1"}]
douvers commented 5 years ago

Thank you. It works perfectly. Could I suggest that if you have time that you add this to the Blind node Info please?

andrei-tatar commented 5 years ago

I think it's there already.

Input payload can have one or more be of the following properties: openPercent - number (0-100). represents how open the blinds are;

douvers commented 5 years ago

Issue resolved with the correct msg payload sent to node input.