About

The famous Dremel rotary tool is an extremely flexible power tool with an extremely wide range of applications ranging from cutting, routing and engraving. The Dremel rotary tool can be expanded with a flexible shaft, similar to the Fortiflex Heavy Duty Flex Shaft Tool that extends from the Dremel rotary and allows the user to perform more fine grained tasks without requiring the tool to be held in hand. However, the flexible shaft for the Dremel rotary add-on accessory:

has one major flaw: it does not have a button to switch the Dremel on or off. If the Dremel is suspended somewhere above (as it is supposed to be) and the flexible shaft reaches all the way down, then exchanging Dremel heads requires the user to get up and use the switch on the Dremel body.

The following article summarises extending the Dremel rotary tool with a Sonoff device such that the rotary tool can be switched on or off via Amazon Alexa and OpenHAB2.

Requirements

  • Sonoff Basic - the Dremel rotary has no ground pin and the cable only has leads for line and neutral.
  • Dremel Rotary - although the modification, given the Sonoff, would work with any other Dremel type.
  • Mosquitto
  • OpenHAB2
    • OpenHAB2 Alexa binding,
    • HomeKit binding

Sonoff Basic

The Sonoff Basic can be reprogrammed to use the Tasmota firmware that will allow the Sonoff to interact with OpenHAB2 via MQTT. After the Sonoff Basic is reprogrammed, it can be attached to intercept the current between the Dremel rotary and the plug.

Next, the Sonoff Basic can be powered on and by pressing the button shortly 4 times, the Sonoff will go into AP mode. Whilst in AP mode, connect a computer to the Sonoff access point and configure the Sonoff. Notable points to watch are the following:

  • the server must be the mosquitto server shared between OpenHAB2 and the Sonoff Basic device
  • MQTT topic - has to be the full topic as will be read and written to by OpenHAB2

OpenHab2

One new item can be added to the folder /etc/openhab2/items named dremel.items with the following contents:

// Define a group to hold all Sonoff Basic devices.
Group Sonoff_Basic "Sonoff Basic" <power> (Sonoff)

// Defines a dremel as a switch:
// - Dremel_Switch is just an identifier that will be referenced in the OpenHAB2 sitemap.
// - "Flex" is the name that will be used with Alexa to switch the Dremel on or off.
// - sonoff/dremel-4345AE - is the full MQTT topic configured for Sonoff Basic using the Sonoff web interface.
// - ["Switchable"] - declares this item as switchable to be used by Alexa
Switch Dremel_Switch "Flex" (Sonoff,Sonoff_Basic) ["Switchable"] {
    mqtt=">[mosquitto:sonoff/dremel-4345AE/cmnd/POWER:command:*:default], 
    <[mosquitto:sonoff/dremel-4345AE/STATE:state:JSONPATH($.POWER)]"
}

Note that:

  • sonoff/dremel-4345AE will have to be the full MQTT topic configured for the Sonoff Basic and should be changed,
  • Flex is the word that will be used to ask Alexa to switch the Dremel on or off.

Next, the sitemap file has to be edited in order to reference the Dremel_Switch definition. Amend the sitemap under /etc/openhab2/sitemaps to include the Dremel_Switch item definition, possibly in a frame:

    Frame label="Equipment" {
	Default item=Dremel_Switch
    }

Amazon Alexa

With the definitions in place, the Alexa can be asked to search for devices; say:

  • Alexa, search for new devices

After a short period of time, Alexa should report it has found the item Flex - the callable name given to the Dremel switch defined in dremel.items in /etc/openhab2/items as defined in the OpenHAB2 section of this article.

Operating

With the Sonoff on the mains line of the Dremel, couple the Dremel and Sonoff to the mains and then switch the Dremel on using the slide button on the Dremel. Now, the Dremel will not turn on because the Sonoff is switched off.

Talk to Alexa and ask for the Dremel to be switched on; say:

  • "Alexa, turn flex on"

Conversely, to switch the Dremel off, say:

  • "Alexa, turn flex off"

Usefulness

When the flexi shaft is used for meticulous work, frequent changes of Dremel heads are necessary such that having some convenient control over turning the Dremel on or off is very useful. It is quite stunning, albeit a difficult task to accomplish for an accessory that just hooks on the main spindle, that the flexi shaft does not have a way of switching power on or off without having to reach for the rotary tool body.


iot/openhab2/voice_controlled_dremel.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.