01-09-2020, 02:11 PM
(01-09-2020, 01:31 PM)Dean Roddey Wrote: You can always write a little windows service that does the listening and the driver connects to it I guess. Otherwise it has to be a C++ driver.
Or you could use a variables driver and have the trigger driver dump data into it from the incoming posts.
Here's how I have done it with other systems. Can you help guide with how to do this with CQC?
HomeSeer plugins are already using the HS webserver and are available at http://<hs_server>/<plugin_name>/<plugin_page_xxx> with this I can have my own page that accepts the post or get and I can parse out the data and use it for the plugin
ISY Nodeserver I used the Python http.server to listen on a high port and accept a POST and then parse and hand the data off to the nodeserver. The http server is running in user space and high port not requiring root permissions and the thread is run from the polyglot instance so I can pass my data around.
CQC already has a webserver running and possibly maybe use the HTTP-Trigger? But the variables are not always the same of what comes from the HTTP POST as it is only sending what has changed/updated weather wise. So there needs to be some degree of logic/validation to variables which maybe a macro? I'm not sure.
I suppose I could still write a python service that sits and listens for the data, processes and then writes a file and CQC read and process the file? Or I could process and push the data to MQTT and process it in CQC that way. There's probably other ways to do this as well, but I need some guidance on clean normal way of doing this with CQC rather than a jumbled hack.