smart-home-nodejs: fail to change device mode or toggle

Hi, I am trying to add fan with ‘mode’ trait, but I can not change its ‘mode’ or ‘toggle’ from the simulator. For example, when I input “set my living room fan fan speed to level three”, the simulator always respond “Sorry, this action is not available in simulation”. when I input “set my living room fan oscillation on”, the simulator still respond “Sorry, this action is not available in simulation”.

But I can successfully power on/off my fan.

Here is my sync response for a fan device

 {  
            "type":"action.devices.types.DRYER",  // There is no devices type fan, so I use DRYER type instead...
            "traits":[  
               "action.devices.traits.OnOff",
               "action.devices.traits.Modes",
               "action.devices.traits.Toggles"
            ],
            "name":{  
               "defaultNames":[  
                  "Dyson Fan"
               ],
               "name":"fan",
               "nicknames":[  
                  "living room fan"
               ]
            },
            "willReportState":true,
            "roomHint":"living room",
            "deviceInfo":{  
               "manufacturer":"Smart Home Provider",
               "model":"g1338",
               "swVersion":"1.0.31",
               "hwVersion":"1.1"
            },
            "attributes":{  
               "availableModes":[  
                  {  
                     "name":"fan_speed",
                     "name_values":[  
                        {  
                           "name_synonym":[  
                              "speed",
                              "fan speed",
                              "level",
                              "fan speed level"
                           ],
                           "lang":"en"
                        }
                     ],
                     "settings":[  
                        {  
                           "setting_name":"one",
                           "setting_values":[  
                              {  
                                 "setting_synonym":[  
                                    "one",
                                    "1",
                                    "level one"
                                 ],
                                 "lang":"en"
                              }
                           ]
                        },
                        {  
                           "setting_name":"two",
                           "setting_values":[  
                              {  
                                 "setting_synonym":[  
                                    "two",
                                    "2",
                                    "level two"
                                 ],
                                 "lang":"en"
                              }
                           ]
                        },
                        {  
                           "setting_name":"three",
                           "setting_values":[  
                              {  
                                 "setting_synonym":[  
                                    "three",
                                    "3",
                                    "level three"
                                 ],
                                 "lang":"en"
                              }
                           ]
                        },
                        {  
                           "setting_name":"four",
                           "setting_values":[  
                              {  
                                 "setting_synonym":[  
                                    "four",
                                    "4",
                                    "level four"
                                 ],
                                 "lang":"en"
                              }
                           ]
                        }
                     ],
                     "ordered":true
                  }
               ],
               "availableToggles":[  
                  {  
                     "name":"oscillate",
                     "name_values":[  
                        {  
                           "name_synonym":[  
                              "oscillate",
                              "oscillation"
                           ],
                           "lang":"en"
                        }
                     ]
                  }
               ]
            },
            "customData":{  
               "smartHomeProviderId":"SGs84HiURHSb6ggrGjiv9jJ3t7U4ze"
            },
            "id":"4"
         }

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

What a bummer. So how can we know what names are supported (besides the example)? p.s.: is this also applies to the mode’s settings/setting_name?