genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
388 stars 154 forks source link

Cannot seem to change 142 Email Account program options #367

Closed yorlik-too closed 5 years ago

yorlik-too commented 5 years ago

Expected behavior

Configuration->settings->email account, click on Options icon, change settings, exit or restart

The changes expected to take place

Actual behavior

Steps to reproduce the problem starting from a fresh install

1.set options to gmail account, port 465, SSL true 2.Send fails, so change options to port 587, SSL false 3.Send still fails, check log and it still shows 465 & SSL true no matter how many times I change the options

Specifications

Additional configuration notes

Have tried it on 2 different Pis. have deleted prog 142, re-imported it (becomes pid 1003), have deleted under programs/142.dll.mdb & 1003.dll.mdb, none make any difference. Even with .dll.mdb deleted, the core original options is STILL there - I must not know the file to change or delete.

Lastly, simple mono EmailTester.exe pi routine works on both pi's and sends the emails.

tuicemen commented 5 years ago

From a fresh install of HG on a fresh Pi Image, if you set the info to gmail account, port 587, SSL false do those setting stick!

I don't use Gmail but port 587 and SSL true

yorlik-too commented 5 years ago

Tuicemen, if I cannot figure out what file stores the non changing data then I will have to start new again and see.

I THINK it was 587 & no SSL that finally worked - until I rebooted. it may have been 587 with SSL. After 200 tests I don't recall exact settings on port/ssl. I do not look forward to writing new SD cards 200 more times to experimentally find a set of parameters that work. (:

tuicemen commented 5 years ago

When you removed the email program from HG did you go to maintenace remove modules and remove the email program from there as well? If not when you reinstall it HG sees the old settings and pulls those in. One other thing you can try is resetting GH to factory settings. Then enter your email settings.

yorlik-too commented 5 years ago

Great ideas! I will try them today when I get a chance

bkenobi commented 5 years ago

Just a general comment and not a diagnostic in any way. Programs have different ID's on different systems depending on what order things get installed. When referring to a program that others are being asked to help with, it would be helpful to provide the name of the program (and even a link to it if it's not a standard install) and not the ID number.

yorlik-too commented 5 years ago

Did config->maint->config&data-> Factory Reset.

That did NOT delete any programs (my test email program for instance). It may have deleted the data in options under settings page but I have had too many other distractions to be sure. I did put in a different email set of data (gmx.com instead of gmail.com) and tried it: log shows SAME gmail account data as before.

I do not know why I cannot change the email account data but it seems I need to find where it is stored to delete it by hand. I downloaded the usr/local/bin/homegenie complete directory and searched inside all files for the words gmx.com and they do not exist. So I assume the options data must be stored as hex? I will search next inside all files for gmx.com in hex... done. no gmail.com (676d61696c2e636f6d) or gmx.com (676d782e636f6d) found in homegenie directory. Time to look from root out...

I do not understand why my setup is different than everyone elses? Or is this a bug no one has found? Everyone else was able to enter the correct data the first time and so do not know this is an issue?

yorlik-too commented 5 years ago

bkenobi thanks for heads up. I have found that any IMPORTED programs get loaded with sequential pid no. beginning with 1000. It appears we are not allowed to enter any pid no. less than 1000. I have tried to list the .hgx complete name when referring to programs.

mralapete commented 5 years ago

My suggestion at this stage is

  1. A fresh install of Raspbian Lite
  2. Update and upgrade Raspbian
  3. Install Mono 5.4 from the Mono project
  4. Install HG from official sources ie HG Bounz edition or homegenie.it

Once you have completed this go straight to your Email Account program and use the following settings settings and ensure they take

Email Account program in homegenie settings:

  1. E-Mail address: @gmail.com
  2. SMTP Mail Server address: smtp.gmail.com
  3. SMTP username: @gmail.com
  4. SMTP password:
  5. SMTP Mail Server port: 587
  6. SMTP Mail Server use SSL: TRUE

Alternatively you can keep experimenting with your current setup but from what I'm reading it doesn't look too promising. The above method in the end will work and will be a lot quicker.

yorlik-too commented 5 years ago

Gene, since I seem to only get one chance to enter email account information, and for some reason my normal settings as used in my working thunderbird programs do not work, could you please tell me which file holds that email account data? With that, I could modify it directly instead of using the Optons button, which does not work for either of my HG setups. Thank you.

yorlik-too commented 5 years ago

Short of knowing the file name holding the email account info, if you make the factory reset routine also delete that information I could try different account infos by doing a reset. As of now, a factory reset on my HG does NOT clear that info. Thank you.

yorlik-too commented 5 years ago

This thread can be closed with success! I found the file holding the email account data (systemconfig.xml) in base64 code. I compared the strings to my working test pi, found them different, copied them into my non working HG folder - and still did not have email success, even after restarts and reboots. But after upgrade from stable.37 to stable.39 FIXED it! Email working!