Suggestion: Master slave configuration

Functionality and usage of the OpenNethome Server
Post Reply
ewallquist
Posts: 9
Joined: Tue Dec 16, 2014 2:46 pm

Suggestion: Master slave configuration

Post by ewallquist »

HI!

Since I live in a house I have been having some problems from time to time with the range of my sensors and also to some of my switches. I am not a developer so I am better off at giving ideas and since I like the idea of controlling it all from one place I would like to suggest the idea of a master slave configuration of nethome, i.e on the master you add another nethome server and the you get "all" that servers items and can control and read them from the master.


BR

/Edward
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Suggestion: Master slave configuration

Post by Nasty76 »

Hi Can i ask do you use nexa system? good antenna extend range much , aureal 433mhz antenna extend signal alot , i use 17,3cm copper wire to my tellstick duo antenna and 2 floor 100m2 house is fully covered. But yeah that repeater mode is nice feature too.
ewallquist
Posts: 9
Joined: Tue Dec 16, 2014 2:46 pm

Re: Suggestion: Master slave configuration

Post by ewallquist »

Hi!
Thanx for the tip, I use a mixed system with a tellstick duo as sender/receiver so could try with a new antenna. Did you remove the old tellstick antenna and just replaced it with a coppar wire or is the old antenna attached to the coppar wire?
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Suggestion: Master slave configuration

Post by Nasty76 »

Well yeah i use orginal tellstick duo antenna where spiral join soldered body i solder new electric copper wire there , and turn end 180 degree which make antenna better signal not escape in tip and antenna use full power.
https://www.dropbox.com/s/cdy3fs7qt1n2d ... 2.jpg?dl=0
if i remember right that 17,3cm lenght is overal length after 90degree turn.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Suggestion: Master slave configuration

Post by stefangsbb »

To increase the range of the transmitter/receiver is of course the easiest solution.

I have been discussing a master/slave setup with other users, but then it was for a setup with one server at the summer house and one at home that should behave as one system.

In your case an other option might be to just connect a second Tellstick to the same server with a long USB-cable to another location in the house. NetHome supports multiple devices. The problem usually is that they will both transmit and receive the same things at the same time, so if they are too close, the two transmitters will interfere with each other. One solution is to use switches with different protocols in the different areas, so you can configure each transmitter to only transmit one protocol.
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Suggestion: Master slave configuration

Post by Nasty76 »

Usb cable is little problematic, max lenght passive cable is 5meters , and active usb cables are expensive.
Btw that my tellstick is so weird with range 10-20cm movement make 1-10 meter range changes so maybe relocation tellstick you can manage that range problem.
ewallquist
Posts: 9
Joined: Tue Dec 16, 2014 2:46 pm

Re: Suggestion: Master slave configuration

Post by ewallquist »

As I said, it is just a suggestion, when I have some time over I will try to replace the antenna and see if that will increase the range. I actually had an idea a couple of months ago to use tcpcommandport and bash scripts to make to servers talk with each other but that would create to long delays when activating a controller since I would have to manually poll the action from one server before I could send it to the other, that is when I got the idea of a master/slave setup. This would also make the system scalable for larger buildings...

However, it is just a suggestion, and not crucial, however I am happy that I got all responses with alternative solutions.
krambriw
Posts: 86
Joined: Sun Jan 04, 2015 8:48 am

Re: Suggestion: Master slave configuration

Post by krambriw »

Hello everybody,

New to this forum but been around a while, mainly active in the EventGhost forum. I think regarding the idea of having a master-slave system like mentioned, the easiest and most flexible could be to use a message broker like MQTT.

I have myself an OpenNetHome (ONH) server running in a RPi and in the same, the Mosquitto as MQTT broker. The link between ONH and MQTT is a python script I wrote. It receives/sends events from/to ONH via the well-known TCP/IP interface. Events generated by ONH are published in an "outgoing" topic and made available to all subscribers. To send a command to ONH, you just publish this in a dedicated topic for "incoming".

If you would have multiple ONH servers running, you could "easily" bind them all together via one common MQTT broker. In my case, obviously using Eventghost, I subscribe to the ONH subjects using a MQTT Client plugin.

Typically, events from ONH in my EventGhost looks like this:

Code: Select all

15:56:19   MQTT./nethomeserver.['event', 'Oregon_Message', 'Direction', 'In', 'Oregon.Channel', '2', 'Oregon.Id', '2', 'Oregon.LowBattery', '0', 'Oregon.Moisture', '65', 'Oregon.SensorId', '7456', 'Oregon.Temp', '-7', 'Value', '']
Events like this can be used to trigger any other macro in EventGhost. You could therefore even turn on/off devices belonging to other technologies controlled by EventGhost (like Z-Wave and others)

Commands sent to ONH could look like this:

Code: Select all

'call,Kitchen Lamp,toggle'
Such commands could be sent when triggered by any other kind of event. Imagination is setting the limits...

With possibilities as described above, it would of course also be possible to let EventGhost be the master with a number of slaves running ONH (drawback is that EventGhost is only running under Windows and configuration will require some heavy effort...). The best would instead be if ONH was supporting MQTT natively...

Best regards, Walter
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Suggestion: Master slave configuration

Post by stefangsbb »

Don't get me wrong Edward, it is an excellent suggestion and I have as I said been discussing it before. The reason I suggested alternative solutions is that I don't think I will have time to implement it right now... The implementation would be along the lines you suggested, with a TCPCommandPort in the slave system and a client component in the master system. It will however require some changes in the core api:s to expose the mechanisms for listing all instances and opening instances so Items in the slave system can appear as Items in the master system.

The next step after that would also be to do as Walter suggests, to use an open standardized protocol such as MQTT to tunnel the requests, which would allow more advanced distributed solutions and easier integration with external systems.

master/slave configuration is quite high on the very long list of nice stuff I would like to implement...
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Suggestion: Master slave configuration

Post by Nasty76 »

First what i get my mind how about some ssh bridge? and nethome send commands via that bridge?
but not sure if that is 2 way?
i use ssh to execute commands my video recorder server.
Post Reply