[BTicino/OpenWebNet] New openHAB2 binding ready for testing

mmmm, It’s a partial solution really…my thermostats central is scheduled every 15 minutes and I think the thermostats sends the value every time: in this case your rule runs every 15 minutes ?!?

Why does the binding even need to expire? As long as its clear on the web page that it is a unspupported old version then if people choose to use it then it should be their decision.

For me I will still use old version until the new is as good as it with the same or more supported features. Luckily for me i have a spare RaspberryPi and use that for testing the new version but I will still run my old version in parallel.

Exacly, I dont’ like it very much but it’s the only option…
P.S. My thermostats central is scheduled every 5 minutes :frowning:

Install OpenHab 2.5.10 with official OWN binding with Legrand USB stick.

Problem still exists. I turn on the light, and the current status remains NULL, although the light turns on.

Thing file line:

zb_on_off_switch2u   myzigbeeswitch_zal "Зал"@"Зал" [ where="769636100#9" ]

Log:

2020-10-29 10:24:23.925 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=ON - channel=openwebnet:zb_on_off_switch2u:myZBgateway:myzigbeeswitch_zal:switch_02)
2020-10-29 10:24:23.928 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleSwitchCommand() (command=ON - channel=openwebnet:zb_on_off_switch2u:myZBgateway:myzigbeeswitch_zal:switch_02)
==> /var/log/openhab2/events.log <==
2020-10-29 10:24:23.879 [ome.event.ItemCommandEvent] - Item 'Switch_zal_center' received command ON
2020-10-29 10:24:23.903 [nt.ItemStatePredictedEvent] - Switch_zal_center predicted to become NULL
==> /var/log/openhab2/openhab.log <==
2020-10-29 10:24:28.343 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.769636102#9
2020-10-29 10:24:28.346 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.769636102#9 has NO DEVICE associated, ignoring it

I change where from “769636100#9” to “769636102#9”. Second button become work fine. But when I switch first button, I see the error:

2020-10-29 10:32:07.047 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.769636101#9
2020-10-29 10:32:07.049 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.769636101#9 has NO DEVICE associated, ignoring it

I cannot configure both buttons of zb_on_off_switch2u at the same time.

@Luca95 could you possibly elaborate how you connected the HC4451 to the gateway?
As far as I see there are no connection possibilities. image

There is a mistake. My central temperature control unit is the HC4695. I had created a dedicated section ([BTicino/OpenWebNet] Thermostat HC4695 Setpoint/Target Temperature problems).

Hi all, how can I install two OH instances on the same raspi?
I have installed an OH instance with official release, but it doesn’t support the thermoregulation, that I have in my house. So I will try, if it’s possible, to test the beta version on the same raspi with another instance of OH.

I’m using an old TS as gateway.

Thanks

I am working on the Alexa voice control again. Issuing a STOP command was always a problem but there was a work around using mode controller v3 tags. However for this binding I also had to create a rule to translate the Alexa command to sendCommand(STOP) to the RollerShutter item.

I am looking at this issue again and was hoping to get rid of the rule but did not find a way.
For the mode controller the item type needs to be String but the binding doesn’t recognise the command sent to Item type String but my rule triggers and so I know the commands are being received for the string type

eg

String OfficeShutter_Command "Office blind M" (gOfficeBlind, gShutterCommand) { channel="openwebnet:bus_automation:gateway:55:shutter" , alexa="ModeController.mode" [supportedModes="STOP=STOP,UP=UP,DOWN=DOWN", autoupdate="false"] }

If I change the type to RollerShutter then Alexa does not find the device. So to use the mode controller the item type has to be String type… catch 22

Does the binding only work RollerShutter type? Could it be made to work with String type for ‘Modes’ and the eg commands UP, DOWN, STOP ? I have seen other bindings that can accept mode, string type, commands

As a test I tried connecting to the binding with an Item as String type. I see in the logs the commands are sent but there is no response from the binding. So, this does not work.

[INFO ] [clipse.smarthome.model.script.Blinds] - UP command sent to Office_RollerShutter
[INFO ] [clipse.smarthome.model.script.Blinds] - STOP command sent to Office_RollerShutter
[INFO ] [clipse.smarthome.model.script.Blinds] - DOWN command sent to Office_RollerShutter

The rule that makes Alexa commands work with the openwebnet binding is below. This would not be necessary if the binding accepted commands.


rule "Alexa command" // Converts String command to RollerShutter command
when
    Member of gShutterCommand received command
then
    val itemName = new StringBuilder()
    itemName.append = (triggeringItem.name.replace("Shutter_Command", ""))
    itemName.append('_RollerShutter')
    sendCommand(itemName.toString, receivedCommand.toString)
    logInfo("Blinds", receivedCommand + " command sent to "+ itemName )
end

items

Group gOfficeBlind "Office blind" {alexa="Endpoint.EXTERIOR_BLIND"}
    String OfficeShutter_Command "Office blind command" (gOfficeBlind, gShutterCommand) {alexa="ModeController.mode" [supportedModes="STOP=STOP,UP=OPEN,DOWN=CLOSE", autoupdate="false"],  channel="openwebnet:bus_automation:gateway:55:shutter"  } //friendlyNames="@Setting.Opening" @Value.Open @Value.Close
    Rollershutter Office_RollerShutter "Office blind controller [%d %%]" <blinds> (gOfficeBlind, gAllBlinds) {alexa="RangeController.rangeValue" [supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)", stateMappings="Closed=100,Open=0:99"], channel="openwebnet:bus_automation:gateway:55:shutter" }

This will exceute the correct command for all shutters and produce log entries like this:

DOWN command sent to Office_RollerShutter
STOP command sent to Office_RollerShutter
UP command sent to Lounge_RollerShutter
STOP command sent to Lounge_RollerShutter

Note … I also found this works :

sendCommand(itemName.toString, receivedCommand.toString)

but this doesn’t

sendCommand(itemName.toString, 'STOP')

The results looks the same in the log!!

Note… as posted previously for voice commands

The Alexa mode command works if it’s said like this :

Set office blind to stop.

But if you want to simply say

stop office blind

In this case you need to use an Alexa routine work around to use a more natural phrase. This can be a pain because you will need a routine per blind and the devices in it are lost at every device remove all, discover cycle you do for Alexa.

I have a problem that maybe someone knows the answer to or can test for me.

To get from running MH202 scenarios to openHAB I sometimes use what I call virtual items. These switches that are placed in a scenario and send an Off or On commands. The actuators do not exist, so its cheap to do, and I call these virtual switches. They just send a command onto the BUS and the openwebnet binding sees andcan then trigger a rule.

eg
item

Switch SunnyCills1_VirtualSwitch "Virtual switch: Sunny cills 1" <blinds> {channel="openwebnet:bus_on_off_switch:gateway:0812:switch"}

Thing

//Virtual switches
Thing bus_on_off_switch 0812 "Sunny cills1" @"Test" [ where="0812" ]

rule that is triggered

rule 'Moving to sunny cills1'
when
    Item SunnyCills1_VirtualSwitch changed to ON
then
    logInfo("Blinds",'Sunny cills1')
    AlexaStatusAnnouncement.postUpdate('Moving blinds to sunny cills position one')
    BlindPositionMode.postUpdate('Sunny cills1')
    BlindPositionModeChanged_Timestamp.postUpdate(new DateTimeType)
    json = '{
        "time":' + Long::toString(now.millis) + ',
        "tags":["BlindControl"],
        "text":"Sunny cills1"
    }'
    var output = sendHttpPostRequest(url, "application/json", json)
    logInfo("Blinds",  "Annotation output:  " + output)
    
end

This works and I have others using address 8.1 through to 8.15 and 9.1 through to 9.15 which are mixture of real actuators and non existent vritual actuators.

If I use any other adress outside the above range then the virtual switch trick doesn’t work.
One clue is that if I use myHomeSuite to send a command I get a success for my working virtual switches and a fail for the non working ones.

The virtual switch idea works great but I have now run out of working addresses.

Has anyone got any clues as to what is going on or what tests i could run to check this further and use other addresses beyon 8.xx to 9.xx.

I suppose I could try sending virtual CEN or CENP commands instead.

Maybe I didn’t understand something, but why register the address of the virtual device?

My virtual switch

Switch neptun1_close "Ванна кран"

And I do not fill in the Things file.

I do a create a Thing. Its online for those virtutal devices that work and offline for those that don’t. I’m guessing that the binding responds to BUS commands and hence they succeed when testing for myHomeSuite but only for address A between 8 and 9. Something odd with the binding for 8-9 or maybe the way I set it up?
I was testing the addresses with Sunny cills 1 and then it dissapeared from Things config. Restarted OH and it reappeared They shows as offline in Things config until the switch is activated either from OH or test send from myHome Suite
image
Adresses 8.12, 8.13, 8.14 do not physically exist!
image

hi mark,
sorry i cannot help, i do all this with cen and cenplus commands. the only difference i think is the controll-led on the physical switch: if you do it in your way the led will indicate “ON” when your virtual actor is on. if you realize it with cen/cenplus the led is only flashing (to indicate the command is sent).
but the big benefit is that you can realize more commands to one switch (short_press, extended_press, …)
best, stefan

Did some testing
For working virtual switch 0915 I see this when sending ON:
image

For non working address 0610 I see this:
image

I am not good interpreting frames, help please, but it seems the working one gets some kind of responce I assume from the binding as I don’t have any physical hardware at that address.

Hi all,
When is the heating WHO=4 expected to be supported in the new version?

Hi all,

first of all great work @massi on this addon, it is fantastic! Using is since the beginning and never had an issue. Just wanted to add some thermoregulation automation these days, and I cannot from the life of me change any settings on my L4695 chronothermostat. Is it expected to work?
Using Openhab 2.5.0 with addon vers. 2.5.0M3
I see everything correctly on PaperUI:

but then whenever I try to change the setpoint or the mode this happens:

Setting mode to Auto 
2020-11-29 11:49:49.842 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - ==OWN:ThingHandler== handleCommand() (command=AUTO - channel=openwebnet:bus_thermostat:F454_0003508f264e:1:setMode)
2020-11-29 11:49:49.848 [DEBUG] [er.OpenWebNetThermoregulationHandler] - ==OWN:ThermoHandler== handleModeCommand() (command=AUTO)
2020-11-29 11:49:49.852 [DEBUG] [er.OpenWebNetThermoregulationHandler] - ==OWN:ThermoHandler== handleModeCommand() modeWhat=PROGRAM_HEATING
2020-11-29 11:49:49.861 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## CANNOT read from socket: read returned -1
2020-11-29 11:49:49.874 [DEBUG] [g.openwebnet.bus.MyHomeJavaConnector] - ##gw-openwebnet-connector## read returned -1
2020-11-29 11:49:49.877 [DEBUG] [g.openwebnet.bus.MyHomeJavaConnector] - ##gw-openwebnet-connector## let's try with a NEW SESSION...
2020-11-29 11:49:49.899 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - ##gw-openwebnet-conn## ... starting HANDSHAKE ...
2020-11-29 11:49:49.904 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM RECEIVED   <<<<<<====== *#*1##
2020-11-29 11:49:49.911 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM SENDING    ======>>>>>> *99*0##
2020-11-29 11:49:49.919 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM RECEIVED   <<<<<<====== *#*1##

Setting temperature to 22
2020-11-29 11:50:32.851 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - ==OWN:ThingHandler== handleCommand() (command=22 M-BM-0C - channel=openwebnet:bus_thermostat:F454_0003508f264e:1:setpointTemperature)
2020-11-29 11:50:32.862 [DEBUG] [er.OpenWebNetThermoregulationHandler] - ==OWN:ThermoHandler== handleSetpointCommand() (command=22 M-BM-0C)
2020-11-29 11:50:32.870 [DEBUG] [.openwebnet.message.Thermoregulation] - ====TEMPERATURE 22.0 --> : <0220>
2020-11-29 11:50:32.902 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## CANNOT read from socket: read returned -1
2020-11-29 11:50:32.911 [DEBUG] [g.openwebnet.bus.MyHomeJavaConnector] - ##gw-openwebnet-connector## read returned -1
2020-11-29 11:50:32.915 [DEBUG] [g.openwebnet.bus.MyHomeJavaConnector] - ##gw-openwebnet-connector## let's try with a NEW SESSION...
2020-11-29 11:50:32.928 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - ##gw-openwebnet-conn## ... starting HANDSHAKE ...
2020-11-29 11:50:32.933 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM RECEIVED   <<<<<<====== *#*1##
2020-11-29 11:50:32.937 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM SENDING    ======>>>>>> *99*0##
2020-11-29 11:50:32.944 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - COM RECEIVED   <<<<<<====== *#*1##

It’s like it tries to reset the communication while trying to do that? Any hint on how I can further troubleshoot this?
Thanks!

Hi all, thanks for the excellent job you are doing on this binding.
I have a simple question , do we have any chance to have this working with K4500 Gateway in the future ? My system is based on this and now the only way I have is to pass via Alexa.

Thanks

My suggestion would be to try installing it manually and see if it works.
Unless you already tried🤷

I have installed the org.openhab.binding.openwebnet-2.5.0.jar manually according to the procedure.

log says:

19:05:42.289 [WARN ] [org.openwebnet.OpenGatewayBus        ] - ##gw-openwebnet-BUS## IOException: connect timed out
19:05:42.399 [WARN ] [ebnet.handler.OpenWebNetBridgeHandler] - ==OWN==  CONNECTION ERROR: Connection error (IOException). Check network and gateway thing Configuration Parameters (connect timed out) - connect timed out

I don’t know if port 20000 is correct (I left it by default) and also the password 12345 … I’m not aware of any password on my K4500 Gateway.
I left Discovery by Activation in OFF.

Shall I conclude that K4500 is not compatible with this ?

2020-12-04 18:57:40.273 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 18:57:40.382 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 18:57:40.448 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:dial-multiscreen-org:device:dial:1
2020-12-04 18:57:40.487 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- AFTT (Amazon)
2020-12-04 18:57:40.522 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:schemas-upnp-org:device:InternetGatewayDevice:1
2020-12-04 18:57:40.556 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- RT-AC86U (ASUSTek)
2020-12-04 19:00:34.706 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:dial-multiscreen-org:device:dial:1
2020-12-04 19:00:34.734 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- AFTT (Amazon)
2020-12-04 19:02:22.455 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:22.507 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:02:22.535 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:dial-multiscreen-org:device:dial:1
2020-12-04 19:02:22.563 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- AFTT (Amazon)
2020-12-04 19:02:22.574 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:schemas-upnp-org:device:InternetGatewayDevice:1
2020-12-04 19:02:22.586 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- RT-AC86U (ASUSTek)
2020-12-04 19:02:22.608 [INFO ] [ery.OpenWebNetBridgeDiscoveryService] - ==OWN:BridgeDiscovery== ------ startScan() - SEARCHING for bridges...
2020-12-04 19:02:25.754 [INFO ] [ery.OpenWebNetBridgeDiscoveryService] - ==OWN:BridgeDiscovery== No serial ports found
2020-12-04 19:02:27.082 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:27.141 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:02:27.751 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:27.775 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:02:27.969 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:27.980 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:27.987 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:02:28.012 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:02:28.212 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP== --- Found device # urn:Belkin:device:controllee:1
2020-12-04 19:02:28.233 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - ==OWN:UPnP==                  |- Socket (Belkin International Inc.)
2020-12-04 19:04:28.475 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'openwebnet:bus_gateway:a2935a18' takes more than 5000ms.
2020-12-04 19:04:29.271 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## IOException: connect timed out
2020-12-04 19:04:29.347 [WARN ] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  CONNECTION ERROR: Connection error (IOException). Check network and gateway thing Configuration Parameters (connect timed out) - connect timed out
2020-12-04 19:04:36.854 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: connect timed out
2020-12-04 19:04:46.958 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: connect timed out
2020-12-04 19:05:01.974 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: connect timed out
2020-12-04 19:05:26.991 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: connect timed out
2020-12-04 19:05:42.289 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## IOException: connect timed out
2020-12-04 20:49:53.231 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket....  (192.168.1.177:2000)
2020-12-04 20:49:58.249 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: connect timed out
2020-12-04 20:49:58.259 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting...
2020-12-04 20:50:58.273 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect...

There is no Lan config to do whitch this gateway like F454 or F459 ?

Did you read the binding README? It’s written there:

NOTE The new BTicino Living Now® wireless system is not supported by this binding as it does not use the OpenWebNet protocol.

1 Like