Re: [mh] xAP vs Proxy
Stephen Switzer <[email protected]>
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <CALSXUc0jVu53gdhpwW-xArZVVsNgXajRoc02epnQ9GjYLiLPDg@mail.gmail.com> |
(Odd that replies in this list default to replying directly. Anyone want to
update this?)
I've been playing with this quite a bit this afternoon and have XAP debug
tuned on, and can see MH sending object state information to the network. I
read on the format a bit and copied one of the messages and edited it to
use a different UID and used nc to broadcast it to the MH box. tcpdump
shows that the messages are getting there, but nothing is logged by MH. I'm
using this in user code:
$xap_monitor1 = new xAP_Item;
$xap_monitor1->tie_event('print_log "xap data: $state"');
I see things like this in the log:
db5 xap msg: xap-header
{
v=12
hop=1
uid=FFE90000
source=mhouse.mh.misterhouse.core
class=mhouse.item
}
mhouse.item
{
set_by=time
name=$v_http_control
state_prev=Check
state=Check
mh_target=
}
...but nothing indicating that the data I sent was received. I must be
overlooking something, but... can't figure it out. Yet. Eventually, I'm
thinking of having my laptop participate, but it's on a different
vlan/subnet. I don't want to add that layer of complexity yet.
Steve
On Tue, Nov 24, 2020 at 2:05 PM H Plato <[email protected]> wrote:
> The nice thing about xAP is that its ‘broadcasty’ so there is no impact on
> intermittent devices. There’s also a windows xap message viewer out there
> (similar to Bonjour browser), however the tech is pretty old so I don’t
> know if it runs on Win10.
>
> I’m not even sure frankly what that ipaddress_xap does. I just took the
> config files from my working setup :)
>
> On Nov 24, 2020, at 11:59 AM, Stephen Switzer <[email protected]> wrote:
>
> Thanks for the reply and confirmation! I don't understand xap basics yet.
> Is it UDP based? I noticed that the secondary instance has no broadcast
> address, but isn't this one sending item state data to the main instance?
> If I want to run the secondary on my laptop occasionally for development,
> do I need to comment anything out on my main instance so it doesn't look
> for the laptop constantly?
>
> Sorry, noob here. LOL
>
> Steve
>
> On Tue, Nov 24, 2020 at 1:00 PM H Plato <[email protected]> wrote:
>
>> Yup, I use this to syncronize objects in two instances. I have one
>> instance for items that are network based and could have pauses (like
>> venstar or razberry), and then a master loop that has the primary logic.
>> xAP synchronizes item state and speech events
>>
>> Been running this way for years. From what I recall:
>>
>> 1. I use ubuntu.
>> 2. I use a xap-hub from 2002 that Patrick Lidstone created (I have the
>> source if needed)
>> 3. my mh.ini xap settings:
>>
>> #master instance
>> # Xap Control
>> xap_disable= 0
>> xap_nohub = 1
>> xpl_disable= 0
>> xap_echo_all = 0
>> xap_echo_speech = 1
>> xap_echo_mhspeech = 1
>> xap_enable_items = 1
>> ipaddress_xap=192.168.0.x
>> ipaddress_xap_broadcast=192.168.0.255
>>
>> #secondary instances
>> xap_nohub = 1
>> xpl_disable= 0
>> xpl_nohub = 1
>> xap_echo_all = 0
>> xap_echo_mhspeech = 1
>> xap_enable_items = 1
>>
>> 4. The items need to have the exact same name in both instances
>>
>> On Nov 24, 2020, at 10:29 AM, Stephen Switzer <[email protected]>
>> wrote:
>>
>> I've been trying to refresh my memory on something I did 10+ years ago. I
>> had an instance of MH on my laptop that monitored the motion sensor of my
>> main MH instance and reacted to it, etc. I was looking and the proxy code
>> and discovered that this really only works with serial items, so I have to
>> re-create the code from the serial layer on up.
>>
>> I then discovered the xAP explanation (
>> https://github.com/hollie/misterhouse/wiki/xAP) and realized that object
>> states and voice commands can be synchronized. I'm not quite understanding
>> this idea. Can someone share a working implementation? It should be of an
>> instance that can sometimes run, but usually will be off.
>>
>> Other ideas?
>>
>> Thanks!
>>
>>
>> --
>>
>> Best regards,
>> Steve Switzer
>>
>> ---
>> Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget!http://www.sbsROC.com <http://www.sbsroc.com/>
>>
>> ________________________________________________________
>> To unsubscribe from this list, go to:
>> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>>
>>
>>
>
> --
>
> Best regards,
> Steve Switzer
>
> ---
> Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget!http://www.sbsROC.com <http://www.sbsroc.com/>
>
> ________________________________________________________
> To unsubscribe from this list, go to:
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>
>
--
Best regards,
Steve Switzer
---
Get world-class business I.T. services and a phone system with awesome
features that won't challenge your budget!http://www.sbsROC.com
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users