Switch from PEHA PHC to new Automation with OpenHAB2

Awesome, now the new phc binding from marketplace works and I can use all JRM modules. That is, the window blinds are moving.

Is there a way to check in the cli that the module is installed?
I cannot see it with the cli commands feature:list and feature:version-list:

openhab> feature:version-list openhab-binding-phc │·
Version │ Repository │ Repository URL │·
────────┼──────────────────────┼───────────────────────────────────────────────────────── │·
2.5.5 │ openhab-addons-2.5.5 │ mvn:org.openhab.distro/openhab-addons/2.5.5/xml/features │·

openhab> feature:list
[…]
openhab-binding-phc │ 2.5.5 │ │ Uninstalled │ openhab-addons-2.5.5 │ PHC Binding │·
[…]

Great, have fun with it.

feature:list lists all bundles from the openhab repo, bundle:list should list all installed bundles.

The PR is merged now so you can use the next SNAPSHOT now and the 2.5.8 release in a month.

Hi,

I have an issue with configuring JRM time limits:

  • Using the parameter UpDownTime1="50" does not seem to override the default 30s.

  • Using the parameter upDownTime1="30" leads to an exception in openhab
    log and the JRM module does not move the blinds at all.

What is the correct way to override the timers for the JRM module?

I am using the phc binding from the eclipse marketplace:

256 │ Active │ 80 │ 2.5.8.202007242131 │ openHAB Add-ons :: Bundles :: PHC Binding

with openhabe 2.5.5 on a laptop with Ubuntu 20.04.

More details are below.

With the following entry in things

Thing JRM 00100 [address=“00100”, UpDownTime1=“50”, UpDownTime2=“50”, UpDownTime3=“50”, UpDownTime4=“50”] // JRM 4

the timer is not modified and the blinds stop moving after the default 30s.

With the following entry in things

Thing JRM 00100 [address=“00100”, upDownTime1=“40”, upDownTime2=“40”, upDownTime3=“30”, upDownTime4=“30”] // JRM 4

I get the following exception in /var/log/openhab2/openhab.log

java.lang.ClassCastException: java.lang.String cannot be cast to java.math.BigDecimal
at org.openhab.binding.phc.internal.handler.PHCHandler.initialize(PHCHandler.java:79) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_265]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
2020-09-05 20:35:34.834 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.phc.internal.handler.PHCHandle
r@78a721ad’: java.lang.String cannot be cast to java.math.BigDecimal
java.lang.ClassCastException: java.lang.String cannot be cast to java.math.BigDecimal
at org.openhab.binding.phc.internal.handler.PHCHandler.initialize(PHCHandler.java:79) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_265]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
2020-09-05 20:35:34.837 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘phc:JRM:00100’: java.lang.String cannot be cast to java.math.BigD
ecimal

Best,
Matus

Hi, there is a mistake in the README, sorry, I will correct it.

These are the right parameter names but you have to set the number value without the qoutes, so upDownTime1=40 should work.
Otherwise they are considered as a String and cannot be casted to a number in this case.

Thanks Jonas, that works.

Continuing the discussion from Switch from PEHA PHC to new Automation with OpenHAB2:

Hi,
I am new to this forum and openHAB.
Came here after a search for an alternative to PHC.
This due to issues with the PHC system and the EOL for PHC.
I am looking forward to use the PHC binging (thanks to Jonas, and others) and replace the PHC system step by step. Now I am in the learning phase of openHAB and am testing the binding.

I installed the system on a computer and have communications with PHC modules up and running.
I do see some issues.
Test are done with 941/24 EM, 40/24 EM and 940/AM no STM connected
I have 2 RS485 - USB convertors
I use one to monitor the messages on the RS485 network (I use a very old tool called WIN485 for this)

  1. Messages are repeated multiple times over the bus.
    Example : when the status of an input (of EM) is changed, multiple messages are send from EM to openHAB and back ( even more )
    It is similar when an output is changed

    26023ms RX: 0A 01 15 42 EB 0A 01 15 42 EB 0A 01 15 42 EB
    32ms RX: 0A 01 15 42 EB 8A C0 80 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E A
    C
    64ms RX: 0A 01 00 6E AC 0A 01 00 6E AC 0A 01 00 6E AC

    parced it gives the following:

    messages from EM → oH

    26023ms RX:
    0A 01 15 42 EB
    0A 01 15 42 EB
    0A 01 15 42 EB

    looks to be a collision or mismatch by the WIN485

    32ms RX:
    0A 01 15 42 EB 8A C0 80 6E AC

    Answers of the oH → EM
    per EM message it looks like 3 oH replies are send

    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC
    64ms RX:
    0A 01 00 6E AC
    0A 01 00 6E AC
    0A 01 00 6E AC

    debug info

    17:41:14.619 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:14.620 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:14.621 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - initialization: 10
    17:41:14.622 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:14.622 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:14.623 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - initialization: 10
    17:41:17.685 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.685 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.704 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.705 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.705 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.705 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.706 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.706 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.713 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.713 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.713 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.716 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.716 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.716 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.721 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.721 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.722 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.722 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.750 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.750 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.754 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.754 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.754 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.754 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.755 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.755 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.763 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.764 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.764 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.765 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.771 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.771 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.771 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - CRC not correct (crc from message, calculated crc): -613, 13723
    17:41:17.781 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.802 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.805 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.805 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.805 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.806 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.806 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.807 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.814 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.816 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.816 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.817 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.817 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.818 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.822 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.822 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.822 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.823 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.823 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.823 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.844 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - CRC not correct (crc from message, calculated crc): 522, 27518
    17:41:17.845 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.845 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.848 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.848 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.849 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.849 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.860 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.876 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.879 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.881 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.881 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.882 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.882 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.883 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.888 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.890 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:17.889 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.893 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: false
    17:41:17.894 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.894 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:17.899 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 false
    17:41:17.900 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 5
    17:41:17.900 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#05, ON
    17:41:17.901 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#05, last: ON, in: ON
    17:41:39.454 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.455 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.458 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.460 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.460 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.461 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.461 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.462 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: OFF, in: ON
    17:41:39.464 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘phc_EM_01010_em_00’ received command ON
    17:41:39.467 [INFO ] [arthome.event.ItemStatePredictedEvent] - phc_EM_01010_em_00 predicted to become ON
    17:41:39.467 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.472 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.472 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.472 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.473 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.480 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.482 [INFO ] [smarthome.event.ItemStateChangedEvent] - phc_EM_01010_em_00 changed from OFF to ON
    17:41:39.494 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - CRC not correct (crc from message, calculated crc): 2736, 944
    17:41:39.495 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 03
    17:41:39.495 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 0A
    17:41:39.496 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.497 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.508 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.509 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.509 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.511 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.511 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.513 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.516 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.516 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.516 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.517 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.519 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.519 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.524 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.524 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.524 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.525 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.525 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.525 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.551 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - CRC not correct (crc from message, calculated crc): 2800, 944
    17:41:39.551 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 03
    17:41:39.552 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 0A
    17:41:39.552 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.552 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.555 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.555 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.556 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.556 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.567 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.567 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.588 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - CRC not correct (crc from message, calculated crc): -32502, 15955
    17:41:39.589 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 03
    17:41:39.589 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 0A
    17:41:39.590 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.590 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.593 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.593 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.593 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.593 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.594 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.594 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.602 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.603 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.603 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.603 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.603 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.604 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.611 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.612 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.613 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.613 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.629 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.629 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.632 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.633 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.633 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.633 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.633 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.634 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.645 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.646 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.647 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.648 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.662 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.663 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.666 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.666 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
    17:41:39.666 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.667 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.667 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON
    17:41:39.678 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get toggle: true
    17:41:39.681 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - send acknowledge (modul, toggle) 10 true
    17:41:39.682 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Consume Receive QueueObject: moduleType: em, moduleAddress: 10, channel: 0
    17:41:39.682 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - Input: phc:EM:01010, em#00, ON
    17:41:39.683 [DEBUG] [nding.phc.internal.handler.PHCHandler] - EM command: em#00, last: ON, in: ON

    When logging the same message between EM and STM (no actions programmed to this input)
    only 2 messages are send, one from EM → STM and the reply to EM

  1. The binding does not support more than 3 simultainious inputs being operated at the same time.
    seems odd to have the need for it, well when an EM module boots and it has >3 inputs high , it will send a message telling it has more than 3 inputs high. it looks like the binding cannot handle this kind of message and showsn “get invalid sizeToggle: 04” or 84 depending on the sequence

20120ms RX:
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D C5
0A 04 C2 D2 E2 F2 3D
C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2
E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2 E2 F2 3D C5 0A 04 C2 D2

debug

18:15:35.714 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.716 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.747 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.750 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.754 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.758 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.760 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.760 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.770 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.770 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.771 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.771 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.783 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A
18:15:35.784 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get invalid sizeToggle: 04
18:15:35.784 [DEBUG] [phc.internal.handler.PHCBridgeHandler] - get module: 0A

This is the normal behaviour with binding and is due to the fact that the communication from binding via the USB 485 adapter is not as clean and lossless as via the PHC BUS with the STM. This may be due to the timing or also because the PHC components have a resistor at the 485 interface which distinguishes them from the normal 485.
The modules repeat their messages until they receive a reply. So sometimes they recognise each other’s messages only after a few repetitions.

That’s corrrect. I had the feeling that the messages would be recognized more quickly by the modules,
but I’m not sure if this really helps.

At the moment it doesn’t support more than one channel in a message, I didn’t know that the modules also send several at the same time, my 940/24 have never done this before.
The length is one of the limitations to sort out wrong messages, because I only had messages with less than 4 command bytes, the length of 2 or 3 is for other command types.
But it should be easy to implement. If you have the skills you could try it, otherwise I can do it and give it to you to test.

In general only the basic functions (as you can see in the readme) are implemented so far, since it is not so easy and especially time consuming to find out and implement more functions of the protocol. You can find some in the PHC forum, more in the OpenHC project.

Thanks for the feedback!

At this moment I have no clue where to look for (code) . how make modifications.
First have to learn how to work with openHab first.
I can test and simulate, that is not problem.

About programming, in what language are you sing?

The whole code of openhab-core and the addons is written in java.

You can find the code in the GitHub Repo of openhab, e.g. the PHC binding here.
Everything that has to do with the PHC protocol can be found in the PHCBridgeHandler, but it is probably only useful to look at and understand it if you have some experience in java or a similar language.

I’ve implemented and tested it with the single commands, so you could test it with multible commands (up to 16 should be possible).

I’ve uploaded this version to the eclipse marketplace, so you should be able to install it from there as described above:

Is this the new binding I have to install and use?

PHC Binding
market:binding-3528675 - 1.0

Exactly, that instead of the normal oh version.

Tested simultaneous switching on/off 2 up to 16 inputs.
Confirms that it works. Is there a need for logs?

One remark: when running this version the CPU load is much lower!

98% vs <0,5 %
running on older laptop with intel i5 3210M 2,5 Hz

:+1: No, if it works I don’t need logs.

This must be (only) due to the fact that the binding has answered the previously unrecognised messages and therefore the messages are no longer continuously sent by the module and processed in the binding.

PS With the Pull Request I wait until I have time to test the binding with OH3 but it is available in the Marketplace.