Page 2 of 2

Re: Socket error

PostPosted: Fri Feb 01, 2019 3:24 am
by msageryd
I have now also confirmed that only the DCS plugin listens to port 4025. Maybe I should have confirmed this earlier on, but if there was a clash (if it's even possible) I think this would result in much bigger problem.

Code: Select all
$sudo lsof -nP -i4TCP:4025
IndigoPlu 32596 michael    8u  IPv4 0x60fa6292f1c53547      0t0  TCP 10.0.0.14:53968->10.0.0.13:4025 (ESTABLISHED)

Re: Socket error

PostPosted: Fri Feb 01, 2019 3:33 am
by msageryd
@Monstergerm
Thought I'd give the sleep(2) a go.. I do program for a living, but I have never touched Python. Where do I find the plugin.py file? Is it bundled in an editable fashion in the DSC Alarm.indigoPlugin file? Or do I need to download the source and somehow rebundle or compile it after my code change?

Re: Socket error

PostPosted: Fri Feb 01, 2019 7:22 am
by FlyingDiver
msageryd wrote:
@Monstergerm
Thought I'd give the sleep(2) a go.. I do program for a living, but I have never touched Python. Where do I find the plugin.py file? Is it bundled in an editable fashion in the DSC Alarm.indigoPlugin file? Or do I need to download the source and somehow rebundle or compile it after my code change?


DSC Alarm.indigoPlugin is a wrapper (folder). plugin.py is in the wrapper. Use Finder to "show contents" or open the entire wrapper in a programming editor like BBEdit or TextWrangler. Don't use TextEdit.

Re: Socket error

PostPosted: Fri Feb 01, 2019 11:10 am
by Monstergerm
Yes, very easy to make changes. I just right-click on plugin, select "show package contents". Then it is just a regular folder.
Open plugin.py file with Textwrangler or BBEdit, make changes, save, reload plugin.
Optionally also open info.plist file and change version number to e.g. 2.2.2.1 to keep track of your changes.

I would also post your problem on the EyezOn forum to get a different audience.

And if you want to get into the nitty gritty of the programming of the EVL-4 you can take a look at the instructions in TPI-1-08 manual.

Re: Socket error

PostPosted: Sun Feb 03, 2019 9:06 am
by msageryd
lanbrown wrote:
In my case, I have the serial console server performing the keepalives. I also have the plugin do a query on the panel periodically to make sure the connection is there.


@Ianbrown. How to you "query the panel"?

Re: Socket error

PostPosted: Sun Feb 03, 2019 11:27 am
by Monstergerm
I have to ask again, are you sure there is no previous installation or software contacting the EVL-4? Your problem sounds exactly what happens when you upgrade to a new computer and leave the plugin running on the old one.
Is this a brand new EVL-4 tested for first time on a Mojave system?
Can you do a test install on Sierra or El Capitan?
I would not exclude that there is something going on with Mojave and socket connections. At one point Indigo at a problem with its serial.py library and caused socket errors. Did you talk to Matt about your problem?
Do you see anything interesting in the log when you turn on Intense Debugging?

Re: Socket error

PostPosted: Sun Feb 03, 2019 11:42 am
by msageryd
Thanks for your input.

I wiped the MacMini for the sole purpose of becoming a home automation server. Downloaded Mojave onto a usb stick. Booted on the stick. Used DiskUtility from the stick to remove the old partition, create a new one and format it.

I installed the EVL new from the box into my DCS 1864. I have never had an EVL in my system before.

The only thing I have done with Mojave on this machine is:
- os upgrades
- installed Indigo 7.2
- installed Homebrew
- Installed Postgres 10.6 with Homebrew
- Installed a couple of plugins in Indigo:
* DCS
* Grafana Home Dashboard, including InfluxDB
* Netatmo Welcome
* SQL Logger
* UPS and battery monitor

If there somehow were multiple instances of the DCS plugin I should see the socket as an open file with the **lsof** command, should't I?

Both OSX and the EVL has been restarted a couple of times since i installed them.

The place where I bought the EVL reached out and told me to send the EVL back and they'd send me a new device. This seems like the easiest way to go forward before reinstalling the OS completely.

Re: Socket error

PostPosted: Sun Feb 03, 2019 4:59 pm
by siclark
Slightly off topic but why use homebrew for postgres? If for sqllogger you can just use postgresapp. Saves messing with your python install.


Sent from my iPhone using Tapatalk

Re: Socket error

PostPosted: Sun Feb 03, 2019 11:35 pm
by msageryd
I’m working with Postgres in my work. Guess I installed it with Hb by habbit. Do you mean that pg exists as an app in appstore? I didn’t know that ☺️

Re: Socket error

PostPosted: Mon Feb 04, 2019 12:50 am
by siclark
Not in app store but yep.

https://postgresapp.com/


Sent from my iPhone using Tapatalk

Re: Socket error

PostPosted: Tue Mar 05, 2019 12:00 pm
by msageryd
I just wanted to ping back to those who are interested.

In the past couple of weeks I haven't had any errors from the DCS communication. This is good news, of course, but also troublesome. I haven't made any changes to the system related to DCS. This is what I have done:

- Upgraded other plugins (Grafana, Netatmo, MatPlotLib)
- Mojave security patch

I'll have to believe that the Mojave patch fixed the problem, otherwise I have no clue.

A big thanks to everyone in this thread for your input.