awei5200 发表于 2020-7-21 14:45:12

不能用ttl烧录zm1:'(:'(

app5689 发表于 2020-8-2 01:24:02

卡在激活码上了。qq等级56不够啊。邮箱没找到。知道怎么联系作者么?

a2633063 发表于 2020-8-2 07:37:11

app5689 发表于 2020-8-2 01:24
卡在激活码上了。qq等级56不够啊。邮箱没找到。知道怎么联系作者么?

邮箱没找到就说明没好好看文档

eyinhe 发表于 2020-8-27 15:00:44

本帖最后由 eyinhe 于 2020-8-27 15:12 编辑

感谢楼主,经过一番周折,M1终于又能控制了!
感觉就是那个easylink APP在作怪,换了路由器,用它来设置联网,原本在Home Assistant一切正常的M1,之后就是得不到数据。我又收了个M1回来,还是一样!最后只能刷楼主的zM1固件,装SmartControl_Android_MQTT APP,装MQTT服务器,然后集成到Home Assistant里,转了一大圈,才回到了换路由之前的状态。固件写入中:

另外贴一下我的Home Assistant的两个配置文件(其他不动):
configuration.yaml
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 24.057386
longitude: 114.581566
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Asia/Shanghai
# Customization file
customize: !include customize.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Show the introduction message on startup.
introduction:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Discover some devices automatically
discovery:

sensor:
- platform: mqtt
    name: 'zm1_小写mac地址_temperature'
    # friendly_name: 温度
    state_topic: 'device/zm1/小写mac地址/sensor'
    unit_of_measurement: '°C'
    icon: 'mdi:thermometer'
    value_template: '{{ value_json.temperature }}'
- platform: mqtt
    name: 'zm1_小写mac地址_humidity'
    # friendly_name: 湿度
    state_topic: 'device/zm1/小写mac地址/sensor'
    unit_of_measurement: '%'
    icon: mdi:water-percent
    value_template: '{{ value_json.humidity }}'
- platform: mqtt
    name: 'zm1_小写mac地址_pm25'
    # friendly_name: PM2.5
    state_topic: 'device/zm1/小写mac地址/sensor'
    unit_of_measurement: 'μg/m³'
    icon: mdi:blur
    value_template: '{{ value_json.PM25 }}'
- platform: mqtt
    name: 'zm1_小写mac地址_hcho'
    # friendly_name: 甲醛
    state_topic: 'device/zm1/小写mac地址/sensor'
    unit_of_measurement: 'mg/m³'
    icon: mdi:chemical-weapon
    value_template: '{{ value_json.formaldehyde }}'

light:
- platform: mqtt
    name: zm1_小写mac地址_brightness
    schema: template
    command_topic: "device/zm1/小写mac地址/set"
    state_topic: "device/zm1/小写mac地址/state"
    command_on_template: >
      {"mac": "小写mac地址"
      {%- if brightness is defined -%}
      , "brightness": {{ ((brightness-1) / 64 )|int +1 }}
      {%- else -%}
      , "brightness": 4
      {%- endif -%}
      }
    command_off_template: '{"mac": "小写mac地址", "brightness": 0}'
    state_template: >
      {%- if value_json.brightness == 0 -%}
      off
      {%- else -%}
      on
      {%- endif -%}
    brightness_template: >
      {%- if value_json.brightness is defined -%}
      {{ ( value_json.brightness *64 )|int }}
      {%- endif -%}


homeassistant:
customize:
    light.zm1_小写mac地址_brightness:
      friendly_name: 亮度
    sensor.zm1_小写mac地址_temperature:
      friendly_name: 温度
    sensor.zm1_小写mac地址_humidity:
      friendly_name: 湿度
    sensor.zm1_小写mac地址_pm25:
      friendly_name: PM2.5
    sensor.zm1_小写mac地址_hcho:
      friendly_name: 甲醛
    group.M1:
      friendly_name: 悟空M1

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
groups.yaml
default_view:
view: yes
icon: mdi:home-assistant
entities:
    - group.M1

   
M1:
entities:
    - sensor.zm1_小写mac地址_pm25
    - sensor.zm1_小写mac地址_hcho
    - sensor.zm1_小写mac地址_temperature
    - sensor.zm1_小写mac地址_humidity
    - light.zm1_小写mac地址_brightness
上面两个文件中的“小写mac地址”换成自己的就行了。我的Home Assistant版本是0.91.4,版本太新的话,不一定行。
完成之后的效果:



散步d小螃蟹 发表于 2020-9-5 18:14:05

eyinhe 发表于 2020-8-27 15:00
感谢楼主,经过一番周折,M1终于又能控制了!
感觉就是那个easylink APP在作怪,换了路由器,用它来设置联 ...

大佬,麻烦指点一下如何连MQTT呗?这个是HASS自带的有,还是额外装一个啊?我的hass是装在N1的docker里面的,然后有用docker装了一个MQTT,就是不知道如何配置。麻烦大佬给指点一下

eyinhe 发表于 2020-9-7 11:13:59

散步d小螃蟹 发表于 2020-9-5 18:14
大佬,麻烦指点一下如何连MQTT呗?这个是HASS自带的有,还是额外装一个啊?我的hass是装在N1的docker里面 ...

https://bbs.hassbian.com/thread-5405-1-1.html
我按这个帖子装的。

散步d小螃蟹 发表于 2020-9-7 17:58:09

eyinhe 发表于 2020-9-7 11:13
https://bbs.hassbian.com/thread-5405-1-1.html
我按这个帖子装的。

谢谢了 已搞定

Simonyud 发表于 2020-9-8 08:50:02

厉害了我的楼主,

leving 发表于 2020-10-29 20:59:17

感谢老哥~~求手表的APP

klkl132 发表于 2020-10-30 22:39:52

大佬好,按照网页设置配置了zm1,网页端wifi配置也显示发送成功了,但在路由后台使用看不到设备分配的IP地址,请问是不是跟我的中文ssid有关?有没有办法解决呢?
页: 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14
查看完整版本: 斐讯M1 A1 TC1 DC1刷机连接mqtt 带app