# IOT relay switch command

**URL:** <https://forum.sienci.com/t/iot-relay-switch-command/4393>\
**Category:** 🧰 CNC Setup\
**Created:** [December 3, 2021, 10:54pm UTC](https://forum.sienci.com/t/iot-relay-switch-command/4393 "2021-12-03T22:54:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michou](https://forum.sienci.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@michou](https://forum.sienci.com/u/michou)\
**Post date:** [December 3, 2021, 10:54pm UTC](https://forum.sienci.com/t/iot-relay-switch-command/4393/1 "2021-12-03T22:54:39Z")

</div>

I have installed an IOT relay switch and connected it to the Longmill board. I then tested it with the M8 and M9 commands…everything works great.

I have 2 questions and If someone could find me a solution:

1. can the M8 and M9 commands be inserted somewhere so that they automatically repeat at every job
2. if option 1 is impossible to do , how to manually insert the M8 at the start of the job in the Gcode. When I type in the command M8 and press return it positions itself at the end of the job. How can I put it at the start of the coding.  
I design in Easel and then transfer the gcode in an nc extension to import it in the GSender

---

<div class="post-metadata">

**Author:** ![gwilki](https://forum.sienci.com/user_avatar/forum.sienci.com/gwilki/32/366_2.png) [@gwilki](https://forum.sienci.com/u/gwilki)\
**Post date:** [December 3, 2021, 11:45pm UTC](https://forum.sienci.com/t/iot-relay-switch-command/4393/2 "2021-12-03T23:45:48Z")

</div>

@michou In gSender, in settings, open the start/stop window. I believe you can do what you want there.

---

<div class="post-metadata">

**Author:** ![mikecmp](https://forum.sienci.com/letter_avatar_proxy/v4/letter/m/7ab992/32.png) [@mikecmp](https://forum.sienci.com/u/mikecmp)\
**Post date:** [December 9, 2021, 3:40am UTC](https://forum.sienci.com/t/iot-relay-switch-command/4393/3 "2021-12-09T03:40:50Z")

</div>

I would just love to be able to find a iot relay in stock anywhere!  
Mike

---

<div class="post-metadata">

**Author:** ![FBWoodcraft](https://forum.sienci.com/user_avatar/forum.sienci.com/fbwoodcraft/32/6411_2.png) [@FBWoodcraft](https://forum.sienci.com/u/FBWoodcraft)\
**Post date:** [January 1, 2022, 2:36am UTC](https://forum.sienci.com/t/iot-relay-switch-command/4393/4 "2022-01-01T02:36:02Z")

</div>

Just search Amazon for ‘120 vac to 12vdc relay’, you’ll get a long list you can use. They cost about $10.
