No version for distro humble showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro jazzy showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro kilted showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro rolling showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro ardent showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro bouncy showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro crystal showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro eloquent showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro dashing showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro galactic showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro foxy showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

No version for distro iron showing lunar. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.31
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2025-05-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

use switchbot with ros

Additional Links

No additional links.

Maintainers

  • Kei Okada
  • Yoshiki Obinata

Authors

  • Yoshiki Obinata

switchbot_ros

This is the package for using switchbot by ROS.

System Component

Screenshot from 2021-07-17 12-43-06 JSK members can edit the original file here.

How to use?

Setup switchbot

  1. Install the switchbot app to your phone(iPhone, Android) and create your switchbot account.
  2. Prepare the switchbot devices and setup by your phone.

Especially, please set your device name and enable cloud service.

  1. Get your token
    On switchbot App, profile -> settings, and press version for 10 times and you can get token.

For JSK members, please see this slide for account and token details and installed switchbots for our lab.

How to launch switchbot ros

Execute roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN and publish ActionGoal.

ROS API

The switchbot_ros node provides APIs below.

~/devices topic ( Type: switchbot_ros/DeviceArray )

This topic provides devices list available with switchbot_ros server.

~/switch action ( Type: switchbot_ros/SwitchBotcommandAction )

This action provide command interface to switchbot devices.

From command line

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/eng2/7f/73b2/test/button'
  command: 'press'
  parameter: ''
  command_type: ''"

rostopic pub /switchbot_ros/switch/goal switchbot_ros/SwitchBotCommandActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  device_name: '/myroom/light'
  command: 'turnOn'
  parameter: ''
  command_type: ''"

Please see here for command details.

Client libraries

There are rospy/roseus client libraries for switchbot_ros server.

roseus

(setq msg (get-devices)) ;; get device list
(dolist (device (send msg :devices)) (format t "name: ~A, type: ~A~%" (send device :name) (send device :type))) ;; print device list
(control-device "/eng2/7f/73b2/light/upper/switch" "turnOn") ;; control some device
(control-device "/eng2/7f/73b2/light/lower/switch" "turnOn")

rospy

```python import rospy from switchbot_ros.switchbot_ros_client import SwitchBotROSClient

rospy.init_node(‘hoge’) client = SwitchBotROSClient()

devices = client.get_devices() print(devices)

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package switchbot_ros

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

  • add codes for publishing switchbot CO2 meter status. (#513)
  • switchbot_ros: use --cert for catkin_virtualenv for indigo (#507)
  • Add switchbot status publisher. (#505)
  • Mod for switchbot api 1.1 (#491)
  • [switchbot_ros] force to use python3 for lambda string sort (#495)
  • Contributors: Yoshiki Obinata, Yosuke Yamamoto

2.1.28 (2023-07-24)

2.1.27 (2023-06-24)

  • fix package.xml/CMakeLists.txt to supress catkin_lint errors (#479)
  • Contributors: Kei Okada

2.1.26 (2023-06-14)

  • add LICENSE files (#476)
  • Contributors: Kei Okada

2.1.25 (2023-06-08)

  • [switchbot_ros] add actionlib_msgs and std_msgs as build_depend (#357)
  • [switchbot_ros] add obinata as maintainer for switchbot_ros (#358)
  • Pr/add switchbot device list publisher (#344)
  • [switchbot_ros] update switchbot_ros client (#345)
  • [chaplus_ros][switchbot_ros]fix exec_depend in ros noetic (#332)
  • [switchbot_ros] update ReadMe.md (#324)
  • [switchbot_ros] Sort device_list (#331)
  • [switchbot_ros] remove catching base exception and output more specific key error when the switchbot id not exists on the server (#321)
  • add install section to switchbot_ros/CMakeLists.txt (#294)
  • [switchbot_ros] use python setup to avoid relative import in switchbot_ros (#278)
  • [switchbot_ros] catch the exception when init the node (#279)
  • Contributors: Kei Okada, Koki Shinjo, Naoya Yamaguchi, Shingo Kitagawa, Yoshiki Obinata, Iory Yanokura

2.1.24 (2021-07-26)

2.1.23 (2021-07-21)

  • add rosnode for switchbot (#260)
  • Contributors: Yoshiki Obinata

2.1.22 (2021-06-10)

2.1.21 (2020-08-19)

2.1.20 (2020-08-07)

2.1.19 (2020-07-21)

2.1.18 (2020-07-20)

2.1.17 (2020-04-16 21:51)

2.1.16 (2020-04-16 15:21)

2.1.15 (2019-12-12)

2.1.14 (2019-11-21)

2.1.13 (2019-07-10)

2.1.12 (2019-05-25)

2.1.11 (2018-08-29)

2.1.10 (2018-04-25)

2.1.9 (2018-04-24)

2.1.8 (2018-04-17)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/switchbot.launch
      • token
      • secret [default: '']
      • respawn [default: true]
      • pub_status [default: false]
      • pub_status_rate [default: 0.1]
      • pub_device_name [default: bot74a]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged switchbot_ros at Robotics Stack Exchange