bms

Members
  • Posts

    27
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

bms's Achievements

Member

Member (2/5)

0

Reputation

  1. Another question if you will entertain me. I'm using a DLL at the moment to get around the issue, but it is a bit inconvenient that DF blocks while the function is running (i have to call it fairly regularly, and takes around 5 seconds to compute). Is there a way to call DLL functions asynchronously? "DLLGlue.dll": #include <stdlib.h> extern "C" { __declspec(dllexport) char RunApp(char *command) { return system(command); } } Then in DF: extern(OPT.OptimiserLocation + "DLLGlue.dll", "char RunApp(string)", "OptRunApp", "stdcall") OptRunApp("cmd /C python " + chr(34) + OPT.OptimiserLocation + "query.py" + chr(34))
  2. Still scratching my head here. If I send GET /optimize HTTP/1.1\013\010\013\010 I correctly receive HTTP 200. If I deliberately send something wrong EG GET /abc HTTP/1.1\013\010\013\010 I correctly get a 404 not found. Same for GET HTTP/1.1\013\010\013\010; 404 Not Found But HTTP.Get("127.0.0.1", "/optimize", 5000) gives the "a connection to the server could not be found" error. There is also no traffic captured on wireshark What is strange is HTTP.Get("127.0.0.1", "", 5000) does correctly return a 404 error and I can see it in wireshark. Does HTTP.Get() do any formatting before sending to windows?
  3. Yes, definitely not secure. Via the browser https://localhost:5000/optimize throws an error, but http://localhost:5000/optimize serves correctly.
  4. I have a webserver running locally that I'm trying to hit using HTTP.Get("127.0.0.1", "/optimize", 5000) or HTTP.Get("localhost", "/optimize", 5000), but I keep getting "HTTP Error: A connection with the server could not be established." I can access the server with a web browser (127.0.0.1:5000/optimize or localhost:5000/optimize). Is there a reason why DF can't find localhost, or am I doing something wrong?
  5. bms

    Licensing

    I've got the developer license on a hardware key. The license is used for local editing, and the file is then deployed to remote computers in the field. I occasionally have need to edit the remote files in situ for debugging, where local testing isn't adequate. What is the best way to achieve this? I would want to be able to do the remote editing on multiple different machines, but typically only for a few hours at a time. After that they would go back to runtime.
  6. Finally got this going today, using these credentials: private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "<gmail_address>" semail.strPassword = "<app_password>" semail.strAuthenticate = "AuthLogin" semail.strBody = "this is a test" semail.strReplyAddress = "<gmail_address>" semail.strReplyName = "<gmail_address>" semail.strSubject = "test subject" semail.strTo = "<gmail_address>" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() These are my original settings, so it seems there is something else going on beyond just having the right code and account settings. For anyone else reading this, I'd recommend logging out and back in to your google account every day until it starts working. I suspect Google is blocking access for a period of time; I had a similar problem last year (https://support.azeotech.com/topic/4251-twitter-feed-anyone/):
  7. Thanks Steve, but still no luck for me unfortunately. 2 Step verification is on, and I have generated an "app password." private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 465 semail.strUserName = "<gmail_address>" semail.strPassword = "<app_password>" semail.strAuthenticate = "AuthLogin" semail.strBody = "this is a test" semail.strReplyAddress = "<gmail_address>" semail.strReplyName = "<gmail_address>" semail.strSubject = "test subject" semail.strTo = "<gmail_address>" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() Error 80040227 every time. Tried port 25, 465, 587. Help please!
  8. Emails have stopped working (Gmail) in the last couple of days. What does error 80040211 mean when sending?
  9. I have an issue querying a large database where some column names on separate tables are the same. In rare cases the query will include 2 or more of these datasets, and I therefore can't tell them apart using QueryToClass, as they have the same FieldName. EG I have two tables in my database, one for GHI Irradiance, and the other for POA Irradiance. Both have a column name "Irradiance." If the user wishes to graph both against each other: private RO = DB.QueryToClass(SQLTools.MySQLHandle, SQLQuery) RO.FieldNames // contains: {"Time_Stamp", "Irradiance", "Irradiance"} GraphTrace1 = evaluate(format("RO.%s", RO.Fieldnames[1])) GraphTrace2 = evaluate(format("RO.%s", RO.Fieldnames[2])) //Ambigious, always uses data from the first RO.Irradiance Is there a way to access the data some other way than via the FieldNames string array?
  10. We are currently using HTTP.Get() to interface with an API to our work server, but it is about to be depreciated. Is there a HTTPS version available or planned?
  11. When using these comms objects, I can't seem to poll Input or Holding Registers in the 30000 to 50000 range. EG when asking for Input Register 30233: ModbusDevice.ReadInputU16(1,30233,2) The command that actually goes out is for Input Register 232 (00 00 00 00 00 06 02 04 00 e8 00 02). It's as if it is assuming I am using Modicon 30xxx 40xxx convention. Asking for 60232 correctly sends the right command: 00 00 00 00 00 06 01 04 eb 48 00 02. Is there a way to force it to evaluate my data addressing literally?
  12. Please add support for OAuth2 email authentication
  13. Our email server is Microsoft Exchange and only supports OAuth2. For the moment I'm just using Gmail instead, but it seems they are also standardizing on OAuth2; I had to manually enable "unsecure 3rd party access". If you don't send any emails for a while (about 24 hours it seems) then they automatically turn it off again, and I can't send anything. I suspect their long term view is to phase it out completely.
  14. Is there any plan for DF to support OAuth2?