josemariaaraujo / Shelly-Power-Diverter

Power diverter of excess solar production using a Shelly 2.5
The Unlicense
7 stars 2 forks source link

I have a problem compiling the program #1

Closed pachapape closed 1 year ago

pachapape commented 2 years ago

Hello

First thanks a lot for this project, I try to make the same. I have a problem compiling can you help me ? esphome compile diverter.yml INFO Reading configuration diverter.yml... ERROR Unable to load component diverter.sensor: Traceback (most recent call last): File "/home/manu/.local/lib/python3.9/site-packages/esphome/loader.py", line 162, in _lookup_module module = importlib.import_module(f"esphome.components.{domain}") File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/manu/Bureau/Shelly-Power-Diverter-main/custom_components/diverter/sensor.py", line 31, in cv.Optional(CONF_VOLTAGE): sensor.sensor_schema(UNIT_VOLT, ICON_FLASH, 1), TypeError: sensor_schema() takes from 0 to 1 positional arguments but 3 were given Failed config

sensor.diverter: [source diverter.yml:36]

Platform not found: 'sensor.diverter'. platform: diverter voltage: name: Voltage current_a: name: Current active_power_a: name: Active Power energy_buffer: name: Energy Buffer Count energy_diverted: name: Diversion Cycles diverter_parameters: energy_buffer_size: 360 energy_threshold_high: 50% energy_threshold_low: 50%

Thanks a lot !

josemariaaraujo commented 2 years ago

Hi, give me a couple of days to answer Unknown to me, this project was caught in the middle of code changes in espphone, and requires a specific version to compile, and haven't found the will to bring my code up to date as the hardware is working fine since the last changes. I won't have access to my "development" PC for a couple of days, but then I will give accurate instructions on how to compile

pachapape commented 2 years ago

Don't worry, no hurry, it's also a good stuff to give kwh to network ;)

Thank you by advance !

josemariaaraujo commented 2 years ago

Hi! Just updated and verified the Instructions.txt on how to compile. Also added a couple of pictures of the hardware mods needed in the Shelly 2.5 Hope it solves your issues!

pachapape commented 2 years ago

Hello

Thanks the program is compiled and inside the shelly now, I soldered the different stuffs inside, but just one last question : You add a 220 ohm resistor inside the shelly, is it specific to your current sensor or does it have to be here always ?

Thanks again !

josemariaaraujo commented 2 years ago

The value of the resistor I used is $22*10^0$ = 22 Ohm

The resistor is needed for the current transformer, otherwise it won't be able to sense the current. The current transformer I used has a ratio of 3000:1, they're pretty easy to find.

pachapape commented 1 year ago

Hi Thanks a lot, I just compiled the program, everything is fine.I will do the last solderings within a few days. You added a resistance of 220 ohm for the current sensor ? Thanks again for your help. Have a good day

Le lundi 9 mai 2022, 16:10:26 UTC+2, josemariaaraujo ***@***.***> a écrit :  

Hi! Just updated and verified the Instructions.txt on how to compile. Also added a couple of pictures of the hardware mods needed in the Shelly 2.5 Hope it solves your issues!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

josemariaaraujo commented 1 year ago

I have used a 22 Ohm resistor for the current transformer, as seen in here, next to SW2 pin: 220 = 22 Ohm