Comments (11)
more precise: inverted signal on CF and CF1
from libretiny.
p24 = pin 16 on the BK7231N qfn32 which is virtually mapped to arduino D3 in libretuya.
from libretiny.
also p6 and p7 are not D0 and D1
cb2s.json
},
"13": {
"IC": 24,
"ARD": "D8"
},
"14": {
"IC": 23,
"ARD": "D9"
from libretiny.
There's no pin 34, so I believe this is a typo.
@descipher If you take a look at the docs here, you can see that D0 and D1 are indeed P6 and P7.
Since yesterday, you can actually use the P* pins directly in esphome config (make sure you have the latest commits for both esphome and LibreTuya).
from libretiny.
Sorry guys, i don't understand, is there an error in my config? Or this type of power meter is not supported?
Thanks
from libretiny.
This type of meter currently has some sort of problem. We're investigating it, and hopefully we'll find a solution in the coming days.
from libretiny.
ok @kuba2k2 thanks for the fast response, i could help of course, please give me some hints to where to look to fix
from libretiny.
You can try adding a basic pulse_counter component, and see if it reports anything:
sensor:
- platform: pulse_counter
pin:
number: D0
mode: input
name: "D0 Pulse Counter"
update_interval: 10s
- platform: pulse_counter
pin:
number: D1
mode: input
name: "D1 Pulse Counter"
update_interval: 10s
(adjust the pin numbers as needed)
from libretiny.
Tried with your suggests but i receive 0 pulses/min in the two pins, so i think the problem might be in pulse_counter also
from libretiny.
Thanks to the help of @catalin2402 i successfully read the current/voltage/power from that BL0937
I will post the updated yaml soon, the trick was to invert cf and cf1 pin
from libretiny.
Like promised this is the yaml
sensor:
- platform: hlw8012
model: BL0937 # note that the model must be specified to use special calculation parameters
voltage_divider: 780 # adjust it according to the actual resistor values on board
current_resistor: 0.00107
update_interval: 10s
sel_pin:
number: P24
inverted: true # the logic of BL0937 is opposite from HLW8012
cf_pin:
number: P7
inverted: true
mode:
input: true
pulldown: true
cf1_pin:
number: P6
inverted: true
mode:
input: true
pulldown: true
current:
name: 'Plug 1 Current'
voltage:
name: 'Plug 1 Voltage'
power:
name: 'Plug 1 Power'
energy:
name: 'Plug 1 Energy'
# convert it to kWh
filters:
- multiply: 0.001
unit_of_measurement: 'kWh'
accuracy_decimals: 4
from libretiny.
Related Issues (20)
- support for BK7231M(CB2S) HOT 20
- PlatformIO is Broken with "KeyError: \"Invalid board option 'build.family'\"" HOT 4
- Support for bk7238 HOT 3
- Wifi chip from Smart Plug reports as Rtl8710c How to flash or dump it? HOT 4
- [RTL8710BX] [T102_V1.1] [BL0937] pin change interrupts / Getting BL0937 to work with rtl87xx
- BK7231N : The compiled Firmware file size exceeds the flash memory HOT 3
- instructions contradictory in ltchiptool? HOT 6
- Further clarification to what 1.5M baud rate refers to HOT 2
- Problems when configuring wifi for devices using the BK7231N chip and connecting the device to the App HOT 2
- MOES WS-B-US 2 Button Smart Switch did not create other components such as binary_sensor, light, etc. in HA? HOT 2
- LibreTiny refactor HOT 10
- unable to write to BK7231M on CB2S HOT 7
- Intermittent connection issues with bk72xx ESPHome devices HOT 30
- Feature Request : Maintain constant state through reboot HOT 2
- AssertionError: Error: Missing site-packages directory `/home/$USER/.platformio/penv/.libretiny/lib/python3.11/site-packages`: HOT 3
- File system health HOT 1
- Incorrect input format ltchiptool HOT 9
- Address WebServer HOT 2
- t102-v1.1 PA15 pin issues
- Configure OTA on wblc5 (BK7231T) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libretiny.