question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fail to change device mode or toggle

See original GitHub issue

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"
         }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
asturelcommented, Nov 30, 2017

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?

0reactions
Flekercommented, Dec 12, 2017

We will not be publishing a full list at this time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when switching mode from Panorama to Management ...
Symptom When trying to switch from panorama mode to management-only mode, this error "cannot switch to management-only mode; all devices ...
Read more >
Unable to switch activation mode in V3 - The Things Network
In V2 console we could switch Activation Mode for devices, but after setting up a couple of devices is V3 (as OTAA) console...
Read more >
Failed to switch to Bridge mode, then fails to connect at all
I tried to change my single Google Wifi router puck to Bridge mode, it appeared to fail (“cannot change device mode due to...
Read more >
Troubleshoot automatic home and device switching - Android
Check that your phone isn't in airplane mode. If your phone is running very low on power, cellular data and Wi-Fi may have...
Read more >
Toggle Device mode in order to simulate ... - Ivanti Community
1. Open Google Chrome · 2. F12 (open the Developer Tools) · 3. Toggle Device Mode (second Icon)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found