# Control Light Patterns of IOTBot with ROS2 CMDs- Fragen zur Lichtsteuerung aus Marzahn

**URL:** https://forum.eduart-robotik.com/t/control-light-patterns-of-iotbot-with-ros2-cmds-fragen-zur-lichtsteuerung-aus-marzahn/51
**Category:** mission2mars
**Tags:** software
**Created:** [December 9, 2021, 4:11pm UTC](https://forum.eduart-robotik.com/t/control-light-patterns-of-iotbot-with-ros2-cmds-fragen-zur-lichtsteuerung-aus-marzahn/51 "2021-12-09T16:11:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![WVSGBerlin](https://avatars.discourse-cdn.com/v4/letter/w/ed655f/32.png) [@WVSGBerlin](https://forum.eduart-robotik.com/u/WVSGBerlin)
#### Post date: [December 9, 2021, 4:11pm UTC](https://forum.eduart-robotik.com/t/control-light-patterns-of-iotbot-with-ros2-cmds-fragen-zur-lichtsteuerung-aus-marzahn/51/1 "2021-12-09T16:11:24Z")

</div>

Hallo Siemensteam,  
wir versuchen das Licht anzusteuern und haben bisher den Befehl  
ros2 service call iotbot / service/send\_lighting iotbot\_interface \srv\SENDLIGHTING (jason) übergeben. Wir bekommen eine succes-Meldung aber nicht passiert. Wie muss der konkrete jason-Parameter aussehen? (uint8 hilft uns leider nicht weiter)  
Vielen Dank  
Viele Grüße aus Berlin

---

<div class="post-metadata">

### Author: ![florian.gramss](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.eduart-robotik.com/florian.gramss/32/15_2.png) [@florian.gramss](https://forum.eduart-robotik.com/u/florian.gramss)
#### Post date: [December 10, 2021, 9:47am UTC](https://forum.eduart-robotik.com/t/control-light-patterns-of-iotbot-with-ros2-cmds-fragen-zur-lichtsteuerung-aus-marzahn/51/2 "2021-12-10T09:47:28Z")

</div>

Hello together,

to control the light via a ROS2 service call, you first of all have to source the workspace to be able to use the message type.  
But as you get a success back, it seems like you already got that point.

I’m pretty sure that the input of your JSON object is not correct.

The input on the command line must look as following:

`$ros2 service call /iotbot/srv/send_lighting iotbot_interface/srv/SendLighting "{red: 0, green: 0, blue: 150, command: 66}"`

The right / and \ is very important on Linux. Also spaces in between words/paths can corrupt your cmd.  
The parameters should be self explanatory. Only the last variable `command` needs some explaining.

@apastore can you please provide a short table of possible commands that are reflected with different light patterns? Please be aware, that only some of them make use of the rgb-code.

Thank you.  
Greetings from Mars @WVSGBerlin
