Comments (16)
Thanks. I have also made some improvements in the measure script. Let me know if you need any help.
Bought my Shelly plug at robbshop. https://www.robbshop.nl/tussenstekker-2500w-wifi-shelly
from homeassistant-powercalc.
Sorry, I don't have much time at the moment, as I already wrote to you in a PM. In the meantime, however, I have found some time and have been able to carry out the measurements. :-)
Pull request is created: #65
from homeassistant-powercalc.
Hi Daniel,
This is a known issue for this particular light model LCT015. That light is controllable by color temperature, but also with color. The hs.csv should be there to supply the measurements for color (hue/saturation), however that one is missing causing this error. I have asked the author if he can do the measurements for HS (color) mode, as I don't have this light model myself. But I don't know when he will be able to do this. @CM000n could you have a look into this?
I will also have a look soon if I can make the light work for color temperature mode only even when the hs files are missing, but I don't have time until saturday.
from homeassistant-powercalc.
I've prepared short time lapse (60x faster than real time; 1 min. -> 1 hour) showing only 1.5h of script working (view is from HA GUI) - I think no one knows how much time and resources are consumed to prepare LUT file when MODE = MODE_HS
:
20210702-1355-51_fixed.mp4
But in my opinion:
- setting
MODE = MODE_HS
should be set as default inmeasure.py
script (so no one will miss this mode). LCT0015
should be temporary moved to unsupported models - any workaround will not be good - it is impossible to map h/s mode to color_temp mode, it is of course possible to use LUT file from other model, but it will show false values.- I've read nearly all
model.json
files, and most of them miss standby_usage, so, it would be nice if script have option to generate also file with power value when light is off eg. standby_usage.txt - I think it is possible to measure it in early stage - 10 seconds waiting could be divided to 2x 5 secs and in meantime off state could be measured, in my opinion Shelly measures power just instant, waiting time is needed only because bulbs have variable power factor (so it is impossible to measure state more frequently than 2 secs).
BTW Script does not work properly under windows (now it is running for me usinng Ubuntu) - Shelly returns measure value ony once in the begining and this value is copied tiil end.
from homeassistant-powercalc.
Hi Daniel,
This is a known issue for this particular light model LCT015. That light is controllable by color temperature, but also with color. The hs.csv should be there to supply the measurements for color (hue/saturation), however that one is missing causing this error. I have asked the author if he can do the measurements for HS (color) mode, as I don't have this light model myself. But I don't know when he will be able to do this. @CM000n could you have a look into this?
I will also have a look soon if I can make the light work for color temperature mode only even when the hs files are missing, but I don't have time until saturday.
Thanks, that's clear.
I've runned the integration with debug enabled. I have someother bulbs and a lightstrip that also don't work.
Do you think they come available in the future?
2021-07-02 16:08:40 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /config/custom_components/powercalc/data/signify/LCT010/color_temp.csv.gz
2021-07-02 16:08:40 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /config/custom_components/powercalc/data/signify/LCT010/hs.csv.gz
2021-07-02 16:08:42 DEBUG (MainThread) [custom_components.powercalc.sensor] Setting up power sensor. entity_id:light.eettafel sensor_name:Eettafel Powermeter strategy=LutStrategy manufacturer=signify model=LCT010 standby_usage=0
2021-07-02 16:08:42 DEBUG (MainThread) [custom_components.powercalc.sensor] Setting up power sensor. entity_id:light.hektar_staande_lamp sensor_name:Hektar Powermeter strategy=LutStrategy manufacturer=signify model=LCT010 standby_usage=0
2021-07-02 16:08:42 INFO (MainThread) [custom_components.powercalc.sensor] Model not found in library light.hue_lightstrip_plus: ('Model not supported', 'LST002')
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Error setting up calculation strategy: You must supply a valid manufacturer and model to use the LUT mode
2021-07-02 16:08:42 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /config/custom_components/powercalc/data/signify/LCT015/color_temp.csv.gz
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.tv_meubel_links: ('No lookup file found for mode', 'hs')
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.tv_meubel_rechts: ('No lookup file found for mode', 'hs')
2021-07-02 16:08:42 INFO (MainThread) [custom_components.powercalc.sensor] Model not found in library light.speelgoedkast: ('Model not supported', 'LCT007')
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Error setting up calculation strategy: You must supply a valid manufacturer and model to use the LUT mode
2021-07-02 16:08:42 INFO (MainThread) [custom_components.powercalc.sensor] Model not found in library light.plafond: ('Model not supported', 'LWB006')
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Error setting up calculation strategy: You must supply a valid manufacturer and model to use the LUT mode
2021-07-02 16:08:42 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.hue_go: ('No lookup file found for mode', 'color_temp')
2021-07-02 16:09:05 DEBUG (MainThread) [custom_components.powercalc.sensor] State changed to "off" for entity "light.eettafel". Power:0
2021-07-02 16:09:05 DEBUG (MainThread) [custom_components.powercalc.sensor] State changed to "off" for entity "light.hektar_staande_lamp". Power:0
from homeassistant-powercalc.
Do you think they come available in the future?
It just depends on users - you can measure all of them yourself (like I'm doing it now) and make project better.
In next days I'will provide support for LTW010 and LLC011 and some Ikea models.
I could do measurments for anyone, but sending hardware abroad will cost too much.
from homeassistant-powercalc.
Do you think they come available in the future?
It just depends on users - you can measure all of them yourself (like I'm doing it now) and make project better.
In next days I'will provide support for LTW010 and LLC011 and some Ikea models.
I could do measurments for anyone, but sending hardware abroad will cost too much.
Out of curiousity;
How do you measure this? I understand you're using hardware to do this?
If the costs are not to high I would gladly help to measure more models.
from homeassistant-powercalc.
Only few things are needed:
- computer with any modern linux as OS, with installed Python and eg. Visual Studio Code (or any editor, but VSC is "all in one" IDE)
- lighting fixture (where measured bulb fit and is able to electrically connect to Shelly)
- Shelly Plug or Shelly Plug S (cost ~20€) - script is nearly ready for them - it needs just small configuration, (or maybe other Shelly modules with ability to measure power, but it needs electrician skills, I think other equipment from different manufaturer could be used but it will need good Python knowledge)
- I've forgot - plenty of time and suitable place: P - one full H/S measure tooks about 20 hours…
Personally I've tested Shelly Plug S (used originally by author @bramstroker ) with highly accurate power meter and values measured by Shelly are accurate enough, so I'm using this hardware now.
Script is located here
https://github.com/bramstroker/homeassistant-powercalc/tree/master/utils/measure
from homeassistant-powercalc.
As @nepozs already explained users can create a LUT file for missing models and help the project that way. I did all the light models which I have in my house, and two other users did a lot of other lights already. Right now we "only" support 15 lights.
Some additions to what @nepozs already said:
You can also use windows or Mac OSX. As long as it is running Python. There is a python script included in this repository (under utils/measure.py
directory) which I created to automatically change the light settings and take measurements each 2 seconds. You let this script running and it will generate the CSV. Than you can create a pull request to get it included in this repository.
This script is created especially for the Shelly Plug (which is a smart plug which you can connect to your wifi network).
When you want to use some other smartplug (zigbee, zwave plug) whatever you need to alter my script or create your own script (when you can program).
from homeassistant-powercalc.
I've prepared short time lapse (60x faster than real time; 1 min. -> 1 hour) showing only 1.5h of script working (view is from HA GUI) - I think no one knows how much time and resources are consumed to prepare LUT file when
MODE = MODE_HS
:20210702-1355-51_fixed.mp4
But in my opinion:
- setting
MODE = MODE_HS
shold be set as default inmeasure.py
script (so no one will miss this mode).LCT0015
should be temporary moved to unsupported models - any workaround will not be good - it is impossible to map h/s mode to color_temp mode, it is of course possible to use LUT file from other model, but it will show false values.- I've read nearly all
model.json
files, and most of them miss standby_usage, so, it would be nice if script have option to generate also file with power walue when light is off eg. standby_usage.txt - I think it is possible to measure it in early stage - 10 seconds waiting could be divided to 2x 5 secs and in meantime off state could be measured, in my opinion Shelly measures power just instant, waiting time is needed only because bulbs have variable power factor (so it is impossible to measure state more frequently than 2 secs).BTW Script does not work properly under windows (now it is running for me usinng Ubuntu) - Shelly returns measure value ony once in the begining and this value is copied tiil end.
Very cool time lapse. I like it ;-)
I have a littlebit of time to work on the component tomorrow. I think I will make the mode a use input (same as the light selection), that way the user can select the correct mode when starting the script. What do you think?
I will also add the standby usage to the script.
from homeassistant-powercalc.
I think I will make the mode a use input (same as the light selection), that way the user can select the correct mode when starting the script. What do you think?
It will be great option - I've unintentional changed code many times by missclicks :D
I will also add the standby usage to the script.
It would be great, because every model has power draw between 0,3W and 0,5W so it is slightly more than 0W (in case using multiple lights total will be quite more).
I have some thoughts about optimization in script (eg. in HS mode mired step could be bigger, but britghness step sholud probably be lower) , but I have to analyze more .csv files
It looks like the maximum brightness could be 255 and it would be better to find the matching values so that the script ends up using the highest brightness (like many users use lights in reality).
Maybe the finished .csv files can also be optimized post factum (it depends on the algorithms used by the integration) - I think it would be enough to cut a few lines containing the same power values, but apart from the first and last in the series.
You can also use windows
I've tried on windows 7 (old laptop which could be working 24/7), but without success (on Win7 it is possible to use only old version of Python) - maybe win10 works?
BTW Most of my measurements are ready, so I'll try to prepare PR tonight.
from homeassistant-powercalc.
Thanks. Btw it would be better idea to make a seperate issue for improvements in the measure script as we are taking over @DanielV88 topic now which is about an error for the missing lut file of LCT015.
from homeassistant-powercalc.
@DanielV88 where do you live? I live in the Netherlands and there I could buy the Shelly plug for 22 euro which is not that expensive imo
from homeassistant-powercalc.
@bramstroker Also in the Netherlands :)
I will look into it and see if I can help in this project!
from homeassistant-powercalc.
@CM000n I am sorry to ping you. Did you see my request for providing hue/saturation measurement for LCT015? Users will get an error when trying to use this bulb because hs.csv is missing.
Unfortunately I don't have this bulb myself so I have no way to do measurements.
from homeassistant-powercalc.
Thanks @CM000n! PR is merged. Will be in next release 0.2.8
from homeassistant-powercalc.
Related Issues (20)
- Waiting on integrations to complete setup HOT 9
- versione 1.11.8 doenst work HOT 3
- Global search not working anymore in library GUI HOT 1
- LCA007 lookup not working with 1.12.0 HOT 5
- FileNotFoundError - model.json HOT 10
- Use Nanoleaf A19 Matter Bulbs for HomeKit Bulbs HOT 3
- add to group for daily energy HOT 3
- wrong energy when using template HOT 3
- No lookup file found for mode: color_temp HOT 9
- Group problem HOT 9
- Unexpected device attributes HOT 5
- Ikea LED1537R6 is not recognized. HOT 1
- Blocking call to open inside the event loop in Home Assistant 2024.6.0 beta
- Daily energy entities disappear from powercalc UI after reboot HOT 10
- OFF consumption > min ON consumption with TRADFRI bulb E27 WS globe 1055lm (LED2201G8) HOT 1
- PowerCalc: Cannot connect to powercalc.lauwbier.nl:443 HOT 2
- None entities HOT 7
- After every reboot integration automatically creates a None device HOT 32
- Error and not starting after upgrade from 1.12.6 to 1.12.7 HOT 11
- Detected blocking call to open inside the event loop by custom integration 'powercalc' HOT 1
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 homeassistant-powercalc.