NorthernMan54 / homebridge-HTTP-IRBlaster

IR Blaster plugin for HomeBridge
41 stars 2 forks source link

Request is lost between Homebridge and ESP8266 (iOS shows "No Response") #3

Open scoover opened 3 years ago

scoover commented 3 years ago

Hey @NorthernMan54,

After I gave up a couple years ago, I'm back at it trying to connect my Valor fireplace to Homekit. I've spent a lot of time in the interim with some other Arduino projects so I'm hoping I can take it over the goal line this time. I'm really inspired by the project you created.

At this point, here is what I have working:

The two things that are most immediately not working are:

  1. When the fireplace click completes on iOS, I get a "No Response" message on iOS
  2. When I subsequently visit fireplace.local:80, the empty "Codes Transmitted" section shows "No codes sent"

So, the HomeBridge requests don't seem to be reaching the ESP8266 NodeMCU.

My accessory config starts with:

    "accessories": [
        {
            "accessory": "http-irblaster",
            "name": "Fireplace",
            "irBlaster": "192.168.1.21",
            ...

I have also tried it with "irBlaster": "fireplace.local" and I can see in the logger that the findDevice() function is working (but I reverted to the IP address since it felt lowest risk).

Any thoughts on what could be the issue? Is it possibly the password I set on the ESP8266 NodeMCU during wifi setup (I used admin as the username but did not use that as the password)? Could it be that I need to set the port number for the ESP8266 NodeMCU?

I peeked at the code in this project and could not find references to the username, password, or port.

Thanks for having a look at this request. Randy

NorthernMan54 commented 3 years ago

A couple of comments

1 - When I wrote the plugin I did not take into account the esp8266 having a username/password required and running on a different port than 80, so I can't really comment on it working with those settings.

2 - Can you get the transmitter to work from the command line and successfully control the fireplace using curl ? One issue I never explored was the remote's possible having unique ID's and the impact to the plugin. So the data stream may need to be adjusted.

scoover commented 3 years ago

Thanks for the quick response, @NorthernMan54.

I blanked out the password in the IR Blaster setup and my ESP8266 blaster finally heard a ping via a HomeKit process. (I think the password in the updated IRBlaster build was the issue.

The log entry shows commands being sent though the entries look incomplete:

image

I'm also seeing intermittent "No Response" messages in HomeKit after the commands send.

I think the best bet might to be for me to use an old version of the mdhiggins project while you two were still in sync.

Any idea what commit you’re successfully using of his?

Thanks, Randy

NorthernMan54 commented 3 years ago

The not responding is by design to prevent requests being sent while the fireplace is busy

This is the setting that causes is "on_busy": 32000,

What says don't respond for 32 seconds which is causing the message

Is your device able to control your fireplace ?

scoover commented 3 years ago

Not yet.

First step was to get the controller to respond to the commands via HomeKit. Working!

Next step is to tune the commands so the fireplace responds...

I have the same remote & fireplace as you did in your Instructable (that is how I found your project). Would you expect your IR codes & timing to work out of the box (or do you think the remotes are somehow uniquely paired with the fireplace)?

At this point, I need to figure out if:

Thanks for your quick responses. Randy

NorthernMan54 commented 3 years ago

I would expect the each remote/fireplace to be unique. The remote protocol has room in it for a unique Id. One nice thing is that after using this for a few years the code did not change when the batteries were replaced.

scoover commented 3 years ago

Ok. Will have a look at the codes when I have a bit more time.

Two final questions for you:

Thanks, Randy

NorthernMan54 commented 3 years ago

I forked it at the time, and is still sitting on GitHub

https://github.com/NorthernMan54/ESP8266-HTTP-IR-Blaster

This is from my device ( PS It has 3 outputs configured ( 315Mhz, 303Mhz and IR )

image

mattvw commented 2 years ago

@scoover had you had a chance to look at the code? I'm running into this issue too and curious if you've found anything useful? (Although I am just trying to control a simple fan, using the simple mode.)

scoover commented 2 years ago

Sorry, @mattvw. I ended up putting this project down. Hope to pick it up again someday. Let me know if you sort it out.