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

[BUG]: Unable to save settings under system settings tab. #456

Closed
Donpilkerton opened this issue Sep 9, 2020 · 10 comments
Closed

[BUG]: Unable to save settings under system settings tab. #456

Donpilkerton opened this issue Sep 9, 2020 · 10 comments

Comments

@Donpilkerton
Copy link

Donpilkerton commented Sep 9, 2020

I was just wondering what might be preventing me from making and changes and saving them to the systems settings tab. I am able to input the data that I need but when hitting submit after I get a "data could not be saved" error. Please let me know if you need any more information from me! Thanks!
ECAB2857-0EB5-409C-A45C-6802457B4FCB

@theyosh
Copy link
Owner

theyosh commented Sep 11, 2020

Hmm, unfortunately, with this screenshot it will be a guess. Is it possible to make a screenshot from the form with the information filled. You should take care about the weather url data, that will contain your APP key. So clear that with a draw program.

Then, did you 'logged in' while you loaded the settings page? You should get an authentication box from your browser to enter a username and password. Did you do this?

And final, when you want to save the form, you can also use the screen debug to see what is happening when you press the save button: https://github.com/theyosh/TerrariumPI/wiki/FAQ#how-to-debug-terrariumpi

@Dcreeron
Copy link

I'm getting a similar error. Was originally running 3.9.7 (with full Raspbian and Ux) with no real issues. Tried updating to 3.9.8 and had problems getting it to run. Ended up reformatting my SD card with the latest 'lite' version. Now T-PI 3.9.8 runs but I can't edit the settings:

SettingsError

I am logged in -- was prompted on the settings page.

Doesn't matter what I try to change. It's always bringing up the error that I need to select a value for the sound card. When I try to select one (headphones or HDMI) it just gives an error.

No errors show up in the output when using "screen".

I've tried to overwrite the defaults.cfg and rebooting but that doesn't work for some reason (maybe the file is locked?).

@theyosh
Copy link
Owner

theyosh commented Sep 23, 2020

Hmm, this is getting strange. So, what give the following url as output:

http://[terrariumpi]:8090/api/audio/hardware

This should give all the available sound hardware. Could load the url and make a screenshot?

Also, in your picture, I can't see the choice you made for the soundcard. As I do not have a HDMI choice. Are you maybe revering to the raspi-config? That is different I guess..

@Dcreeron
Copy link

When I go to the requested URL this is the response I get:

{"audiohardware": {"bcm2835 Headphones": {"hwid": 0, "name": "bcm2835 Headphones"}}}

I don't have the HDMI cable plugged in any longer, so I'm not getting the HDMI choice. The Rasp-Pi is in another room near the terrarium.

When I had the HDMI plugged in, the settings screen would come up with no sound card selected -- it said "Select an option". It didn't matter which option I picked, headphones or HDMI, it always gave the error.

This morning when I tried, as shown above, the only option was the headphones. I picked the headphones and changed some of the other settings (temp, distance, volume, etc.) and hit SAVE. It no longer gave the error about the sound card setting, but it did complain about the missing weather url. So I filled that in, hit save again, and it worked!

I'd say these problems are related to having the HDMI cable plugged in. That's the only difference.

@theyosh
Copy link
Owner

theyosh commented Sep 25, 2020

Hmm, that is annoying. I have not tested with a HDMI connected, as I work headless.

But could you do a small test for me? Connect the HDMI again, and load the url http://[terrariumpi]:8090/api/audio/hardware again. Post the outcome here, and disconnect your HDMI. So I can see what the results are when a HDMI device is connected.

Then I can probably fix this also with HDMI connected.

@theyosh
Copy link
Owner

theyosh commented Sep 25, 2020

Also, change your weather url: #417

@Dcreeron
Copy link

I plugged the PI back into an HDMI cable and I get this for the response:

"audiohardware": {"bcm2835 HDMI 1": {"hwid": 0, "name": "bcm2835 HDMI 1"}, "bcm2835 Headphones": {"hwid": 1, "name": "bcm2835 Headphones"}}}

I'll look into the other weather service, but I don't feel like registering right now. The weather field is required on the SETTINGS page, so I can't delete it (i.e., for NO weather).

Our usage of TerrariumPI on my son's Gecko tank is pretty simple. Mainly using it for the web UX and the temp and humidity sensor I wired up. Haven't gotten around to doing anything with the lights or really anything else.

The weather fields being required makes it impossible to just update other fields (like C vs F, etc.).

Thanks!

@theyosh
Copy link
Owner

theyosh commented Oct 5, 2020

Sorry for the delay. I have removed the weather requirement in the settings page. So empty weather should work. But I have not tested this will.

And with the audio hardware you have posted here, is working for me. So I do not know what is causing it not to work for you.

theyosh added a commit that referenced this issue Oct 5, 2020
npinter added a commit to npinter/TerrariumPI that referenced this issue Oct 10, 2020
As mentioned here theyosh#456, the "Data could not be saved" message appears when weather location left empty. You removed the weather requirement in the settings page but it was still mandatory in the terrariumEngine. Just a small code rearrangement :) 

Maybe one can add a live check if weather location is not valid and return a message or change the border color of the input field.
@theyosh
Copy link
Owner

theyosh commented Nov 1, 2020

Is this fixed? As I cannot reproduce...

@Dcreeron
Copy link

Dcreeron commented Nov 1, 2020

Is this fixed? As I cannot reproduce...

Yes, we were able to save with no weather and the audio issue doesn't seem to be an issue any longer.

Thanks.

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

3 participants