Is there any plan to bring MQTT to the CR800/CR1000 series data loggers? Or at least fix up the HTTP Streaming?
As far as I am aware, there are no plans to put MQTT into these dataloggers.
MQTT will not be added to the CR800, CR1000, CR3000, due to code size/memory and processor speed (for TLS mutual authentication) constraints.
Can you clarify what you mean by "fix up the HTTP Streaming"? If there is an issue with HTTPPost() or HTTPPut(), we would like to know more.
I think i have the same problem as ryan42 using the HTTPPost command at CR800.
Using the HTTPPost command with CR300, everything is working fine.
Using the HTTPPost command with CR800 (latest OS 32.05), no measurements transfered to HTTP server.
CR300 & CR800 have the same simple program (only PTemp & Battery measurements).
Company IT expert informed me, that we use as URL the: Const URL = "http://my*********s.eu/api/csi.php"
CR300 HTTPPost, connected to URL = "http://my*********s.eu/api/csi.php"
On the other hand, CR800 HTTPPost, trying to connect to :
1st attempt: URL = "http://my*********s.eu/api/csi.php0.dat"
2nd attempt: URL = "http://my*********s.eu/api/csi.php1.dat"
3nd attempt: URL = "http://my*********s.eu/api/csi.php2.dat"
As you can see, adding to the end of URL the *.dat, so it is not possible to ...
The commands i use for HTTPPost are:
http_post_socket = 0 'Initialize HTTP Post Socket
http_post_socket = HTTPPost (URL,"MeteoDataTable",http_post_response,PostHeaderStr,0,0,Min,12,1000)
My problem is different. The problem was with the HTTP post function with streaming accepting the send as a success when it failed? Sometimes after a timeout if you called the instruction again, in a loop, it would just return no new data. I assume it should only mark data as sent if it receives a 200? The data isn't lost but then you need to go in and download it. I would like to move my network off FTP to HTTPS but am hesitant if i must continually connect to download the missing data.
@Sam, happy to be contacted if you need more info.
The modification or mangling of the URL should not be happening. It appears that the filename is being appended to the URL.
Please modify the HTTPPost() instruction to use a "FileOption" of "1012" instead of "12" to supress the appending of the incrementing number and ".dat" extension.
You are correct that the datalogger is tracking the last record that it thinks it has successfully sent and assumes the transfer to be successful in receiving a 2xx response.
It would be good to see a trace of the traffic to see what the exchange is.
If you want to try using in a loop, you could try using a NumRecs=0 and Interval=[negative interval], which will tell the logger to send that interval's worth of data every time it is called.
NumRecs = 0
Interval = <0
Sent = Each time this function is called, the most recent records, within this time interval, will be sent.
You can use the datalogger terminal "W" mode to capture traffic and share with us. I'll send you an email to connect.