Thank you Rich, George,
I’ll check the links you supply and maybe get some wisdom.
I meant update OpenHab “Internal Status Database” of all channels statuses in as low iterations as possible.
Querying Channels from OH one by one (thousands) via any communication method would be disaster due to performance. Controllers sends regularly statuses (each several seconds or after change). We already tested it with OpenRemote which have similar method (RPI3 90% busy constantly) - with ten times smaller amount of data.
Lets start from the beginning we have eHouse hybrid version integrating controllers:
- LAN, WiFi (directly receive UDP statuses & send tcp/ip commands) -
- CAN, RF (via gateway over RS232)
- RS-485 (full duplex via uart rs232ttl)
- PRO based on local interfaces (SPI, I2C)
eHouse Hybrid can be run on RPI3 and few other clons and eHouse server software gathering data from all interfaces and pass it further.
So we have:
MAIN THING: HYBRID (All controllers Altogether - thousands of channels combined)
Smaller THINGs:
k*PRO: (more than 2000 channels per controller) outputs (binary) inputs (active, alarm, warning, monitoring, SMS, Silent Alarm, etc)
m*LAN: (about 60 channels each controller) : outpus (binary), dimmers (char), ADCs(int), inputs (binary), IR
n*WIFI: (about 20 channels each controller) outpus (binary), dimmers (char), ADCs(int), inputs (binary), IR
o:RS-485: (about 60 channels each controller) outpus (binary), dimmers (char), ADCs(int), inputs (binary), IR
p*CAN: (about 30 channels each controller) outpus (binary), dimmers (char), ADCs(int), inputs (binary), IR
r*RF: (about 30 channels each controller) outpus (binary), dimmers (char), ADCs(int), inputs (binary), IR
If you mean updating statuses of the things, then channels, then items, this should be virtually instantaneous with openHAB.At least, this is my experience with openHAB.
Best approach would be update all this (combined) statuses in one or few steps to limit communication and increase throughput. Is there a possibility in OH to update complete “thing” status in one iteration (not one channel in single operation) - in any way.
What does “eHouse Server” rely on in terms of communication protocols?
What we already have inside our system:
- broadcast combined status via UDP to local panels (binary form Android/Java) (in LAN / WiFi architecture)
- send via tcp/ip (sockets) in local network or internet for our software panels (binary form Android/Java)
- send combined status as html request to WWW panels (decoded by JS) - data similar as in example below (each line - single room controller)
- update global status to MySQL databases
I mean, what would you like to use between OH and your eHouse Server (telnet, mqtt, etc.)?
I think the best way for sending statuses from eHouse to OH would be UDP or TCP/IP sockets - as large packets as possible. We are developer of eHouse system so we can write any integration protocol to match already available in OH, or write dedicated one. If there is one efficient method of “global status update” we can write algorithms for that, suitable for OH.
Regarding to sending commands from OH to eHouse it could be TCP/IP sockets. We have opened protocol: eHouse TCP/UDP Communication Protocol and it could be simillar way.
We would like to send combined status of all devices in as smal as possible transfers (queries) due to thousands of (chanels):
Example of status - binary hexcoded - text format: (1 controller each line) - almost one bit is single channel
248025B025C02580261025D0277024D025D024B024B0256024F18080001000000000000000000C000DE006DFEFE0101730000000000000000000000000000000000020002000B00030001000100000001000200020000000000010003000320000000A8010000000000000000000000000000632400E60BFE000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E
B23701002B025F026103FF03FF03FF03FF03FF5555010000FFFFFFFF0000000000000000000000000000000000000000000000006DFEFE3701730000000000000000000000000000000500020000000500010001000200010002000200030001000200010003000120000000A8010000000000000000000000000000432440E60BFE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012
B2370203AE025E025803FE03FF03FF022D01640810000073FFFFFFFF0000000000000000000000000000000000000000000000006DFEFE3702730000000000000000000000000000000200000001000900010002000400010003000300030002000100010004000320000000A8010000000000000000000000000000422400E60BFE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
B237030044025F025B039E039803ED03FF036C0000000C00FFFFFFFF0018000000000000000000000000000000000000000000006DFEFE3703730000000000000000000000000000000000020001000500030001000100010003000300030001000200030002000220000000A8010000000000000000000000000000422400E60BFE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
FF55FF5500C8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005555555555555555555555555555551500000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFEDFFDFFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFEDFFDFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000555555555555555555555555555555150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Any sugestion how to do it efficiently?
Regards,
Robert