After
my first attempt I got some negative feedback before my way to use the (undocumented) API. Now I followed the same usage of the Apps to read the data for my system and it works great:
The data I got from the system for this sunshine intensity sensor looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<eventPollResponse xmlns="urn:overkiz:externalapi"><events><event name="DeviceStateChangedEvent"><setupOID>xxx</setupOID><deviceURL>io://yyy</deviceURL><deviceStates><state name="core:LuminanceState" type="2" value="50.0"/></deviceStates></event></events></eventPollResponse>
This dataset is delivered only if the value had changed, which is much better as my first version which ask's itself every minute. Using the intelligence of the backend system saves much storage in Splunk Storm.
At the moment the Splunk commands
xpath and xmlkv are not supported in Splunk Storm, but that isn't a problem because the important "value" is a key value pair. But my logger is listening to all the data, so I get much more details about whats going on with my roller shutters and so on. For example a message for roller shutter state change:
<?xml version="1.0" encoding="UTF-8"?>
<eventPollResponse xmlns="urn:overkiz:externalapi">
<events>
<event name="DeviceStateChangedEvent">
<setupOID>xxx</setupOID>
<deviceURL>io://yyy</deviceURL>
<deviceStates>
<state name="core:ClosureState" type="1" value="78"/>
<state name="core:OpenClosedState" type="3" value="open"/>
</deviceStates>
</event>
<event name="DeviceStateChangedEvent">
<setupOID>xxx</setupOID>
<deviceURL>io://yyy</deviceURL>
<deviceStates>
<state name="core:ClosureState" type="1" value="73"/>
<state name="core:OpenClosedState" type="3" value="open"/>
</deviceStates>
</event>
</events>
</eventPollResponse>
Now I could follow the movements of my roller shutters with Splunk! But that is also a function of the system itself. The interesting point is to combine the sunshine intensity, room temperature and the roller shutter state to optimize the usage. At the moment the temperature (and humidity) sensors in the rooms are missing....