Maker API POSTing device events dropping events

I'm using the ability of the Maker API to send a POST notification to a URL in order to log temperatures from a number of 'sleepy' ZWave sensors. This is working generally well, but I'm getting inconsistent posts from a few of my sensors.

Looking at the device logs, it appears that when the temperature remains constant, the Maker API doesn't bother to POST the measurement. I can see the measurement in the device log, but no POST is done. This makes it hard to tell if the temperature has remained constant or if the sensor has failed in some way (like if I have put the sensor too far from the hub). I could manually go check the log, but I'd rather not do that all the time.

Is there some way to tell the Maker API to go ahead and POST, even if the measurement hasn't changed?

(by the way, the sensors involved are Aeotec aërQ temperature/humidity sensors)

1 Like

When you say in the Device Logs, are you meaning you have turned on some kind of logging for the device, like info or debug logging, and are looking in the general Logs page for the HE hub, or are you referring to Events you are seeing when clicking on the Events button at the top of the page for the Device?

Typically if the state for the device, i.e. in this case the temperature, does not change, an Event is not registered and so would not (I believe) trigger the posting of a message via Maker API. I believe there are ways to override this default behaviour in the driver code, but please read on if that is what you are suggesting...

I would be cautious about requesting an Event to be registered each time a temperature reading is received, as that could have other consequences, such as triggering of rules based on the temperature reading, depending on how the rules are setup. I would recommend looking for other methods to record successful communications, whether that be existing information recorded or requesting a new attribute or data point, such as a timestamp for the when the last message was processed.

2 Likes

I was looking at the device-specific log information linked from the top of the device detail page. I actually hadn't tried events, but you are correct that an event hadn't been logged for readings when the temperature hadn't changed. I don't see a problem in my situation if it generates an event on each reading (every 15 minutes or so) and potentially checks on the rules. So maybe what I'm really asking for is the ability to optionally generate an event on each reading regardless if the value hadn't changed.

The only way I can think of around this is for my application to query the device periodically, which is what I wanted to avoid. I already have good timestamps on everything. But now that I know how this behaves, perhaps I can adjust my own expectations regarding data logging.

Thanks for the help and advice!

1 Like

This exactly.

There definitely are, and akin to your thoughts, I also don’t recommend this approach.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.