oley

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 93 total)
  • Author
    Posts
  • in reply to: SMS with two factor authentification #17366
    oley
    Participant

    I made it work.
    I created a proxy service that accepts POST requests and sends SMS messages with two-factor authentication based on them.
    Since the request is in JSON format, I have to use [param] instead of {param} for the parameters.
    The Headers tab probably refers to the response, because when I set Content-Type there, I kept getting the error: “Error creating request: Misused header name, ‘Content-Type’. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.”

    I will send something like: {CnlName} on {EvDev} at {EvObj} changed value to {CnlVal}

    I suppose this should be Channel Data Change Trigger and than Command with code “Request” to my Notifier device.
    Now is the question: how to send SMS to a recipient from the address book?

    in reply to: SMS with two factor authentification #17364
    oley
    Participant

    One more request: could you remove the phone number from the configuration I sent? I can’t edit my message.

    in reply to: SMS with two factor authentification #17363
    oley
    Participant
    <?xml version="1.0" encoding="utf-8"?>
    <NotifDeviceConfig>
      <Uri>http://localhost:5150/send-sms</Uri>
      <Method>Post</Method>
      <Headers>
        <Header name="Content-Type" value="application/json" />
      </Headers>
      <Content>{
      "phoneNumber": "+486011111",
      "message": "SCADA"
    }
    </Content>
      <ContentType>application/json</ContentType>
      <ContentEscaping>EncodeJson</ContentEscaping>
      <ParamEnabled>false</ParamEnabled>
      <ParamBegin>[</ParamBegin>
      <ParamEnd>]</ParamEnd>
      <AddrSep>;</AddrSep>
    </NotifDeviceConfig>
    • This reply was modified 8 months, 3 weeks ago by Mikhail.
    in reply to: SMS with two factor authentification #17362
    oley
    Participant

    Is there a possibility to simply test if this solution works?
    If I had the service which works like:

    Invoke-RestMethod -Uri "http://localhost:5150/send-sms" -Method Post -Headers @{ "Content-Type" = "application/json" } -Body '{"phoneNumber":"+48111111111","message":"Test API"}'

    and put Url into DrvHttpNotif with content type json and so on. How to send a test message?

    in reply to: SMS with two factor authentification #17361
    oley
    Participant

    Thank you,
    yes I will provide simple proxy service which can become single request and make two-factor request.

    in reply to: Map location icon #17101
    oley
    Participant

    Hi, got it! Thanks!

    in reply to: Map location icon #17087
    oley
    Participant

    Hi,

    I can not set the undefined icon.
    Status channel equals 1 (and every positive) shows error icon, 0 and -1 (or any negative) shows normal.

    in reply to: Access to communication lines from the view #17082
    oley
    Participant

    Hi,

    Thanks, got it.

    in reply to: CurData in dasboard view #17080
    oley
    Participant

    Hi,

    I figured it out.
    Thanks!

    in reply to: CurData in dasboard view #17070
    oley
    Participant

    Hi,

    I tried this at the beginning, but it also does not work and additionally shows this directory structure in the tree view:
    ..
    ..
    ..
    custom
    MyPage

    Can this custom page be located in the project directory structure, or must be in SCADA program files directory structure?

    Now I’ve got this simple html in the views/Weather directory in my project, but dashboard show only blank field.

    in reply to: Calculated input/output channels #17061
    oley
    Participant

    Hi,

    I figured it out myself before I read the answer. Thanks!

    in reply to: CurData in dasboard view #17054
    oley
    Participant

    First of all I will show a weather widget in a dashboard. Something like that:

    <div id="tp-widget-default" data-city="12031" data-version="2.0.0">
    	<div id="tp-widget-bottom-default">
    		<a id="tp-widget-flink-default" href="https://www.twojapogoda.pl/prognoza-godzinowa-polska/warminsko-mazurskie-wegorzewo/" target="_blank" rel="nofollow" title="Węgorzewo - prognoza godzinowa">Godzina po godzinie</a>
    		<a id="tp-widget-flink-second" href="https://www.twojapogoda.pl/prognoza-16dni-polska/warminsko-mazurskie-wegorzewo/" target="_blank" rel="nofollow" title="Węgorzewo - prognoza na 16 dni">Na 16 dni</a>
    		<a id="tp-widget-mlink-default" href="https://www.twojapogoda.pl" target="_blank" rel="nofollow" title="TwojaPogoda.pl - Pogoda w Polsce i na świecie - pogoda na 16 dni"></a>
    	</div>
    	<script type="text/javascript">
    		(function (t, p, w, d, g) {
    			if (t.getElementById(w)) return;
    			d = t.getElementsByTagName(p)[0], g = t.createElement(p);
    			g.id = w; g.src = "https://widget.twojapogoda.pl/default/main.js";g.charset="UTF-8";
    			d.parentNode.appendChild(g);
    		}(document, "script", "tp-widget-script-default"));
    	</script>
    </div>

    I put a simplest html in project views directory and set it up:

    <Widget type=”CustomUrl” url=”./MyPage.html” />

    but it also don’t work.

    in reply to: CurData in dasboard view #17052
    oley
    Participant

    Views

    https://ibb.co/200ccgrq

    I tried different paths, but can’t get this work.

    • This reply was modified 11 months, 1 week ago by oley.
    in reply to: Calculated input/output channels #17045
    oley
    Participant

    Hi,

    thank you, it works.
    Another question: how to setup channel, which will be an Off-On and use it with toggle and led on a scheme view?

    in reply to: Roles for map view #17040
    oley
    Participant

    Hi,

    thank you, I will come in January with this topic.

Viewing 15 posts - 46 through 60 (of 93 total)