Integrate Siemens Logo (plclogo) in OpenHAB 2

Hi @falkena,
Yes, i restarted many times. At weekend i`ll try to reinstall whole RPI.
Thanks for your support.
Best Regards
Petr

Hi @BlackAlpha, @jens, @skazi and @Petos and other, who are interested on binding:-)

I’ve commited new version of binding to https://github.com/falkena/binaries

Fixes:

  1. Solve initialization issues with current openHAB snapshot
  2. Change logging level for some classes from DEBUG to WARN.

Would be great, if you can verify new version. If there are no problems, i will update pull-request to openHAB:

Kind regards,

Alexander

1 Like

Hi @falkena,

I did some quick tests with your binding against the actual daily snapshot: Everything is working fine, all errors are gone. :+1:

Thank you for your good work!!!

Greetings,
Carsten

Hi @falkena,

I tested with some older snapshot and everything looks good.

Best Regards,
Jacek

1 Like

Hi @falkena,

some days later: No problems yet! :+1:

Greetings,
Carsten

1 Like

Hi again,
i have problem with changing Logo’s timers.
I use Logo for switching relay in some times.
I did mapping On and Off times to VW, but i don’t know how to change these VW in Basic UI.
I found how to use alarmclock, but it looks too complicated for my reason.
I need turn on relay everyday in some time. That’s all.
How to change hours and minutes by the “setpoint” ?
Could somebody help me?

Hi @Petos,

i didn’t got your problem. To be able to switch items via BasicUI you need define an sitemap.

sitemap home label="Home" icon="house"
{
  Frame
  {
    Switch item=LogoItem
  }
}

then put in your browser

http://<openHAB_IP>:8080/basicui/app?sitemap=home

you will get simple switch to turn on/off relay manually. If you will switch the relay every day same time, please take a look to Cron - rules. If you will set the time manually, may be you will be happy with virtual item and again rules.

Kind regards,

Alexander

@falkena Sorry for my english. I meant that i don’t know how to change time in Logo’s timer.
I prefer to control important things via Logo. So i use timers in Logo. But i want to change their switching times via OpenHab.
BR
Petr

Hi @Petos,

there is nothing to excuse :slight_smile: What timer you mean? It’s not possible to change Logo! RTC.
For Logo! “Timer Clock” - Block you will need an properly configured analog thing with an Number item attached to value channel. Please take a look to documentation. This item you can map then within your sitemap and maby rules.

Kind regards,

Alexander

Hi @falkena,
i meant Logo’s weekly timer. I use it for garden’s irrigation. I need to use this critical systems in Logo, but i want to change switching times remotely via OpenHAB.
Best Regards
Petr

Hi @Petos,

you can parameter such timers via analog things: https://github.com/falkena/openhab2-addons/tree/plclogo/addons/binding/org.openhab.binding.plclogo You need configure the analog thing as “time” type. Then you can connect value channel to DateTime item. Be sure to map timer properties to memory in Logo! SoftComfort. This item can be then used in sitemap.

Kind regards,

Alexander.

Hi @falkena,
yes, i did it, but how to change in OpenHab/BasicUI ? Setpoint can change only number. No time format. I can show it, but i can`t to change it.
Best Regards
Petr

Hi @Petos,

i see. There are two solutions to get it run. Any solution need virtual items:

  1. Create number item and configure it with Setpoint. Create a rule to recalculate Number values to DateTime values and change analog thing, configured as “time”.
  2. Create number item and configure it with Setpoint. Create a raule to recalculate Number values to BCD-coded Number values and change analog thing, configured as “number”.

There is no simplier solution available, since Logo time/date values are BCD encoded. Additionally you need to do some bitmasking to map values to WORD’s properly. See PLCAnalogBlockHandler.java setData function for details.

Kind regards,

Alexander

Hi,
something is wrong with my plclogo binding. State frozen 2 days ago and i can’t control anything. I made update and upgrade.

I made update to OH 2.1 today and still is frozen…
Thanks for help.
Petr

Hi again,
i made new fresh install Raspbian on my RPI3, OH 2.1 via hasslefree scripts.
PLC Logo binding dont work. I put same and working configurations (cfg, things, items, sitemaps) I thing that every binding in /addons dont working…
So i restarted Logo! too.
LogoApp by Siemens in my mobilephone works good.
Any idea?
Petr

edit: No things in paperUI nor Karaf…

Hi @Petos,

it’s really hard to get an idea without knowledge what’s going on your system setup. Is there any information in your log files? Did you delete tmp and cache folder before reinstall? Can you login to karaf console via ssh? What is the binding state? Is there some additional information in debug/trace log level?

Edit: Take a look here, may be it helps: Raspberry Pi 3 / B Rev 1.2 Update from 2.0 to 2.1.0-1 go wrong / no WEB Interface / no logs

Kind regards,

Alexander

Hi @falkena,
i made fresh new install on new SD card.
Now i see only warnings about transformation.

2017-07-02 14:47:05.094 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '-' with the file 'logo.map' : Target value not found in map for '-'

Because every state is “-”

When i delete plclogo.things and put it again:

2017-07-02 15:20:32.101 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'plclogo.things'
2017-07-02 15:20:32.112 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'plclogo.things' is either empty or cannot be parsed correctly!
2017-07-02 15:20:32.236 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'plclogo.things'

My plclogo.things:

Bridge plclogo:device:Logo1 [ address="192.168.0.30", family="0BA8", localTSAP="0x0300", remoteTSAP="0x0200", refresh=500 ]
{
	Thing analog AM_Hladina_NA					[ block="AM1", type="number" ]
	Thing analog AM_Hladina_KS					[ block="AM2", type="number" ]
	Thing analog AM_Hladina_VS					[ block="AM3", type="number" ]
	
  	Thing analog VW_Nast_hladina_NA				[ block="VW50", type="number" ]
  	Thing analog VW_Start_zavlah_1				[ block="VW24", type="time" ]
    //Thing analog VW_Start_zavlah_2				[ block="VW26", type="time" ]
  	Thing analog VW_Interval_zavlah_1			[ block="VW14", type="number" ]
  	Thing analog VW_Interval_zavlah_2			[ block="VW16", type="number" ]
  	Thing analog VW_Interval_zavlah_3			[ block="VW18", type="number" ]
  	Thing analog VW_Interval_zavlah_4			[ block="VW20", type="number" ]
  	Thing analog VW_Interval_zavlah_K			[ block="VW22", type="number" ]
    Thing analog VW_Start_spin_zas_1			[ block="VW28", type="time" ]
    Thing analog VW_Stop_spin_zas_1				[ block="VW30", type="time" ]
    Thing analog VW_Start_spin_zas_2			[ block="VW32", type="time" ]
    Thing analog VW_Stop_spin_zas_2				[ block="VW34", type="time" ]
  
	Thing digital Q_PWM 						[ block="Q1" ]
  	Thing digital Q_Cerpadlo_KS					[ block="Q2" ]
  	Thing digital Q_Cerpadlo_VS					[ block="Q3" ]
  	Thing digital Q_Spinane_zasuvky				[ block="Q4" ]
  	Thing digital Q_Kanalizacni_ventil			[ block="Q5" ]
  	Thing digital Q_Zavlahy_1					[ block="Q8" ]
  	Thing digital Q_Zavlahy_2					[ block="Q9" ]
  	Thing digital Q_Zavlahy_3					[ block="Q10" ]
  	Thing digital Q_Zavlahy_4					[ block="Q11" ]
  	Thing digital Q_Zavlahy_K					[ block="Q12" ]
  
  	Thing digital VB_Kanalizacni_ventil			[ block="VB100.0" ]
  	Thing digital VB_Spinane_zasuvky			[ block="VB108.0" ]
  	Thing digital VB_Casovac_spinanych_zasuvek	[ block="VB105.0" ]
  	Thing digital VB_Casovac_zavlah				[ block="VB110.0" ]
  	Thing digital VB_Cerpadlo_KS				[ block="VB107.0" ]
  	Thing digital VB_Cerpadlo_VS				[ block="VB109.0" ]
  	Thing digital VB_Start_zavlah				[ block="VB103.0" ]
    Thing digital VB_Start_zavlah_vetev_1				[ block="VB111.1" ]
    Thing digital VB_Start_zavlah_vetev_2				[ block="VB111.2" ]
    Thing digital VB_Start_zavlah_vetev_3				[ block="VB111.3" ]
    Thing digital VB_Start_zavlah_vetev_4				[ block="VB111.4" ]
    Thing digital VB_Start_zavlah_vetev_K				[ block="VB111.5" ]
}

BR
Petr

edit:
there isn`t plclogo bindings.


I tried 2.1 and 2.2 snapshots…

Hi @Petos,

ok. If there is no Logo! binding load, than nothing will work. I rebuild binding for some days to 2.2 snapshot. Can you grab it from my binary repository and try? Be sure to delete 2.1 version before. Is binding load this time? If not, please set openhab log level to debug, stop openhab, delete log files and start openhab again. May be we can get some clue, what happens.

Kind regards,

Alexander.

PS: I’ve checked my installation again: it works fine on my test system.

Hi @falkena,
i made it as you wrote, but i can`t something interested in logs.
https://drive.google.com/drive/folders/0B-E5VEp7LNlnSE1fTmhnSHdUa3c?usp=sharing

BR

Petr

Hi @falkena,
how to manualy install bindings via karaf console?
Could you help?
I will try it.
BR
Petr