Git Product home page Git Product logo

Comments (13)

yangkai6667 avatar yangkai6667 commented on May 22, 2024

配对的时候有时候可以搜到设备ESP8266_LED 但添加配件的时候无法成功,显示无法添加配件

from arduino-homekit-esp8266.

Mixiaoxiao avatar Mixiaoxiao commented on May 22, 2024

贴出来你的日志

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

贴出来你的日志

image

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

贴出来你的日志

您好,串口中打印的信息一直是这样,希望您能帮我指导一下,感激不尽!!

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

贴出来你的日志

image
这是我的配置,基本都是参考您给的推荐配置设置的

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

贴出来你的日志

image
我重新连接了一次,这次串口打印的日志是这样的

from arduino-homekit-esp8266.

Mixiaoxiao avatar Mixiaoxiao commented on May 22, 2024

贴一下你的accessory定义

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

贴一下你的accessory定义

image
我用的是1.1.0的版本实例simplest_led, accessory部分没有改动

from arduino-homekit-esp8266.

Mixiaoxiao avatar Mixiaoxiao commented on May 22, 2024

simplest_led示例项目其他地方有改动吗?
出错的地方在 [ 161838]那行日志,(注:!!! 开头的日志代表这行是error),这行出错信息是指:Socket需要传输525字节数据,但实际只传了411字节。
可能是网络方面的原因,你可以换个开发板或者换个路由器或者改善一下WIFI信号试试。
你日志里面error的本身不属于本library的bug。

另外关于你的issue的标题提出的问题,如果你的iOS与某个配件(多次)配对失败,iOS就认为这个配件有问题,就不会在搜索列表里面显示这个配件了,这是我个人的经验,没有官方说明。可行的解决方法:给你的配件换个名字,或者重启一下你的iPhone。

from arduino-homekit-esp8266.

yangkai6667 avatar yangkai6667 commented on May 22, 2024

simplest_led示例项目其他地方有改动吗?
出错的地方在 [ 161838]那行日志,(注:!!! 开头的日志代表这行是error),这行出错信息是指:Socket需要传输525字节数据,但实际只传了411字节。
可能是网络方面的原因,你可以换个开发板或者换个路由器或者改善一下WIFI信号试试。
你日志里面error的本身不属于本library的bug。

另外关于你的issue的标题提出的问题,如果你的iOS与某个配件(多次)配对失败,iOS就认为这个配件有问题,就不会在搜索列表里面显示这个配件了,这是我个人的经验,没有官方说明。可行的解决方法:给你的配件换个名字,或者重启一下你的iPhone。

非常感谢,因为我用的是电脑热点,可能信号比较弱,我多连接几次试试,再次感谢您的帮助

from arduino-homekit-esp8266.

Mixiaoxiao avatar Mixiaoxiao commented on May 22, 2024

可以尝试一下如下改动,可能会解决你日志中 [ 161838]那行的问题:
在源码arduino_homekit_server.cpp文件中,用下面的write函数替换原有的write(约在520行左右的位置)

void write(client_context_t *context, byte *data, int data_size) {
	if ((!context) || (!context->socket) || (!context->socket->connected())) {
		CLIENT_ERROR(context, "The socket is null! (or is closed)");
		return;
	}
	if (context->error_write) {
		CLIENT_ERROR(context, "Abort write data since error_write.");
		return;
	}
	int bytesWritten = 0;
	const byte *p = data;
	while (bytesWritten < data_size) {
		int written;
		int towrite = std::min((int) (data_size - bytesWritten), (int) HOMEKIT_JSONBUFFER_SIZE);
		written = context->socket->write(p + bytesWritten, towrite);
		if (written <= 0) {
			context->error_write = true;
			context->disconnect = true;
			homekit_server_close_client(context->server, context);
			return;
		}
		if(written != towrite){
			CLIENT_INFO(context, "socket.write, towrite=%d, written=%d", towrite, written);
		}
		bytesWritten += written;
		delay(10);
	}
}

from arduino-homekit-esp8266.

ctudoudou avatar ctudoudou commented on May 22, 2024

Erase full flash for the ESP and then re-flash the ESP, and solved my problem.

from arduino-homekit-esp8266.

Mixiaoxiao avatar Mixiaoxiao commented on May 22, 2024

建议不要使用手机/电脑热点或者质量较差的WiFi网络,在存在较大网络丢包率的情况下配对数据容易出错。

from arduino-homekit-esp8266.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.