Closed robertsawko closed 3 years ago
+1 for this feature
Would also like to see colour change feature :) :)
@xiki808 hi, try set brightness of {{entity}} to {{brightnessvalue}} percent
with latest commit
@Tony763 Thank you for your reply.
I tried that and this is what I'm getting:
I'm running on the latest commit: 1c0e7ba
@xiki808 try it with word percent, not with symbol
I'm giving the commands through voice @Tony763
and when you put it to console with text, will it work?
Confirmed that, when I type the command and use percent word instead of symbol, works.
ok, give me a moment
Try this branch https://github.com/Tony763/mycroft-homeassistant/tree/issue63
Works! Nicely done.
Interesting project, I'm having a look at it and hopefully I can contribute something. I'm not a python developer though and the start is a hill climb ^^
Would really appreciate if you can point me out where I can follow the logs printed out by self.log.debug("Entity: %s" % entity)
for example.
I have venv setup and install requirements. I was hoping to tail debug logs while using mycroft.
You can do it wit console you already using. Start Mycroft by mycroft-star debug and supply command: :log level debug
Logs are saved in /var/log/mycroft/.
But if you are using VSCode and you intent to work on skills only, use Andlo's remote skill debugger. You can set brakepoints in skills you desire to change and work is then lot easier. [https://community.mycroft.ai/t/remote-debug-skill/8012](remote debug skill). There is problem with deprecated vscode plugin, but I made a needed changes and I will send them as PR soon.
If You need future informatins, reach me by PM in https://community.mycroft.ai/
Got it! Thanks :)
I love logs, but that's interesting.
You can take step by step and see all variables and their values. For me it's like riding in Fiat versus Tesla, Give it a try. My PR should by online in few minutes.
Hi @Tony763, sorry for sending here, but I'm not able to send a PM from the community site.
I have added color change to lights in a new branch ( from 20.08 ) and I'm not able to push the branch due to permissions. I think since they blocked commits due to some other issues, the repo is read only.
Do you have any tips for me how I am able to push the change? Preferably without creating a fork.
Also thanks a lot for suggesting the remote debugger! Super helpful tool.
Hi @xiki808 You must create a fork, put changes into it and then create a Pull Request. Direct push changes to this repo is not allowed.
Hello, Thanks for this! Unfortunately this is still not working for me, but it looks like an issue is on homeassistant side. This is what I get on mycroft debug:
~~~~:48.498 | ERROR | 626 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:897 | An error occurred while processing a request in Home Assistant Skill
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
handler(message)
File "/opt/mycroft/skills/homeassistant.mycroftai/__init__.py", line 251, in handle_light_set_intent
self.ha.execute_service("homeassistant", "turn_on", ha_data)
File "/opt/mycroft/skills/homeassistant.mycroftai/ha_client.py", line 145, in execute_service
r.raise_for_status()
File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://192.168.0.60:8123/api/services/homeassistant/turn_on
The standard turn on/off works ok though. Would you be able to advise?
Hello @robertsawko, which version of HA skill You are using?
Sorry, I am still relatively new to mycroft. I have navigated to mycroft-core/skills/homeassistant.mycroftai
. git branch
is telling me I am on 20.08 and the last commit appears to be 985c4013205d0ef3a55fc7aa3859f52cf1796e9b.
Its quite old commit, current development from there is still not a part of official release as there are some collision with other skills namely issue #64. You can try to remove original directory and get skill from there with mycroft-msm install https://github.com/MycroftAI/skill-homeassistant
. See Mycroft Skill manager
Thanks, I didn't know about mycroft-msm
. I think I was installing skills via the web integration (official release?). Can I just confirm what I need to do?
I am on picroft so:
source mycroft-core/venv-activate.sh
mv mycroft-core/skills/homeassistant.mycroftai/ old-haas-skill
./mycroft-core/bin/mycroft-msm install https://github.com/MycroftAI/skill-homeassistant
and if things are incompatible I can revert using old-haas-skill
?
Yes, you should be fine this way. Just make sure that "old-haas-skill" is not present in skill directory. This way You will get actual active branch with latest commit in it.
Second option is to use just git clone
and pick which branch or commit you want.
Great. Thanks, it's working. Although now I seem to have this problem that appears to be described above, but I think I've got it the other way around. If I type percent
in the terminal it works, but when I speak to Mr M %
is picked up and Mr M is confused.
Put there screenshots of terminal with all these uterances, I will look into it.
Thanks for all of your quick replies. Here's a screenshot. Both typed in, but when I speak I get the latter:
Try it with white space between 50 and %.
I tried and it's the same. I also tried dots at the end.
Funnily enough:
set the brightness of kitchen to 60percent
works just fine.
I see it now, PR fixing this issue is still not merged as it waiting for me to fix tests for it. I missed notification. I will add them tonigh and ask to merge it.
Just to let you know I have temporarily edited the entry in the intent files and it is working fine. Will patiently wait for the PR to be accepted.
Hi @robertsawko, PR was merged. If you could, check it and if it's ok, close the issue, please.
Thanks! I run
/mycroft-core/bin/mycroft-msm update https://github.com/MycroftAI/skill-homeassistant
and I can confirm that the %
symbol is being picked up and it works as expected.
Many thanks for creating this skill. I've been using it with success on both individual and group lights.
It would be great if it could support brightness e.g.
I don't think it's a high priority feature as it could be achieved with scenes. Also, most of the time people will just use an app to get a very rewarding experience of sliding. There were a few situations though when I just wanted to decrease brightness so I am sure I am not the only one.