Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue, sorry. A question though. #18

Closed
w00114 opened this issue Feb 26, 2022 · 5 comments
Closed

Not an issue, sorry. A question though. #18

w00114 opened this issue Feb 26, 2022 · 5 comments
Labels
question Further information is requested

Comments

@w00114
Copy link

w00114 commented Feb 26, 2022

Can I use HTFanControl for strobe effects AS WELL as wind, using the same windtrack? Like is there a way to add commands (like OFF, HIGH etc for wind) for my strobe? It has a remote control and i just want it so i can do single flashes.

@nicko88
Copy link
Owner

nicko88 commented Feb 28, 2022

Technically yes, but it will not be simple.

First off, you wont want to utilize the existing commands as they are normally sent much earlier to the fan, to account for the large delay that it takes to move air around. (via the 3 offset variables)

There is an undocumented feature to control other IR devices simultaneously, and you can use and add any commands to the wind tack file that you want (like LIGHTON, LIGHTOFF, etc). The problem with this though is you won't be able to find a fan that can be controlled via IR (not impossible but highly unlikely). There was one fan that we knew about when this project started, but it was discontinued shortly after.

The program supports a newer form of device control, and that is MQTT, but you can only use 1 or the other (IR control, or MQTT control). So if you are controlling your lights with IR, then you need to control your fans with IR as well and you see the problem.

I explained this undocumented feature a long time ago here:

https://www.avsforum.com/threads/4d-theater-wind-effect-diy-home-theater-project.3152346/page-23#post-60138399

Seeing as you are a C# developer, I think your best bet would be to fork my code and adapt it for your use case. It really shouldn't be too hard to make it work for your purposes.

You could modify it to allow controlling a fan with MQTT as it does now, while also allowing controlling IR lights at the same time, based on the commands it sees in the wind track file.

Or you can build an MQTT IR blaster, and control the fan and lights both with MQTT. But in this case you will have to modify the program to somehow specify what MQTT commands to send for your lighting. Because as it stands you can only define MQTT topic and payload for the pre-defined fan speeds (ECO, LOW, MED, HIGH, OFF).

The modifications would be simple. You could for example just hard-code LIGHTON and LIGHTOFF MQTT payload and topic in the code, and then build a cheap MQTT IR transceiver, and set it up to control your lights, and then just add your new LIGHTON and LIGHTOFF commands to the wind tracks that you want, where you want.

Info on building an MQTT IR transceiver:

https://tasmota.github.io/docs/IR-Remote/#ir-transmitter

@nicko88 nicko88 added the question Further information is requested label Feb 28, 2022
@nicko88
Copy link
Owner

nicko88 commented Jun 7, 2022

A perhaps better way to handle this would be to run 2 copies of HTFanControl at the same time.

One copy can be configured for wind and the second copy could be configured for controlling some other device.

This way each copy can have their own needed offsets or no offset in the case of strobe effects since light is instant.

This would also allow separate configurations of device control mechanisms too like controlling the fan via MQTT and controlling the strobe light via IR, or via different MQTT commands.

Currently HTFanControl doesn't support running 2 copies at once on the same PC, but it would only be a simple minor modification to allow this.

I will make it possible to run 2 copies at once soon to support advanced use cases such as this.

@nicko88
Copy link
Owner

nicko88 commented Aug 18, 2022

HTFanControl now supports running multiple copies at once as per the suggestion from my previous comment.

To achieve this simply run the program passing in a command line parameter for another port number (other than the default 5500).

You can also pass in a second command line parameter to specify an instance name so they are more easy to differentiate form each other.

Ex: HTFanControl.exe "5501" "LightControl"

@nicko88 nicko88 closed this as completed Aug 18, 2022
@ndbroadbent
Copy link

Hi @nicko88, thanks for this great project! I'm having a lot of fun getting this to work. I've been having some trouble compiling the code on Linux/Mac though (see #19), so I was wondering if there could be a way to configure extra MQTT commands from the HTFanControlSettings.json settings file?

I saw your post about the lircmapping.txt file where you can specify custom commands. Is there a way to do this for MQTT?

@ndbroadbent
Copy link

In the meantime, I could probably get something to work by running multiple copies of the application. Maybe I could run a second instance and map the five commands to different functions. Something like this:

  • ECO - Single strobe light flash
  • LOW - Turn on strobe light
  • MED - Single smoke machine pulse
  • HIGH - Turn on smoke machine
  • OFF - All off

But I think it would be nice to have a cleaner way to set up more kinds of devices in the same instance, with different offsets for each one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants