Bond Home Issue with Ceiling Fan

Posted on
Wed May 25, 2022 3:15 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Bond Home Issue with Ceiling Fan

Hi all,

I just got my Bond Hub setup and working. With the Bond app, I can control the ceiling fan, turn up speed, down, etc.

With the Indigo plug-in, I've setup both a Bond Bridge device and a Ceiling fan as a Bond device. I setup the On Command to SetSpeed and the Off Command to Stop.

When I attempt to start or stop this device, I see this in the event log:

Code: Select all
type: 400 Client Error: Bad Request for url: http://10.0.0.201/v2/devices/0f74783d/actions/SetSpeed


Any ideas on why the error 400 is happening?

Posted on
Wed May 25, 2022 3:17 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Issue with Ceiling Fan

Turn on debug logging and try it again, and post the log.

Also, moving this to the correct forum.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 25, 2022 5:16 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Bond Home Issue with Ceiling Fan

Thanks Joe. Sorry about the wrong forum.

I cranked up the logging in the plugin configuration. Here's what I have when I reloaded the plugin and tried to control the device:
Attachments
Screen Shot 2022-05-25 at 6.15.03 PM.png
Screen Shot 2022-05-25 at 6.15.03 PM.png (215.12 KiB) Viewed 1960 times

Posted on
Wed May 25, 2022 5:43 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

Please copy and paste. I can't read the screenshot.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 25, 2022 6:02 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Bond Home Issue with Ceiling Fan

Sure Joe. Here is the raw text:

Code: Select all
May 25, 2022 at 6:14:38 PM
   Reloading plugin "Bond Home 2022.0.0" using API v3.0
   Stopping plugin "Bond Home 2022.0.0" (pid 48021)
   Bond Home                       Bond Bridge: Stopping bondBridge Device 569790961
   Bond Home                       Sunroom Ceiling Fan: Stopping bondDevice Device 1774690323
   Bond Home                       Stopping BondHome
   Stopped plugin "Bond Home 2022.0.0"
   Starting plugin "Bond Home 2022.0.0" (pid 85912)
   Bond Home Debug                 logLevel = 5
   Started plugin "Bond Home 2022.0.0"
   Bond Home                       Starting BondHome
   Bond Home                       Bond Bridge: Starting bondBridge Device 569790961
   Bond Home Debug                 BondHome __init__ address = 10.0.0.201, token = ff59c099f82e8647
   Bond Home Debug                 Bond Bridge: Bond version: {'target': 'zermatt', 'fw_ver': 'v2.28.0', 'fw_date': 'Tue Nov  2 19:07:06 UTC 2021', 'uptime_s': 7612, 'make': 'Olibra', 'model': 'BD-1000', 'branding_profile': 'OLIBRA_BD1000', 'bondid': 'ZZEI43594', 'upgrade_http': True, 'api': 2, '_': '51eee1ba'}
   Bond Home Debug                 Bond Bridge: Bond info: {'name': 'My Bridge', 'location': 'My Room', 'bluelight': 255, 'frequencies': [[38, 38], [300000, 321500], [336000, 399500], [410500, 450000]], '_': '519761e7'}
   Bond Home Debug                 get_device_list: {'_': '6a05a205', '0f74783d': {'_': '4ff61826'}}
   Bond Home Debug                 Bond Bridge: known_devices:
{'ZZEI43594': {'0f74783d': {'name': 'Ceiling fan', 'type': 'CF', 'location': 'Sunroom', 'template': 'D1x', 'actions': ['SetSpeed', 'TurnOff', 'ToggleUpLight', 'ToggleDownLight', 'StartUpLightDimmer', 'StartDownLightDimmer', 'ToggleDirection', 'Stop', 'TogglePower', 'TurnOn', 'IncreaseSpeed', 'DecreaseSpeed', 'SetDirection', 'ToggleLight', 'TurnLightOn', 'TurnLightOff', 'TurnUpLightOn', 'TurnUpLightOff', 'TurnDownLightOn', 'TurnDownLightOff'], '_': '4ff61826', 'commands': {'_': '6038fc7d'}, 'state': {'_': 'ed2d83fd'}, 'properties': {'_': '7726f8ad'}, 'skeds': {'_': 'f919e4cd'}}}}
   Bond Home Debug                 udp_start() socket listener started
   Bond Home                       Sunroom Ceiling Fan: Starting bondDevice Device 1774690323
   Bond Home Debug                 Sunroom Ceiling Fan: doDeviceStartup: bondDevice (0f74783d)
   Bond Home Debug                 Sunroom Ceiling Fan: Updating Device info:
{'name': 'Ceiling fan', 'type': 'CF', 'location': 'Sunroom', 'template': 'D1x', 'actions': ['SetSpeed', 'TurnOff', 'ToggleUpLight', 'ToggleDownLight', 'StartUpLightDimmer', 'StartDownLightDimmer', 'ToggleDirection', 'Stop', 'TogglePower', 'TurnOn', 'IncreaseSpeed', 'DecreaseSpeed', 'SetDirection', 'ToggleLight', 'TurnLightOn', 'TurnLightOff', 'TurnUpLightOn', 'TurnUpLightOff', 'TurnDownLightOn', 'TurnDownLightOff'], '_': '4ff61826', 'commands': {'_': '6038fc7d'}, 'state': {'_': 'ed2d83fd'}, 'properties': {'_': '7726f8ad'}, 'skeds': {'_': 'f919e4cd'}}
   Bond Home Debug                 Ceiling fan (0f74783d): Device states: {'power': 1, 'speed': 1, 'direction': 1, 'light': 1, 'up_light': 1, 'down_light': 0, '_': 'ed2d83fd'}
   Bond Home                       Ceiling fan (0f74783d): Stopping bondDevice Device 1774690323
   Bond Home                       Ceiling fan (0f74783d): Starting bondDevice Device 1774690323
   Bond Home Debug                 device_action, url = http://10.0.0.201/v2/devices/0f74783d/actions/SetSpeed, payload = {}
   Bond Home Error                 Error in plugin execution ExecuteAction:

  File "plugin.py", line 332, in actionControlDevice
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/BondHome.indigoPlugin/Contents/Server Plugin/bondhome.py", line 96, in device_action
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/models.py", line 960, in raise_for_status
type: 400 Client Error: Bad Request for url: http://10.0.0.201/v2/devices/0f74783d/actions/SetSpeed

Posted on
Wed May 25, 2022 6:10 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

Use the menu command "Write Device Information to Log" and post the output.

I'm sure the problem is that the SetSpeed command requires a parameter, but the basic config dialog doesn't provide for that. SetSpeed is set up for the "Send Device Command" Action.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 25, 2022 6:26 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Bond Home Issue with Ceiling Fan

Sure. Here is the output:

Code: Select all
May 25, 2022 at 7:25:51 PM
   Bond Home                       
{
    "ZZEI43594": {
        "0f74783d": {
            "_": "4ff61826",
            "actions": [
                "SetSpeed",
                "TurnOff",
                "ToggleUpLight",
                "ToggleDownLight",
                "StartUpLightDimmer",
                "StartDownLightDimmer",
                "ToggleDirection",
                "Stop",
                "TogglePower",
                "TurnOn",
                "IncreaseSpeed",
                "DecreaseSpeed",
                "SetDirection",
                "ToggleLight",
                "TurnLightOn",
                "TurnLightOff",
                "TurnUpLightOn",
                "TurnUpLightOff",
                "TurnDownLightOn",
                "TurnDownLightOff"
            ],
            "commands": {
                "_": "6038fc7d"
            },
            "location": "Sunroom",
            "name": "Ceiling fan",
            "properties": {
                "_": "7726f8ad"
            },
            "skeds": {
                "_": "f919e4cd"
            },
            "state": {
                "_": "ed2d83fd"
            },
            "template": "D1x",
            "type": "CF"
        }
    }
}

Posted on
Wed May 25, 2022 6:44 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

So try the TurnOn and TurnOff commands for the basic device configuration.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 25, 2022 6:55 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Bond Home Issue with Ceiling Fan

That seems to work:

Code: Select all
May 25, 2022 at 7:54:11 PM
   Bond Home Debug                 getDeviceConfigUiValues, typeId = bondDevice, devId = 1774690323, pluginProps = UiValuesDict : (dict)
     SupportsStatusRequest : true (bool)
     address : 0f74783d (string)
     bond_type : CF (string)
     bridge : ZZEI43594 (string)
     off_command : Stop (string)
     on_command : SetSpeed (string)
   Bond Home                       Ceiling fan (0f74783d): Stopping bondDevice Device 1774690323
   Bond Home                       Ceiling fan (0f74783d): Starting bondDevice Device 1774690323
   Bond Home Debug                 device_action, url = http://10.0.0.201/v2/devices/0f74783d/actions/TurnOn, payload = {}
   Bond Home Debug                 device_action, resp = <Response [200]>
   Bond Home Debug                 device_action, url = http://10.0.0.201/v2/devices/0f74783d/actions/TurnOff, payload = {}
   Bond Home Debug                 device_action, resp = <Response [200]>


Is there something additional I must do to provide the parameter to SetSpeed?

Posted on
Wed May 25, 2022 7:09 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

You'll have to set up an Action Group to use the SetSpeed command, and you can provide the speed parameter there. But I would try using the Increase and Decrease commands first, as they don't require a parameter.

You can read the API docs here: http://docs-local.appbond.com/#section/Introduction

The plugin really isn't very smart about what commands need what parameters. There's so many possible devices and command combinations that I couldn't figure out an efficient way to do it.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Feb 27, 2023 10:32 pm
vvrangler offline
Posts: 38
Joined: Sep 01, 2014

Re: Bond Home Issue with Ceiling Fan

Hi Joe,

I seem to be hitting this issue whenever I try to use the IncreaseSpeed function for any of my Fan devices, any idea what the issue might be?

Bond Home Debug device_action, url = http://192.168.1.94/v2/devices/5c04f768 ... reaseSpeed, payload = {}
Bond Home Debug device_action, resp = <Response [200]>
Bond Home Debug device_action, url = http://192.168.1.94/v2/devices/5c04f768 ... reaseSpeed, payload = {}
Bond Home Error Error in plugin execution ExecuteAction:

File "plugin.py", line 379, in actionControlDevice
File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/BondHome.indigoPlugin/Contents/Server Plugin/bondhome.py", line 84, in device_action
File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/models.py", line 960, in raise_for_status
type: 400 Client Error: Bad Request for url: http://192.168.1.94/v2/devices/5c04f768 ... reaseSpeed


Thanks!

Posted on
Tue Feb 28, 2023 3:39 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

Please repost using the CODE tags. The forums software is reformatting the lines. Also turn on debug logging before you do that,

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Feb 28, 2023 8:55 am
vvrangler offline
Posts: 38
Joined: Sep 01, 2014

Re: Bond Home Issue with Ceiling Fan

Code: Select all
   Starting plugin "Bond Home 2022.0.4" (pid 75825)
   Bond Home Debug                 logLevel = 5
   Started plugin "Bond Home 2022.0.4"
   Bond Home                       Starting BondHome
   Bond Home                       Bond Hub: Starting bondBridge Device 486527038
   Bond Home Debug                 BondHome __init__ address = 192.168.100.194, token = ab8c06a614cc3b85
   Bond Home Debug                 get_bridge_version
   Bond Home Debug                 Bond Hub: Bond version: {'target': 'zermatt', 'fw_ver': 'v3.8.4', 'fw_date': 'Thu Nov 10 15:16:25 UTC 2022', 'uptime_s': 36946, 'boot_patch': 'not first boot', 'make': 'Olibra', 'model': 'BD-1000', 'branding_profile': 'OLIBRA_BD1000', 'bondid': 'ZXFHX23X4', 'upgrade_http': True, 'api': 2, '_': 'd017ff70', '__': 'd017ff70'}
   Bond Home Debug                 get_bridge_info
   Bond Home Debug                 Bond Hub: Bond info: {'name': 'Bond', 'location': 'Home', 'bluelight': 2, 'frequencies': [[38, 38], [300000, 321500], [336000, 399500], [410500, 450000]], '_': '5xbx6x9c', '__': '5xbx6x9c'}
   Bond Home Debug                 get_device_list
   Bond Home Debug                 get_device_list: {'_': 'bx9ex7ax', '__': '00000000', '5c0x47x83xa69x58': {'_': '17x3xdxb'}, '72x56x7fx11xebxa': {'_': '21x2xbx7'}, '9x2xbx6x4x4xdx91': {'_': '4x14x7bx'}, 'e3x6ex3fx86xebx9': {'_': '4x2ex0ax'}}
   Bond Home Debug                 get_device: 5c0x47x83xa69x58
   Bond Home Debug                 get_device: 72x56x7fx11xebxa
   Bond Home Debug                 Service ZXFHX23X4._bond._tcp.local. of type _bond._tcp.local. state changed: ServiceStateChange.Added
   Bond Home Debug                 Found BondBridges: {'ZXFHX23X4._bond._tcp.local.': 'ZXFHX23X4.local.'}
   Bond Home Debug                 get_device: 9x2xbx6x4x4xdx91
   Bond Home Debug                 get_device: e3x6ex3fx86xebx9
   Bond Home Debug                 Bond Hub: known_devices:
{'ZXFHX23X4': {'5c0x47x83xa69x58': {'name': 'Office Fan', 'type': 'CF', 'location': 'Home', 'template': 'C2', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '17x3xdxb', '__': '188695e6', 'commands': {'_': 'b68b0984'}, 'state': {'_': '87752b7d'}, 'properties': {'_': 'c23bc46d'}, 'skeds': {'_': '00000000'}}, '72x56x7fx11xebxa': {'name': 'Family Room Fan', 'type': 'CF', 'location': 'Home', 'template': 'A1', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetDirection', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleDirection', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '21x2xbx7', '__': '539e81fd', 'commands': {'_': '55cb208e'}, 'state': {'_': '7969c7fd'}, 'properties': {'_': 'b69cddd5'}, 'skeds': {'_': '00000000'}}, '9x2xbx6x4x4xdx91': {'name': 'Guest Room Fan', 'type': 'CF', 'location': 'Home', 'template': 'C2', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '4x14x7bx', '__': '493a3ba0', 'commands': {'_': '95258868'}, 'state': {'_': '87752b7d'}, 'properties': {'_': '7fcc4eea'}, 'skeds': {'_': '00000000'}}, 'e3x6ex3fx86xebx9': {'name': 'Workout Room Fan', 'type': 'CF', 'location': 'Home', 'template': 'C2', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '4x2ex0ax', '__': '47bcf3ed', 'commands': {'_': 'd931abe0'}, 'state': {'_': '86b7414a'}, 'properties': {'_': 'c4ce42ae'}, 'skeds': {'_': '00000000'}}}}
   Bond Home Debug                 udp_start() socket listener started
   Bond Home                       FamilyRommFanSpeed: Starting bondDevice Device 964348453
   Bond Home                       OfficeFan: Starting bondDevice Device 1988890919
   Bond Home                       OfficeFanLight: Starting bondDevice Device 266586765
   Bond Home                       OfficeFanSpeed: Starting bondDevice Device 612019617
   Bond Home Debug                 FamilyRommFanSpeed: doDeviceStartup: bondDevice (72x56x7fx11xebxa)
   Bond Home Debug                 FamilyRommFanSpeed: doDeviceStartup: using bond_id = ZXFHX23X4
   Bond Home Debug                 FamilyRommFanSpeed: Updating Device info:
{'name': 'Family Room Fan', 'type': 'CF', 'location': 'Home', 'template': 'A1', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetDirection', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleDirection', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '21x2xbx7', '__': '539e81fd', 'commands': {'_': '55cb208e'}, 'state': {'_': '7969c7fd'}, 'properties': {'_': 'b69cddd5'}, 'skeds': {'_': '00000000'}}
   Bond Home Debug                 get_device_state: 72x56x7fx11xebxa
   Bond Home Debug                 Family Room Fan (72x56x7fx11xebxa): Device states: {'power': 1, 'speed': 1, 'direction': -1, 'light': 0, '_': '7969c7fd', '__': '7969c7fd'}
   Bond Home Debug                 OfficeFanSpeed: doDeviceStartup: bondDevice (5c0x47x83xa69x58)
   Bond Home Debug                 OfficeFanSpeed: doDeviceStartup: using bond_id = ZXFHX23X4
   Bond Home Debug                 OfficeFanSpeed: Updating Device info:
{'name': 'Office Fan', 'type': 'CF', 'location': 'Home', 'template': 'C2', 'actions': ['DecreaseSpeed', 'IncreaseSpeed', 'SetSpeed', 'StartDimmer', 'Stop', 'ToggleLight', 'TogglePower', 'TurnLightOff', 'TurnLightOn', 'TurnOff', 'TurnOn'], '_': '17x3xdxb', '__': '188695e6', 'commands': {'_': 'b68b0984'}, 'state': {'_': '87752b7d'}, 'properties': {'_': 'c23bc46d'}, 'skeds': {'_': '00000000'}}
   Bond Home Debug                 get_device_state: 5c0x47x83xa69x58
   Bond Home Debug                 Office Fan (5c0x47x83xa69x58): Device states: {'power': 0, 'speed': 1, 'light': 1, '_': '87752b7d', '__': '87752b7d'}
   Bond Home                       Family Room Fan (72x56x7fx11xebxa): Stopping bondDevice Device 964348453
   Bond Home                       Family Room Fan (72x56x7fx11xebxa): Starting bondDevice Device 964348453
   Bond Home                       Office Fan (5c0x47x83xa69x58): Stopping bondDevice Device 612019617
   Bond Home                       Office Fan (5c0x47x83xa69x58): Starting bondDevice Device 612019617
   Bond Home Debug                 device_action, url = http://192.168.100.194/v2/devices/5c0x47x83xa69x58/actions/DecreaseSpeed, payload = {}
   Bond Home Debug                 device_action, resp = <Response [200]>
   Bond Home Debug                 device_action, url = http://192.168.100.194/v2/devices/5c0x47x83xa69x58/actions/IncreaseSpeed, payload = {}
   Bond Home Error                 Error in plugin execution ExecuteAction:

  File "plugin.py", line 379, in actionControlDevice
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/BondHome.indigoPlugin/Contents/Server Plugin/bondhome.py", line 84, in device_action
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/models.py", line 960, in raise_for_status
type: 400 Client Error: Bad Request for url: http://192.168.100.194/v2/devices/5c0x47x83xa69x58/actions/IncreaseSpeed

Posted on
Tue Feb 28, 2023 12:32 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bond Home Issue with Ceiling Fan

So decreasing speed works, but increasing does not. Hmmm.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Feb 28, 2023 5:02 pm
vvrangler offline
Posts: 38
Joined: Sep 01, 2014

Re: Bond Home Issue with Ceiling Fan

Yes, and I looked at the API docs and it definitely appears to be the correct command.

I also tried it on t different fan models just in case and got the same result for both.

Who is online

Users browsing this forum: No registered users and 1 guest