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.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

OK, fine, I have the new version running here and it works fine.

I am retrieving and collecting the id's for all "lamps" at startup, building a lookup table. This then gets updated regularly (it follows the setting of the socket time out so if you have 120 sec it will be every 2 minutes) This means that you can add items in ONH while all systems are running and next round the lookup table will be updated.

The format of the action is like the old one. Here is a 'copy as python' of one of my actions:

Code: Select all

eg.plugins.ONH.SendRESTcommand(u'Dummy', u'Give the action a name', u'toggle', 8020)
If you at any time are interested to check the content of the lookup table, you can issue the following command from a script or from the python shell

Code: Select all

print eg.plugins.ONH.plugin.obj_id
I will make a new installable in a few minutes and put it in the normal place (I will delete the previous one)

BR Walter
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Sounds great, man! Thanks! :mrgreen: I will put that into action Monday morning and let you know what happens!
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

@Mastiff,

I have been keeping the system running since last time without problems, the ONH log is empty since I cleared it once testing started

It seems that it is not a bad idea to separate between commands and events, i.e. EG is listening for events on the TCP port but sending commands using REST interface. It might bee that it is possible to disturb the communication on the TCP port if sending and receiving "at the same time", who knows...

Anyway, here it works without problems, switching lamps on/off are fast I think. So how about your setup, any progress, everything is working as expected?
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Hey, are you a f'n thought reader, or something?!??!?! Or maybe you're monitoring my systems through a back dor in ONH? :lol: I was just writing an answer to this thread! I had to wait until today to do anything since Internet fell out at the house I sold (misunderstanding with the transfer of the account)! And now I have implemented it, but I get this on every send:

Code: Select all

Connection with OpenNetHome REST interface failed
I have a sneaking suspicion that it's a port error, or something. Or maybe something has to be configured in ONH itself? I don't see a REST interface under Ports in the setup. Is that it?
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Oh, I have version 2.1-SNAPSHOT-8fde5 of ONH, if that matters.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

You can try if the REST interface is working with a link in the browser like

Code: Select all

http://onh_ip:8020/rest/items
The REST interface is using the web port (8020 default)
I do have the JettyWEB in GUI configured if that matters but if you can browse to ONH the normal way, I think it should work
My version of ONH: 2.1-SNAPSHOT-cc547
This was upgraded about 4 days ago using the nightly build but I think the REST interface has been there since long
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Never mind! Got it working it seems. Took a full restart of the VM, not just restart of the programs. I'll be back with what I find.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Well, so far it's working perfectly! I haven't had one single loss of contact since I implemented it. So I can REST a lot more easily now (yeah, milking that one for all it's worth and more...)! :lol: Weird thing is that it seems to have cured another problem I did have, where all the USB devices (RFX and Tellstick used by EG, USB-UIRT and a USB to RS-232 serial converter for Girder) disconnected from the USB over LAN solution I use. So I think this is a real keeper, master! :mrgreen:
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

Great to hear!
Also here, I cannot see any problems at all. Let's hope for the best long term stability

Take care (and now we hopefully can REST)

BR Walter
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Yeah, hopefully! The question is if you can get Stefan to fix the REST of ONHs port problems! :roll:
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Up and running with Z-Stick through ONH and the PlugIn! :mrgreen: At least I can turn on and off the Fibaro Dimmer 2 that I have now. What I don't get is the dimmer telling me when I turn it on with the wall switch. But I have asked Stefan if it's implemented, and if it is, how I get it working. So I guess I'm officially on the dark side now... But I will NEVER go HomeSeer! That is too dark even for me, and people often call me Darth Vader! :mrgreen:
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: OpenNetHomeServer

Post by krambriw »

Sounds nice!

Seems to me what I hear is that commands are working but what about events from ONH?

When you control a z-wave device, I would expect a notification about this (via an event). So a switch would report its state; on or off. A dimmer should report its level etc. Regardless from where it is controlled, there should be a network event distributed
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: OpenNetHomeServer

Post by Mastiff »

Yeah, I mean the feedback. I don't get that. So I have asked about it on the ONH board. Stefan said there has been little interest for Z-Wave, which is of course because I have't bought Z-Wave until now! :mrgreen:
Post Reply