Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

OpenNetHomeServer

Questions and comments specific to a particular plugin should go here.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Thanks a lot! Man, you're a mind reader, even before I think it! (Well, OK, I guess that timer I wrote about yesterday might have tipped my hand...) For my part I don't really need to know what's going on behind the scenes as long as the stuff keeps working. Btw what's the format of the new warning? The old one was:

Code: Select all

OpenNetHome.Connection with NetHomeServer lost
So I can put it in as an event.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

They can either of those:

Code: Select all

    "Connection with NetHomeServer TCP interface failed"
    "Failed to connect to NetHomeServer at startup"
This version is only printing a line if there is a socket error, nothing else is done, A re-connection is made if no message is received during a time period 5x socket timeout setting. So if you have 60 sec it will re-connect after 300 sec if no message arrives from ONH. I am testing now with 20 sec means a re-connect after 100 sec if no messages arrives, this seems to work fine.

If it works stable, I will clean up the code and remove/comment out print statements used just for debugging

To summarize the settings for time outs:

- the plugin setting for socket time out is used to define how frequent (1x) the connection with the Tellstick is made as well as (5x) the time out for re-connection if messages stops arriving from ONH
- the action setting for lost sensors is unchanged
Attachments
__init__.py
(83.55 KiB) Downloaded 151 times
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Sounds good, boss! :mrgreen: I'll put it in and let it run, and then I'll let you know what happens. I have had one disconnect with the pervious version, but now I had the self-healing back on, and that worked.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

I still have these:

Code: Select all

13:07:49   Tellstick.FineOffset|1049 'Temp|20.6'
13:07:49   RFXtrx.Type: Viking 02811 id: 2048 ' temperature: +21.3 deg C signal: 5 battery: 9'
13:07:49            Innerstue.: Temperatur: 21.3, termostattemperatur: Av, tidspunkt: Kl. 13:07, den 29.07.
13:07:49            
13:07:52   RFXtrx.Type: Viking 02811 id: 60160 ' temperature: +18.9 deg C signal: 5 battery: 9'
13:07:52            Ute.: Temperatur: 18.9, termostattemperatur: Av, tidspunkt: Kl. 13:07, den 29.07.
13:07:53            
13:07:56   OpenNetHome.Connection with NetHomeServer lost
So 7 seconds between the previuos signal from NHS, and still it thinks the connection is lost. Am I doing something wrong?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

I suspect why, I have a routine that is looking for a keyword named 'Value,'. If you might have messages without this keyword then it can happen that the event gets triggered. On the other hand, I think we do not need that monitoring any longer since we have enough of checks now that we have changed the handling.

Try this one
Attachments
__init__.py
(83.64 KiB) Downloaded 95 times
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Will do, sir! Thanks!
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

No, sorry. This one's not working. It doesn't react at all when contact is lost (the events stop coming in).
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

This is getting hard to understand, first of course why events stops coming in, that is first confusion

Anyway, try this one, I also changed time out to 3x instead of 5x


You should now se 'done' printed frequently in the log
Attachments
__init__.py
(83.95 KiB) Downloaded 86 times
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Downloaded and fired up. Or should I say "done"? :lol: So I'll just wait until the events stop coming in and check what the printout to the log said then?

Btw some of the "done" seem to have a tab in front of them, they are further right than the rest.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

Btw some of the "done" seem to have a tab in front of them, they are further right than the rest.
Interesting, it might be that your events holds some additional white spaces sometimes...

The 'done' means:
- that you just received a new good looking event
- previous 3x time out scheduler has been stopped
- a new 3x time out scheduler has been started

I cross my fingers...and I feel sorry for you with all the problems in the middle of the move
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Normally I find stuff like this stimulating! But as you say, now we're moving, and that's another thing. :mrgreen: Still going strong here.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

And not anymore. No more "done" and signals for a while. My self-healing was off, I thought it was on.

Code: Select all

2016-07-29 18:09:14  EVENT: Tellstick.FineOffset|1152 'Temp|19.8'
2016-07-29 18:09:14  EVENT: RFXtrx.Type: THGN122/123, THGN132, THGR122/228/238/268 id: 58881 ' temperature: +25.4 deg C humidity: 67 %RH status: normal signal: 6 battery: 9'
2016-07-29 18:09:14           INFO: Bad.: Temperatur: 25.4, termostattemperatur: Av, tidspunkt: Kl. 18:09, den 29.07.
2016-07-29 18:09:14           INFO: 
2016-07-29 18:09:14           INFO: done
2016-07-29 18:09:14  INFO: done
2016-07-29 18:09:15  EVENT: RFXtrx.Type: AC address: 008d303a unit: 08 command: off ' level: 0 signal: 6'
2016-07-29 18:09:15  EVENT: RFXtrx.Type: Viking 02811 id: 58624 ' temperature: +22.5 deg C signal: 5 battery: 9'
2016-07-29 18:09:15           INFO: TV-stue.: Temperatur: 22.5, termostattemperatur: Av, tidspunkt: Kl. 18:09, den 29.07.
Then nothing for 8 minutes, and:

Code: Select all

2016-07-29 18:17:15  INFO: reconnect to host
2016-07-29 18:17:15  ERROR: Connection with NetHomeServer TCP interface failed
2016-07-29 18:17:15  EVENT: OpenNetHome.Connection with NetHomeServer TCP interface failed
2016-07-29 18:17:15  INFO: Keep Alive thread ended
2016-07-29 18:17:15  EVENT: E-mail.Sent u"[email protected]: NetHomeServer svarer ikke"
2016-07-29 18:17:15  EVENT: RFXtrx.Type: Viking 02811 id: 58624 ' temperature: +22.5 deg C signal: 5 battery: 9'
2016-07-29 18:17:15           INFO: TV-stue.: Temperatur: 22.5, termostattemperatur: Av, tidspunkt: Kl. 18:17, den 29.07.
2016-07-29 18:17:15           INFO: 
2016-07-29 18:17:16  INFO: connecting to host
2016-07-29 18:17:16  EVENT: OpenNetHome.Connection with NetHomeServer TCP interface established
2016-07-29 18:17:16  INFO: Keep Alive thread started
But no events. It just happened again, but didn't work this time either. Resetting the plug-in and restarting ONH fixed it, though.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

But no events
Do you know if ONH was already saturated at this moment? I mean if ONH was showing error types like this?
2015.10.28 05:17:35.685 WARNING:TCPCommandPort could not send event, TCP stream blocked (TCPCommandPort 12889282, TID16)
If this is the case, there is no chance for the plugin to get events, the TCP stream is blocked in ONH. This is a state that ONH is in and cannot be unblocked from EG (need to report this again to Stefan)

Did you ever try to run ONH outside of the VM?
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

OK, this is wonky:

Code: Select all

20:09:14            
20:09:14   done
20:09:14   Tellstick.FineOffset|1152 'Temp|19.9'
20:09:15   done
20:09:15   ('Request to Unsubscribe: Main-Thread is terminating: ', <threading._Event object at 0x04967B30>)
20:09:16   RFXtrx.Type: Viking 02811 id: 58624 ' temperature: +22.6 deg C signal: 5 battery: 9'
Why would it terminate? It's not done by me.

As for the ONH log, yeah. It's saturating, it seems. Man, this drives me nuts! Why the hell would it suddenly start now, when I've never had any problems before?

Oh, and it still sends stuff through ONH, no problems there.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

Do you have another subscriber to the ONH port in addition to EG?
Post Reply