Some info in English

Willkommen Foren LogoControl Some info in English

Verschlagwortet: 

2 Beiträge anzeigen - 1 bis 2 (von insgesamt 2)
  • Autor
    Beiträge
  • #2609
    STef
    Teilnehmer

    Hello everyone,

    I’m looking for long time some kind of API to interact with Siemens Logo!8 and webserver/webservice.
    The purpose is to check for status (like what lamp is on or off) or even give remotely simple instructions (like turn on or off a lamp)

    For some reason I do not want to use smartphone or cloud server… just would like mine at home and connect through vpn.

    Whatever it looks like I landed on the right place over here but… My german is quite poor (and maybe I misunderstood the few I have read here and I’m not at the right place)

    So if somebody of you would be so kind to contact me just to exchange some words about the possibilities of élogocontrol“ I would be so grateful.

    Cheers to all !

    S.

    #2612
    admin
    Administrator

    Hi S,

    first: it seems you’ve found the right place. LogoControl is an application that runs 24/7 on a machine in your local network (no cloud stuff). This machine could be a Windows PC or a Raspberry Pi (2). I recommend the latter because of it’s much lower power consumption. When running LogoControl it offers you 2 things: first it gives you a basic and simple to use Web UI to view your states and control your lamps/shutters/outputs. Second it provides an REST/JSON based API by which you can access all LogoControl functions by third party apps, scripts, your own program etc. One example using this API is the Smartphone App „NetIO Controller“ which is originally not designed to control a Siemens Logo. REST/JSON API in context of LogoControl means all you have to do is to make some HTTP GET requests to some specific URLs listed here. The answer for reading requests is usually a JSON document.

    One essential thing is to understand the concept behind LogoControl. LogoControl hides the memory addresses/inputs/outputs of the Siemens Logo behind a facade of „devices, methods and attributes“. Thereby you cannot directly set bits/bytes in the VM-Memory of the Logo nor reading them. You first have to define a (virtual) device for e.g. a lamp. This lamp would typically have a attribute „state“ (with possible values „on“ and „off“), and two methods „turn on“ and „turn off“. The attribute „state“ is then assigned to a memory address of the Logo VM from which it reads its actual value periodically (every 250ms). Also the „methods“ are then assigned to memory addresses (only one bit per method). When calling a LogoControl method the assigned bit in the Logo VM is set to 1 for 250ms and then falls back to 0. In your Logo program you can now react on the „pulsing“ bit by using the block „Network input“ (assign the same memory address as used for the LogoControl method in the properties).

    For every device/attribute/method an ID has to be assigned. When using the REST/JSON-API you have to use this ID as param. Example: you want to call method 1 of device 7, then you have to place the following HTTP-Get:

    http://logocontrol:8088/rest/devices/7/methods/1

    Hope I could make things a bit clearer…

    –Tobias

2 Beiträge anzeigen - 1 bis 2 (von insgesamt 2)
  • Du musst angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.