mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
add:增加homeassistant支持,取消支持domoticz
This commit is contained in:
@@ -171,19 +171,7 @@ void rtc_thread( mico_thread_arg_t arg )
|
||||
{
|
||||
user_relay_set( i, user_config->plug[i].task[j].action );
|
||||
update_user_config_flag = 1;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>domoticz״̬
|
||||
if ( user_config->plug[i].idx >= 0 )
|
||||
{
|
||||
uint8_t *buf = NULL;
|
||||
buf = malloc( 32 ); //idxΪ1λʱ<CEBB><CAB1><EFBFBD><EFBFBD>Ϊ24
|
||||
if ( buf != NULL )
|
||||
{
|
||||
sprintf( buf, "{\"idx\":%d,\"nvalue\":%d}", user_config->plug[i].idx, user_config->plug[i].on );
|
||||
user_send(false,buf);
|
||||
free( buf );
|
||||
}
|
||||
}
|
||||
user_mqtt_send_plug_state(i);
|
||||
}
|
||||
if ( repeat == 0x00 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user