I have some fans connected to the Raspberry Pi via a hat and I'd like the speed of those fans to mirror the cooling fans on the printer, i.e. M106 and M107 commands.
My first implementation was to modify the plugin Fan Speed Control which was successful, but suffers from the problem that I have to modify that plugin every time there is an update to it.
I've had a request for my code so I decided to break my modifications out into my own plugin, Fan Speed Mirror. Between the plugin tutorial and my modifications to Fan Speed Control, I have created my own plugin and while there were some bugs, it started working fairly well.
As some point in the process, I started getting the error, "AttributeError: 'FanSpeedMirror' object has no attribute 'M106command'" and I can't figure out what I've done wrong since it was working at one time.
I've attached a zip file of the current state of the plugin and hopefully someone can see what I've done wrong.
I'm a bit reluctant to create the github repository until I have something that works, but I can do that if it would make getting help easier.
OctoPrint-FanSpeedMirror-1.0.0.zip (13.7 KB)
octoprint.log (24.1 KB)