So I think I've made a lot of progress. I've managed to come to an understanding about creating triggers, and have successfully created a few that fire off when there is a data change from the Mosquito server on my Pi.
That leaves the info needed for the Shims devices. When I started all this, I decided to work on the "time" data, since it seemed to me clear that it wasn't a JSON field, and I could test out a bunch of stuff without having to worry about how to configure JSON fields. And the "time" field changed a LOT, so it wouldn't take long to see if I had things setup correctly or not. I've created a trigger for the "time" data, and have created a Shims device for time as well. I set this up as a Sensor Device since none of the other options seemed to apply. I think I've got the Shims device configured correctly,
Unique ID Location "Topic Component", Topic Field "2", Unique ID Value "time", State Value Location "Payload Field", Payload Type "Raw", Sensor Type "Generic"
but every time my time trigger fires, I get this error message:
- Code: Select all
Trigger MQTT Trigger 4 TIME
MQTT Shims Error pool time: update() is unable to convert '2022-05-30T13:15:25.000-0500' to float
So from this error message, I'm guessing my data is actually getting to my Shims device, but I either don't have it set up exactly correctly. (very likely) or the plugin isn't designed to handle this kind of data natively (much less likely).
I really have no interest in harvesting the data from the "time" field, it was more of a test for me to understand MQTT Triggers, something I think I have a better understanding of.
In trying to get the main pump (easytouch2-4/state/temps/bodies/1/pool) into Indigo, I realized the only real way for me to test all this was to repeatedly turn the pump on and off again as I made changes, something that didn't seem like the best idea, so instead, I settled on this field:
- Code: Select all
easytouch2-4/state/circuits/4/aux3
as this is just a relay with nothing connected, so toggling it on and off again while testing just seems like a better idea.
Again, I've got the trigger setup correctly as when I do turn it off and on, that particular trigger fires. But when it comes to the Shims setup, I'm not getting anywhere. I have this setup as a MQTT Switch Device, and agin think I've got the upper most part of the plugin configured correctly
Message Type: "easytouch4", Unique ID Location "Topic Component", Topic Field "4", Unique ID Value "aux3"
but the middle and end are mysteries. The JSON field of my first successful device was {"temp":84}, and I was told the correct Payload Key was simply "temp" (without the quotes). But the field for aux3 is more complicated--
{"id":4,"isOn":"on","endTime":"2022-05-31T01:52:12:00-0500"}
so I'm at loss as to what the Payload Key is.
What I have is this:
State Value Location "Payload Fields", Payload Type "JSON", Payload key "id", and I'm guessing the On value is "isOn" which is the same whether it is on or off, , and Sensor type is "Power On/Off",
but I get is this error message when I turn in on:
Trigger MQTT Trigger
MQTT Shims Error AUX 3: No JSON payload data for state_value
so am guessing my error lies in the Payload Key.
I'm also surmising that the "On Value" is what Indigo looks for to indicate the device is On (or not on), the Action Payloads are what Indigo sends out to turn the device on or off, but have no idea what should go in those fields either.
I've read the Wiki several times, but my problem is I'm trying to compare what I guess is some kind of terminal output in the examples, and what I'm looking at in MQTT Explorer, and just can't make any meaningful comparisons to try to figure out what needs to go where in my Shims device.
So I guess I'm only mildly interested in what the error is for the "time" field, but am honestly interested in the "aux3" field, since its JSON field looks very similar to the maim pump field so am hoping translating settings from one to the other will be easy.
As always, any suggestions are most welcome.