hardillb / node-red-contrib-googlehome

Apache License 2.0
25 stars 5 forks source link

Thermostat action.devices.commands.SetTemperature not changing the actual temperature #11

Closed bbrowaros closed 3 years ago

bbrowaros commented 3 years ago

Hi,

I'm trying to set up a thermostat device which I'm pushing a current temperature. As per documentation I understand that the payload for the command action.devices.commands.SetTemperature should look like this:

{"command":"action.devices.commands.SetTemperature","params":{"temperature":21.8}}

However there is no reaction/change on the device. Can you please confirm that this payload is correct.

hardillb commented 3 years ago

You are going to have to supply a LOT more information, it's not clear what you are doing here.

Are you trying to react to a command from the Google Assistant or update the status of a device from a sensor reading?

bbrowaros commented 3 years ago

Hi,

Thanks for looking into this. Actually I'm trying to notify the thermostat what is read current ambient temperature from the thermostat device. When you ask the google home: "What is current temperature set in room X? " It will answer: "Heating is set to :XX and current temperature is: XX" Now if I read correctly the Thermostat device has a hook for this command action.devices.commands.SetTemperature, ist that correct ? In short I'm trying to use google home response module to supply current setpoint state and current ambient temperature.

hardillb commented 3 years ago

OK

The ambient temperature is not set as the result of a command, it is updated with status updates

The payload is wrong. It should look like this:

  {
    params: {
        thermostatTemperatureAmbient: 23.5
    }
  }

You should feed this into a response node configured to point to the thermostat device separately from any responses to commands and you should only feed it in when the value changes. You can use a RBE node to help with only sending the changes

bbrowaros commented 3 years ago

Thanks, works like a charm.

Ok so the states of the device listed on google actions you need to supply them directly in params.

Got it, thank you again.