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
Re: OpenNetHomeServer
Well, I remember I had problems with the MQTT setup when I first started to use ONH and EG, which I think is why I started using this plug-in. I belive it crashed with something else on my system, at least it never worked as it should (maybe because of the VM setup?). But if you could send by another interface that sounds brilliant!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Just hang on, I have a new version to test in a few minutes. It has a new action, SendRESTcommand, and it works in the same way as the SendCommand but it uses the REST interface. It seems to work fine here. The good part is that the TCP port will only be used for EG listening to events and the REST when EG want's to send events. Should take care of eventual collisions or other disturbances that might happen on the TCP port...
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Very inteRESTing, thanks!

-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
There is a new one uploaded in the normal place
I have just to verify also changed my actions to use the new REST based ones and it is working perfect. Unfortunately you have to replace your existing ones with new types as well, hopefully not too many to add
Let's see if this kills ONH in your setup or if it survives
I have just to verify also changed my actions to use the new REST based ones and it is working perfect. Unfortunately you have to replace your existing ones with new types as well, hopefully not too many to add
Let's see if this kills ONH in your setup or if it survives
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
You are a funny guy!
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Regular comedian I am!
Thanks! I will implement this tomorrow for test, since I don't dare to mess with the system when the buyer's home. 
Re: OpenNetHomeServer
OK, slightly confused... I replaced the plug-in and made an example send, which came out like this:
I could see that it sendt because the RFX logger showed the button in use. And that's the same code as I have had before. Do you mean that I need to change something in ONH itself?
The actual code I use to send off to an oven (with variables) is this:
Code: Select all
eg.plugins.ONH.SendCommand(u'Ovn 1', u'Give the action a name', u'toggle', 8020)The actual code I use to send off to an oven (with variables) is this:
Code: Select all
eval("eg.plugins.ONH.SendCommand(u'Ovn "+str(Rom)+"', u'', u'off', 8020)")-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Well, that's not correct, when you are sending like that you use the "old" standard and the TCP port
The new action looks like this example (copy as python)
The '77' is the id of the item in ONH
So for all your commands, you need to adopt the new format
The new action looks like this example (copy as python)
Code: Select all
eg.plugins.ONH.SendRESTcommand(u'Dummy', ('77',), u'Give the action a name', u'toggle', 8020)So for all your commands, you need to adopt the new format
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Easiest to get the new format I think is to create a new SendRESTcommand for each, then copy as python to get the correct syntax
For your example, I think something like this:
where XY is the id in ONH of the device
For your example, I think something like this:
Code: Select all
eval("eg.plugins.ONH.SendRESTcommand(u'Ovn "+str(Rom)+"', ('XY',), u'', u'off', 8020)")My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
Oh yes, and in ONH you should not need to change anything
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Ah, I was writing while you were posting the second message. And the third message... I was thinking something like this:
Does that look correct? The problem is that the whole system builds on room numbers, so I can't have a separate on and off for each of the commands, I need to use a synax like the one I already have, or it's hours and hours of work again...
Code: Select all
eval("eg.plugins.ONH.SendRESTcommand(u'Ovn "+str(Rom)+", u'off', 8020)")-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
No it does not, how I built the new action we are depending on the id of the device from ONH (this is required when using the REST interface) But I also understand that you do not have the id available from your script. And since it is dynamic with room numbers, we can't just hard code it for each command.
One question: Are possible device names that you set with "Ovn "+str(Rom) defined as devices in ONH? If so, I will try to rewrite the action so that you can keep your old syntax like
I will make a plugin internal lookup table device name <-> device id
One question: Are possible device names that you set with "Ovn "+str(Rom) defined as devices in ONH? If so, I will try to rewrite the action so that you can keep your old syntax like
Code: Select all
eval("eg.plugins.ONH.SendRESTcommand(u'Ovn "+str(Rom)+"', u'', u'off', 8020)")My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Yeah, there is a system. All the ovens are Ovn 1 to Ovn 20, and the amps are Lydsone 1 to Lydsone 20. But do you mean the ID's that show in the XML for ONH? because I thought they changed from time to time. Maybe they don't do that?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: OpenNetHomeServer
What ever, if they would change, I will make a solution that keeps itself updated, it will anyway be invisible to the end user
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: OpenNetHomeServer
Great!
Oh, you are in no hurry, I'm pretty sure the buyer is home now, so I wont mess with anything more until Monday. I'll just let it flow without the offenting sends.