I am new to openHAB, too and trying around with the plcLogo integration.
I am able to switch a light over the BasicGUI with the pulse thing as mentioned in the release note on your github (block=VB0.1, observe=NI1)
But sometimes I have problems with this feature:
Normally the pulse shall go 0-1, but sometimes the pulse sticks on 1 and after that it pulses 1-0. Then I canât switch off the light and it blocks my wall-mounted switch.
What could be the reason for that? Or would it be a option to add config-option to the pulse thing to set the direction it shall pulse (rising, falling, either)?
try to increase pulse length: we try to work with hard real time system from java application My configuration use 100ms as polling intervall (bridge ârefreshâ parameter) and âpulseâ is set to 500ms. May itâs really better to introduce new parameter to the thing: âcloserâ for pulses 0->1 and âopenerâ for pulses 1->0. Means: âcloserâ assumes, that initial state was 0, send 1 and then after timeout send again 0. âopenerâ works opposite way. Default value for parameter is âcloserâ
I started with a new Openhab installation that will connect to several Logos - mostly to switch Light or Power.
The PLCLogo-Binding worked out of the box for me. The Logo (for now it is only one Test device) was auto-detected and it was straight-forward to add things for Input and Output channels.
So, many thanks for such a nice binding !
However, it took us some time to establish the connection. Problem was a missing S7 connection in the Logo configuration. The documentation should give a short hint, how to create the connection with LogoSoft Comfort.
Now I think about the interface specification between Logo and Openhab and have several questions about the Binding (or maybe the Logo itself?):
What exactly is a pulse thing? After reading the bindingâs documentation and this thread, I still donât get it. It seems that this is a way to generate a Pulse if some other Variable (Block) has changed.
Why do I need to add one thing per âobservedâ item? For me it seems more useful, to have on âPulse Thingâ and configure the blocks with channel configuration? (As for inputs and outputs)
Why Inputs needs to be of type âContactâ. This seems wrong to me. It should be possible to configure them as Switch, too. This is especially true for NI, because an NI can be used as output from Openhab. So, usually I want to link a Switch item to it.
When you add a Digital Thing with PaperUI, only 20 Channels are created, but there are 64 available for NI, NQ or M? Is there a way to add theses channels in PaperUI?
Thanks @falkena for the great binding.
I am now working with the merged version from the openHAB 2.4 on RaspberryPI.
There were many contributions for practical solutions above - thanks as well. This thread becomes quite overloaded, imho. I think we should create a new forum thread to collect solutions that are complete and 100% work (fool-proof).
One post in that thread contains one solution? Or like the âDesign Patternâ (one topic per solution)? Tagged with [Tutorials & Examples] [Solutions] [Bindings]
This should be editable (for revision) by all, if possible? Alternatively feedback from replies is incorporated into the 1st post (by the author of thread).
Should contain some structure, e.g. Problem Statement, Concept, Example, a screenshot of what you get (sitemap screenshot), openHAB version, zip-file with all openhab-config files and maybe Logo-config (Logo soft comfort file or screenshot of the Diagram-Editor. Drawback: This forum does not permit zip-file uploads, therefore all config must be placed as code fences in the post.
What do you think?
I wish we could get properly consolidated examples for:
rolloshutters
lights (switch + status indicator)
timer configuration (setting logo clock parametersâŠmore in a later post)
âŠ
Here an example as template.
Thread-name PLCLogo Solution: Logo Input Monitoring
Problem Statement
How to obtain status of Logo-inputs for window/door alarm contacts?
Concept
Reading inputs of a Logo via openHAB PLCLogo binding and visualize their status (read-only) in a sitemap. Magnetic alarm contacts provide the open/closed status of a window or door. A closed alarm contact shall represent a closed window/door. Connect each alarm contact to a dedicated Logo-input. A sophisticated Logo configuration is not required because Logo-inputs are directly read by the PLCLogo binding.
This thread is a wiki article and can be improved by everyone. Please do!
Solution
Here is a screenshot of what the result look like.
Well, the procedure is well described in manual to LogoSoftComfort: simply search for ânetwork projectâ and/or âethernet connectionsâ. An Pull-Request with updated documentation is also welcome.
Iâve added some lines to documentation
Well, letâs take a look into manual to LogoSoftComfort again: Logo can address 851 bytes (range 0 - 850). Each byte contains 8 bits. Means: we will have a thing with 6808 channels. Itâs really huge thing:-)
Again, manual to LogoSoftComfort will help us. Siemens online documentation is helpful too. Just for info: Siemens has increased number of digital outputs to 20 (yeah, itâs really huge) in Logo!8 compared with 16 in Logo!7.
Problem for me was that a network project still requires that the actual connection is setup as normal ethernet connection. It is not sufficient to create the connection in the âNetwork Projectâ only. While this is clearly an issue of the LogoSoft Comfort documentation, the process to set and see the TSAP configuration could be explained better in the binding documentation. When I find some time, Iâll create a PR.
Where? Is it already available?
Yes, but if you want to make use of them, you will have 851 Things?!
Yeah, but there are 64 Network Inputs and 64 Network Outputs? But also for an NQ-Thing âonlyâ 20 Channels are created. Is it possible to create all 64? (Without need to configure them manually)?
Explanations like these are why a think that Contact is wrong. A network input of the Logo can be the output of Openhab, so it should be possible to configure it as Switch.
@falkena
I think we need a pulse-thing, with opener/closer behaviour, i.e. that assures a retun to 0.
Sometimes I have a sticky NI (network input) that behaves somehow inverted.
I am still trying to build the perfect light-switch. Thanks @mcullmann (post 180 above).
Let me summarize:
Comfort-Switch B003 switches Q7 permanently, if pulse us longer than 500ms. A short pulse switches-on Q7 only for 20s. B033 to assure that pulse from NI1 is longer than 500m (e.g. 600ms)
rule "Switch Light through Logo"
when
Item Logo7_Q7 changed or // 1. light changed external
Item FF_Dining_Light received command // 2. light changed internal
then
if(receivedCommand==ON || receivedCommand==OFF) { // ensure there was a received command, so second item triggered rule
if (Logo7_Q7.state != receivedCommand) { // only if state changed
Logo7_NI1.sendCommand(ON) // send an ON
Logo7_NI1.sendCommand(OFF) // send an OFF ?? Is that really necessary ??
}
}
else { // no trigger from proxy switch, so state changed externally
if (Logo7_Q7.state != FF_Dining_Light.state) { // if state changed really
FF_Dining_Light.postUpdate(Logo7_Q7.state) // update the state without triggering the rule
}
}
end
This seems a bit shaky when toggling Light switch, esp. when toggling fast (status hicks up). Also it does not read the initial state (if logo-light was already on, and then starting up openHAB).
Can we find a simpler solution for light-switching, e.g. without rules?
For switching my lights I use wall pushbuttons.
I canât use the pulse thing because then I donât have the status of the output in logo.
To have the status on openhab correct I did it this way and it works great.
My wall pushbuttons pulse the pulse relay, the openhab-switch sets/resets the output.
Logo.rules:
Update state openhab switch according to output state.
Maybe a postupdate would be better than a send command, but it works.
It sends another set or reset to the logo, but it doesnât do anything because the output is already set or reset.
//rules
rule "update VB0.0"
when Item Logo1_Q1 received update
then
if (Logo1_Q1.state==ON) {
Logo1_VB0_0.sendCommand(ON)
} else {
Logo1_VB0_0.sendCommand(OFF)
}
end
Home.sitemap
//sitemap
sitemap Home label="Home" {
Switch item=Logo1_VB0_0
}
There is still a rule necessary, but its a small one.
Thren I have a challenge for Logo clocks. How to write times? Reading times works already nicely with plclogo-binding.
Android HMILogo app does that with a perfect widget (3 tabs for 3 clocks, weekday-selector, on/off-time reader + setting)
Hi @skazi, I just started to work with Openhab, and Iâm looking to control my PLC Logo 8 with OPENHAB
could You please help me how to proceed??
best regards
dave
But now I have another problem. Iâm not able to send a Value from a number item to the logo. I tried some ways. I tried to bind the Number channel to a memory thing. I tried to bind the number channel to analog network thing. But the value does not arrive the logo VM.
Reading analog value from the logo works fine.
And it works with Switch items and writing only bits to the logo VM. Both ways: digital thing or memory thing.
In my case I have a Networt Analog Input NAI1 which maps to VW140.
Here the example with the analog thing:
thing-file:
Thing analog Analog_Thing_1 [kind="NAI"]
items-file
Number Test_Number {channel="plclogo:analog:Logo1:Analog_Thing_1:NAI1"}
rule
Test_Number.sendCommand(50)
Where is the mistake? Can you help me how to proceed?