homebridge-HTTP-IRBlaster icon indicating copy to clipboard operation
homebridge-HTTP-IRBlaster copied to clipboard

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

Open scoover opened this issue 4 years ago • 9 comments

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:

  • IR Blaster is up and running and connected to my wifi on a ESP8266 NodeMCU - I can query the IR Blaster (at fireplace.local:80) and I see the status page
  • HomeBridge is running on my Mac and I have installed your homebridge-HTTP-IRBlaster plugin
  • I have added the Homebridge hub instance to my Home.app
  • I have added your default accessory config JSON to Homebridge
  • I can see the Fireplace accessory in my iOS Home app
  • When I click on the Fireplace accessory in iOS, I can see the log message [Fireplace] Turning Fireplace to true

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

scoover avatar Feb 07 '21 23:02 scoover

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.

NorthernMan54 avatar Feb 08 '21 17:02 NorthernMan54

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

scoover avatar Feb 10 '21 04:02 scoover

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 ?

NorthernMan54 avatar Feb 10 '21 16:02 NorthernMan54

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:

  • The communication between HomeKit & the ESP8266 is correct (you can see the address & commands are blank in the log above — perhaps this is an issue due to the newer build of the mdhiggins project?)
  • If your published remote codes & timing match what my remote sends (i.e. if there is a pairing issue).
  • If my transmitter is functioning properly.

Thanks for your quick responses. Randy

scoover avatar Feb 16 '21 06:02 scoover

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.

NorthernMan54 avatar Feb 16 '21 12:02 NorthernMan54

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

Two final questions for you:

  • Any idea what commit of the mdhiggins project you’re successfully using? (I may try an older version.)
  • In the screenshots of my ESP8266 web server logs, are the blanks for command and the 0x0 for address surprising?

Thanks, Randy

scoover avatar Feb 16 '21 16:02 scoover

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

NorthernMan54 avatar Feb 16 '21 22:02 NorthernMan54

@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.)

mattvw avatar Nov 29 '21 11:11 mattvw

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

scoover avatar Nov 29 '21 16:11 scoover