Reply To: Clarification on XML socket read/write desired 2017-12-21T15:16:25+00:00

HOME Forums Gateways EZSrve Clarification on XML socket read/write desired Reply To: Clarification on XML socket read/write desired

Anonymous
Post count: 35

I decided to let my event reader thread read everything…events and responses. There is separate writer thread for issuing requests. Using this scheme I obviously can’t track response for request…but then again the failure of a light or sprinkler to turn on is in no way catastrophic so I can live with this behaviour for now.

I thought I would show an XML dump which illustrates corrupt XML coming from my EZBridge. There is a null byte at beg of 1st event (just after response from req). As long as I remove this null…code works fine.

parm name=name, parm value=livingRoomLight
parm name=action, parm value=off

Insteon MessageProcessor sending request…
INSTEON REQUEST START:
SendInsteon

0F.AD.81

Off
Off

INSTEON REQUEST END!

event reader:
event reader: SendInsteon
event reader: Sent message
event reader:
event reader:
THE LINE ABOVE IS CORRUPT AND HAS 0x0 in message…fixing it!
fixed:
event reader: SndIns
event reader: 0X2
event reader: 0X62
event reader: 0XF
event reader: 0XAD
event reader: 0X81
event reader: 0XF
event reader: 0X13
event reader: 0X00
event reader: 0X6
event reader:
event reader:
event reader: InsStdMsg
event reader: 0X2
event reader: 0X50
event reader: 0XF
event reader: 0XAD
event reader: 0X81
event reader: 0X9
event reader: 0X38
event reader: 0X32
event reader: 0X2B
event reader: 0X13
event reader: 0X00
event reader:
InsStdMsg Response
FROM: 0F.AD.81 TO: 09.38.32 MSG_FLAGS: 2B CMD1: 13 CMD2: 00

*****shouldAlarm?
insteon device livingRoomLight is off…
LoggingService: Event = Wed May 06 00:21:32 PDT 2009 livingRoomLight off Living room sconce lights was turned off. null
LoggingService: Event = Wed May 06 00:21:32 PDT 2009 livingRoomLight lightOff Living room sconce lights was turned off. null
VoiceLogger: Attempting to speak “Living room sconce lights was turned off.”