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.
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Sorry, logging of those additional things will go to the EG log view
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
OK, no problem. I use Log redirector, so I have file logging. 
Re: OpenNetHomeServer
And here we go. I have attached the log so far, and it already has lost stuff. 
- Attachments
-
- Lost contact log.txt
- (160.89 KiB) Downloaded 90 times
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
I see the problem (but I do not yet know why)
Your system is for some reason not able to cancel scheduled tasks so it is just adding new ones for every sensor signal that is incoming. After 20 minutes they all begin kicking in and you get hammered by the 'lost sensor' events from then on.
If you look at a sample from my log, you can see how it should work
Attached a new version trying to track this cancelling problem
Your system is for some reason not able to cancel scheduled tasks so it is just adding new ones for every sensor signal that is incoming. After 20 minutes they all begin kicking in and you get hammered by the 'lost sensor' events from then on.
If you look at a sample from my log, you can see how it should work
Code: Select all
19:47:21 NHS.Oregon|112|4| 'Temp|5.0|Hum|58|Batt|0|'
19:47:21 Successfully cancelled task: (1454525798.612, <bound method Scheduler.LongTask of <Scheduler(SchedulerThread, started 16700)>>, ('Lost contact with sensor: Oregon|112|4|', <bound method NetHomeServer.sensorLost of <eg.CorePluginModule.NetHomeServer.NetHomeServer object at 0x04ADCED0>>), {})
19:47:21 Successfully scheduled task: (1454525841.4920001, <bound method Scheduler.LongTask of <Scheduler(SchedulerThread, started 16700)>>, ('Lost contact with sensor: Oregon|112|4|', <bound method NetHomeServer.sensorLost of <eg.CorePluginModule.NetHomeServer.NetHomeServer object at 0x04ADCED0>>), {})
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
And here's the results. 
- Attachments
-
- NetHome error log 2.txt
- (452.73 KiB) Downloaded 44 times
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Sorry, my fault, need to retry with this version instead
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Retried for half an hour. 
- Attachments
-
- EventGhost_Log.txt
- (221.82 KiB) Downloaded 46 times
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
OK, it looks like there is a problem with cancelling scheduled tasks (we get this INFO: <p>Error: <type 'exceptions.ValueError'></p> all the time, means the schedule cannot be found)
Just to check if I have a problem inside the plugin or if there is a general problem, can you try to run the following script and see what happens? If it works as expected you should see that the scheduled task is cancelled right away
Just to check if I have a problem inside the plugin or if there is a general problem, can you try to run the following script and see what happens? If it works as expected you should see that the scheduled task is cancelled right away
Code: Select all
def sensorLost(prm):
print 'Sensor lost', prm
monitored = eg.scheduler.AddTask(
5,
sensorLost,
'Testing'
)
if monitored <> None:
print 'Successfully scheduled task: ', monitored
eg.scheduler.CancelTask(monitored)
print 'Successfully cancelled task: ', monitored
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Seems like it's in the plug-in, I'm afraid:
Code: Select all
10:29:34 Successfully scheduled task: (1454578179.6619999, <bound method Scheduler.LongTask of <Scheduler(SchedulerThread, started 3448)>>, ('Testing', <function sensorLost at 0x0AA35630>), {})
10:29:34 Successfully cancelled task: (1454578179.6619999, <bound method Scheduler.LongTask of <Scheduler(SchedulerThread, started 3448)>>, ('Testing', <function sensorLost at 0x0AA35630>), {})-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
OK, that is anyway better, now I know it is inside the plugin
Can you try the following:
- use the attached version and check what is being printed when a sensor event is coming in
- run this python script and copy & paste the result -> so I can study what is actually scheduled
Best regards, sorry for the inconvenience
PS A pity I do not have a Viking sensor, might be the next to fix
Can you try the following:
- use the attached version and check what is being printed when a sensor event is coming in
- run this python script and copy & paste the result -> so I can study what is actually scheduled
Code: Select all
print eg.plugins.NetHomeServer.plugin.monitor_fineoffset_mem
Best regards, sorry for the inconvenience
PS A pity I do not have a Viking sensor, might be the next to fix
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Hey, you make nice stuff that is very useful to me! So I'm glad I can at least do something.
Sensor input:
And all I get from the print is an emtpy set of curling brackets. {}
Sensor input:
Code: Select all
11:25:52 Error: <type 'exceptions.ValueError'>-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
OK, thanks,
And if you run this script:
And if you run this script:
Code: Select all
print eg.plugins.NetHomeServer.plugin.decode_fineoffset_mem
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Same result. I take it you had expected something else?
Oh, about the Viking: They sell them quite cheaply at Teknikmagasinet.
I just sendt the new version of it Bert for the RFXtrx (wrote about it in your RFX plug-in thread), since the RFX didn't play nice with it. He was hoping to add support for it. So when he has a firmware that does that, maybe you could be so kind to update the plug-in? 
Oh, about the Viking: They sell them quite cheaply at Teknikmagasinet.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Oh, now I am getting worried
When I run a similar script
I get
I think there is a problem in adding sensors to the dictionaries
Finally, before I go a get a Viking, can you try this attached version? It will most likely crash but hopefully give a clue where it fails
When I run a similar script
Code: Select all
print eg.plugins.NetHomeServer.plugin.decode_oregon_mem
Code: Select all
{'Oregon|112|4|': 'Temp|4.4|Hum|54|Batt|0|', 'Oregon|2|2|': 'Temp|-2.1|Hum|84|Batt|0|'}
Finally, before I go a get a Viking, can you try this attached version? It will most likely crash but hopefully give a clue where it fails
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
You know how to instil confidence! "It will most likely crash." Just the thing I want to hear!
Code: Select all
12:17:53 Exception in thread Tellstick:
12:17:53 Traceback (most recent call last):
12:17:53 File "threading.pyc", line 532, in __bootstrap_inner
12:17:53 File "C:\Program Files (x86)\EventGhost\plugins\NetHomeServer\__init__.py", line 451, in run
12:17:53 self.FineOffsetMessage(fineOffsetMsg)
12:17:53 File "C:\Program Files (x86)\EventGhost\plugins\NetHomeServer\__init__.py", line 581, in FineOffsetMessage
12:17:53 decode_param = self.plugin.decode_fineOffset_mem[s_lst]
12:17:53 AttributeError: 'NetHomeServer' object has no attribute 'decode_fineOffset_mem'
12:17:53
12:17:56 Exception in thread Tellstick:
12:17:56 Traceback (most recent call last):
12:17:56 File "threading.pyc", line 532, in __bootstrap_inner
12:17:56 File "C:\Program Files (x86)\EventGhost\plugins\NetHomeServer\__init__.py", line 451, in run
12:17:56 self.FineOffsetMessage(fineOffsetMsg)
12:17:56 File "C:\Program Files (x86)\EventGhost\plugins\NetHomeServer\__init__.py", line 581, in FineOffsetMessage
12:17:56 decode_param = self.plugin.decode_fineOffset_mem[s_lst]
12:17:56 AttributeError: 'NetHomeServer' object has no attribute 'decode_fineOffset_mem'
12:17:56