Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial prompt gives an error #2

Open
teitelbot opened this issue Nov 30, 2023 · 5 comments
Open

initial prompt gives an error #2

teitelbot opened this issue Nov 30, 2023 · 5 comments

Comments

@teitelbot
Copy link

Ive added your sample code and added my API
My magic mirror wont start and If I look at the developing mode it says there are error codes with the initial prompt
If I comment out the initial prompt the module will work but I'm assuming it doesnt know the actual time and weather
any idea why this would be happening

@teitelbot
Copy link
Author

I found the problem. There seems to be a plus sign after the last initialprompt that shouldnt be there
also the weather module takes longer to load than the gpt so it will possibly say it doesnt have any weather info
otherwise I'm really enjoying this module and trying to learn how to make it do other things like link to my calendar

@ImanuelBertrand
Copy link
Owner

Thank you for noticing that! I fixed the plus sign. You can work around the weather puffin loading slower by using the initialDelay :)

@teitelbot
Copy link
Author

Thanks.
Can I ask you how would I pull info from my calendar as well.
Where can I find out what exactly is in the module information that I am pulling.
For example I understand the initial prompt is sending the clock info but I don't know what info that is exactly and where to look that up.
Trying to learn more

@ImanuelBertrand
Copy link
Owner

The module uses JS DOM function to find the information in the document (the magicmorror content that is displayed):
document.querySelectorAll('.clock')[0].innerText searches for the first element that has the class clock and returns its text content.
I can not help you with your calendar, but if you know basic HTML structure and query selectors (think CSS selectors), you can work it out yourself using the developer tools of your browser (F12, usually).

@teitelbot
Copy link
Author

teitelbot commented Dec 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants