请选择 进入手机版 | 继续访问电脑版

『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 991|回复: 18

[基础教程] DDSU666电表和485转wifi简单配置

[复制链接]

4

主题

124

帖子

1284

积分

金牌会员

Rank: 6Rank: 6

积分
1284
金钱
1160
HASS币
0
发表于 2022-4-2 14:46:50 | 显示全部楼层 |阅读模式
本帖最后由 launze 于 2022-4-2 21:53 编辑

直接购买成品:DDSU666升级版,默认已切换成ModBus模式
HF 485转Wifi模块
接线:电表 24 25 -> HF模块7 5
HF模块设置:TCP Server模式,串口设置9600,8,0,1,modbus模式
HA直接用ModBus模块配置:
微信图片_20220402215028.jpg 微信图片_20220402215032.jpg 微信图片_20220402215306.jpg
modbus:
  - name: DDSU666
    type: tcp
    host: 192.168.123.73
    port: 502
    sensors:
      - name: "电压"
        address: 0x2000
        slave: 1
        count: 2
        precision: 2
        unit_of_measurement: V
        data_type: float
      - name: "电流"
        address: 0x2002
        slave: 1
        count: 2
        precision: 2
        unit_of_measurement: A
        data_type: float
      - name: "瞬时总有功功率"
        address: 0x2004
        slave: 1
        count: 2
        precision: 2
        scale: 1000
        unit_of_measurement: W
        data_type: float
      - name: "瞬时总无功功率"
        address: 0x2006
        slave: 1
        count: 2
        precision: 2
        unit_of_measurement: var
        data_type: float
      - name: "瞬时总视在功率"
        address: 0x2008
        slave: 1
        count: 2
        precision: 2
        unit_of_measurement: VA
        data_type: float
      - name: "总功功率因数"
        address: 0x200A
        slave: 1
        count: 2
        precision: 2
        data_type: float
      - name: "有功总电能"
        address: 0x4000
        slave: 1
        count: 2
        precision: 2
        unit_of_measurement: kWh
        data_type: float

                               
登录/注册后可看大图



评分

参与人数 2金钱 +10 收起 理由
adr + 5 论坛有你更精彩!
sorrypqa + 5 感谢楼主分享!

查看全部评分

回复

使用道具 举报

2

主题

161

帖子

741

积分

高级会员

Rank: 4

积分
741
金钱
580
HASS币
0
发表于 2022-4-2 15:34:13 | 显示全部楼层
我是抄了这位大佬的作业,20多块钱搞定https://github.com/liwei19920307/ESP485
回复

使用道具 举报

2

主题

161

帖子

741

积分

高级会员

Rank: 4

积分
741
金钱
580
HASS币
0
发表于 2022-4-2 15:40:01 | 显示全部楼层
对了,模块可以选择集成pcb天线的,只要弱电箱盖子不是金属的应该就没什么问题,这样还能省去一个外置天线。
我做了两个,一个内置天线一个外置天线,都没问题。
回复

使用道具 举报

22

主题

1900

帖子

6939

积分

论坛元老

Rank: 8Rank: 8

积分
6939
金钱
5034
HASS币
20

论坛元老

发表于 2022-4-2 15:45:47 | 显示全部楼层
https://bbs.iobroker.cn/t/topic/7433

https://post.smzdm.com/p/a5dlz2l3/

抄作业的东西有必要搞这么复杂么
回复

使用道具 举报

9

主题

184

帖子

1935

积分

金牌会员

Rank: 6Rank: 6

积分
1935
金钱
1751
HASS币
0
发表于 2022-4-2 19:14:14 | 显示全部楼层
进出线接反了?下面接进线,上面接出线…
回复

使用道具 举报

4

主题

124

帖子

1284

积分

金牌会员

Rank: 6Rank: 6

积分
1284
金钱
1160
HASS币
0
 楼主| 发表于 2022-4-2 22:14:37 | 显示全部楼层
BlueFang 发表于 2022-4-2 15:34
我是抄了这位大佬的作业,20多块钱搞定:https://github.com/liwei19920307/ESP485
...

这个好,但是之前怕手残,直接买了成品
回复

使用道具 举报

29

主题

1668

帖子

3485

积分

论坛元老

Rank: 8Rank: 8

积分
3485
金钱
1817
HASS币
40
QQ
发表于 2022-4-5 00:32:40 | 显示全部楼层
同款。不过培正我也在用。
我不生产技术,我只是技术的搬运工。
回复

使用道具 举报

2

主题

309

帖子

978

积分

高级会员

Rank: 4

积分
978
金钱
669
HASS币
0
发表于 2022-4-5 21:05:01 | 显示全部楼层
谢谢分享,正好研
回复

使用道具 举报

0

主题

45

帖子

482

积分

论坛积极会员

积分
482
金钱
437
HASS币
0
发表于 2022-4-7 15:56:12 | 显示全部楼层
配置无效

Integration error: sensors - Integration 'sensors' not found.  

报错,是不是还缺什么文件?sensors.yaml 还是报错。
回复

使用道具 举报

0

主题

45

帖子

482

积分

论坛积极会员

积分
482
金钱
437
HASS币
0
发表于 2022-4-7 20:32:24 | 显示全部楼层
本帖最后由 taorennanjing 于 2022-4-7 21:57 编辑

没对齐,配置文件没错了,在日志里有错误
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 电压 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 电流 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总有功功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总无功功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总视在功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 总功功率因数 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 有功总电能 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 电压 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 电流 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总有功功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总无功功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总视在功率 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 总功功率因数 with float is not valid, trying to convert
2022-04-07 13:31:53 WARNING (MainThread) [homeassistant.components.modbus.validators] 有功总电能 with float is not valid, trying to convert
2022-04-07 13:32:01 ERROR (SyncWorker_11) [homeassistant.components.modbus.modbus] Pymodbus: DDSU666: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
2022-04-07 13:37:01 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for bootstrap - moving forward
2022-04-07 13:37:16 WARNING (MainThread) [homeassistant.core] Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. Please report the following info at https://github.com/home-assistant/core/issues: search, binary_sensor.mqtt, input_button, counter, system_log, switch.mqtt, sun, notify.mobile_app, recorder, script, input_boolean, input_number, tts, my, google_maps, notify, sensor.mqtt, binary_sensor.workday, cloud, trace, usb, cover.mqtt, device_automation, diagnostics, history, ha_sidebar, switch, workday, homeassistant, scene.homeassistant, energy, tag, hacs, config, binary_sensor, automation, http, tts.google_translate, input_text, input_select, onboarding, sensor.energy, image, api, websocket_api, dhcp, group, person, stream, map, sensor.hacs, select, ha_file_explorer, media_source, cover, persistent_notification, lovelace, network, timer, ssdp, webhook, logbook, sensor.modbus, select.mqtt, modbus, weather.met, sensor, input_datetime, mqtt, scene, blueprint, default_config, zeroconf, zone, frontend, analytics, auth, weather, met, mobile_app, system_health
2022-04-07 13:37:41 ERROR (MainThread) [custom_components.hacs] HacsTask<prosess_queue> failed: No manifest.json file found 'custom_components/custom_aftership/manifest.json'
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 电压 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 电流 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总有功功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总无功功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总视在功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 总功功率因数 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 有功总电能 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 电压 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 电流 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总有功功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总无功功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 瞬时总视在功率 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 总功功率因数 with float is not valid, trying to convert
2022-04-07 13:53:30 WARNING (MainThread) [homeassistant.components.modbus.validators] 有功总电能 with float is not valid, trying to convert
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2022-8-9 10:38 , Processed in 0.065175 second(s), 37 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表