Easier measurement process for new device
See original GitHub issueIdeally I would want an easier way to add new equipment. The perfect speaker flow in my mind would look like this (after running the docker command):
- Submit address of Home Assistant instance
- Submit long-lived token
- Select type of equipment:
- Light
- Smart speaker
- Smart switch
if more than one manufacturer in device registry:
Select smart speaker manufacturer:- Sonos
- Amazon
if more than one model of the chosen manufacturer in device registry:
Select model:- One
- Move
if more than one entity of the chosen model in device registry:
Select entity:- Bathroom
- Living Room
- Select power measuring entity or type in manually:
- sensor.tp_link2_current_consumption
- sensor.shelly_power
Then the script could play a test sound from a web address, turn the volume up in cycles, mute it all the while measuring power. In the end it could create the model.json file. This would be a standardized way securing consistency as well! Potentially one could also try out the different attributes available on the device automatically, like loudness, bass levels etc and also incorporate that in the model.
Issue Analytics
- State:
- Created 10 months ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Understanding the 5 Phases of Medical Device Development
Understanding the 5 phases of medical device development and what is involved at each step.
Read more >Is monitoring every procedure required?
Process monitoring is required but do you know whether monitoring every procedure is required by the FDA QSR or ISO 13485?
Read more >A Simple and Efficient Device and Method for Measuring the ...
We present a new device for quantifying gases or gas mixtures based on the simple principle of bubble counting. With this device, we...
Read more >Moasure® ONE™
Difficult Measuring Made Easy · Measure & Draw · Calculate Area · Save Time, Do More · Measure & Draw Simultaneously · Capture...
Read more >New Method and Portable Measurement Device for the ... - MDPI
This paper presents an automated calibration method for industrial robots, based on the use of (1) a novel, low-cost, wireless, 3D measuring device...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@knudsvik I have worked for a few hours to completely refactor the measure tool to cleanup the measure main script and move logic to respective places for less cohesion and to adhere to single response principle. See #1286
Few things I have done:
utilts/measure/runner
utils/measure/config.py
Are you able to give this a test run by checkout out this branch (fix/measure-code-standards)? See if this works correctly for you (particularly the streaming part). Let me know what you think.
Yes, there can definitely be a lot improved upon the speaker measurement.
I have chosen to keep it simple now, because I didn’t know if a lot of smart speakers were being provided to the library yet, and it would take a significant amount of work and refactoring to facilitate two different measurement flows (light and smart speaker). I see you want to have a go into developing the measure script. Here are some pointers. I would suggest to take it small steps at a time.
We need to somehow extract the light measurement logic into a separate class. So we can also introduce smart speaker logic. Then some questions / answers could be asked in the main measurement class (i.e. select power measuring entity, generate model.json yes/no etc.). And depending on equipment selection we can dispatch the actual measure logic to the respective class.
I am not sure if the HA API exposes device information (pretty sure it doesn’t). So I suggest to just keep that the same as the light selection, where just all the entities of domain
light
are listed. Smart speakers can just list all entities of domainmedia_player
. It won’t be hundreds of them, so selection of manufacturer/model would be overkill.Not sure how to play a test sound using HA service which works for alle media players and HA installations.
For the submittion of HA address etc. I would leave it to the env approach right now, which works fine for all users now. We can maybe improve upon that in a future iteration, but for now keep it lean and mean.