OH2/ESH DMX binding

It’s not so hard to implement and I’m not against that. The question is, Is there a real usecase for that (besides the transition period from the old to the new binding)?

I see the same sometimes. Not sure how this can be fixed. I guess it’s a problem with the receiver’s PWM frequence and the update rate, so not easy to solve. My dimmers have a PWM frequency around 100 Hz, the update rate is around 30Hz, so in low brightness situations the dimmer depending on the implementation of the PWM this might lead to constructive or destructive interference…

That’s not up to me. I don’t expect it to be very soon. Thiese are 5k lines of code that need to be reviewed and I guess a contribution of that size might need a deeper IP check.

Best Regards,

-jnk

Personally, I am using more several sources of artnet software which can send information to my devices, and I can imagine this will happen with other users too. E.g. I am using the PixelController java-software to send full pixel-animations to a light (very difficult with OH-plugin), however the same light indicates the outside temperature and weather forecast through colours (conveniently via OH-plugin) in the morning.

So it would be convenient to have a simple Output-Inhibit to easily switch between Artnet sources and not have to shutdown OH or parts of it.

Ok. Got it. I’ll see what I can do, probably this weekend.

I added a “mute” channel. If you send an ON to that channel, no output data is send. I also uploaded the new version, so please check if that works for you.

Works like a charm!

1 Like

hi,

thx for your Work. :slight_smile:

Can you explain how to add the binding to OH2? In the OH2 addon list via PaperUI there is only the “old” 1.9 Version.

thx, kind regrants

The easiest way is to just download the newest version from here and drop it in the addons folder of OH2 (this is /usr/share/openhab2/addons on systems using the debian packages).

You can then add bridges and thing from the Paper UI.

I use this command:

sudo wget https://janessa.me/esh/org.eclipse.smarthome.binding.dmx-0.9.0-SNAPSHOT.jar -O /usr/share/openhab2/addons/org.eclipse.smarthome.binding.dmx-0.9.0-SNAPSHOT.jar

Cheers!

Thanks, that worked. :slight_smile:
I have tested the ArtNet bridge and the dimmer thing. Everything has worked so far, except the simple switch. For me, it looks like he would only send “off”.
If I play with the dimmer brightness channel then I can switch off the channel with the switch thing. But I can not turn it on. Only if I use the dimmer brightness channel.

I have an external “Artnet / DMX” program used to test. If I turn on a DMX channel and then in OH2 on the same channel the switch thing to “On” then the lamp goes on and off.

For the documentation I still lack the assignments of the color channels. (E.g. If channels 1-3 are controlled then red must be set on channel 1 of the DMX device, etc.)

Do you have a link?

@J-N-K I have been trying to get OLA setup for the last two days, its now running, but It can not discover my ftdi device… So can I use your binding with an USB dongle? I would like to control colors and dimming level of my downlights which are connected to a dmx spotlight driver(I have 58, which means 58*3 dmx channels)

Could this :
https://www.aliexpress.com/item/LED-full-color-controller-drive-8192-pixels-with-8-ports-drive-most-common-chips/2046534570.html?spm=2114.10010108.1000014.9.Yj9OpP&scm=1007.13338.46806.0&pvid=8390f020-84ba-4779-b47f-90f4d5b9e58e&tpp=1

or this

https://www.aliexpress.com/item/BC-216-16-channels-Artnet-to-SPI-DMX-pixel-light-controller-DC5V-24V/32661820295.html?spm=2114.01010208.3.305.mfLsJT&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000032_119_10000025_10000029_430_10000028_10060_10062_10056_10055_10000062_10054_301_10059_10099_10000022_10000012_10103_10000015_10102_10096_10000018_10000019_10000056_10000059_10052_10053_10107_10050_10106_10051_10000053_10000007_10000050_10084_10083_10118_10000047_10080_10082_10081_10110_10111_10112_10113_10114_10115_10037_10033_10000041_10000044_10078_10079_10077_10000038_429_10073_10000035_10121,searchweb201603_3,afswitch_2,single_sort_2_price_asc&btsid=1304f9f0-73e8-4c17-be67-1b6224f0f746

be used as a controller? Then I also could control my neopixel at the same time or?

http://shop.ulrichradig.de/Bausaetze/DMX-Kit-s/AVR-ArtNet-Node-Bausatz.html

Could you please set the log level of the DimmerThingHandler to trace and send me the output when you try to switch on? Did you configure your dimmer thing via PaperUI or text files? if the latter one, please send me the configuration.

Thanks,

I’m sorry, I don’t think this can be done easily. I’m not sure if you can use the Lib485 bridge because I don’t know about your dongle. If your dongle is supposed to work with OLA, you should try to get it running there. I can try to assist you via PM.

Best Regards,

-jnk

I try to connect a ESP Artnet > DMX converter to work with OH2 but i get no output (on all 512 Channels =0 )
Link to the ArtNet Node
The Converter has 2 universe (0 and 1)

I have no DMX devices now but i check the Output with an Logic Analyzer.
When i use a Android Artnet App i get the changing values on my Artnet Converter!

I have put the JAR file in /usr/share/openhab2/addons/.

Things Configuration:

Bridge dmx:artnet-bridge:mybridge [  address="192.168.178.105", universe=1] {
 dimmer rgb    [ dmxid="5/3", fade=1000]
 dimmer single [dmxid="50", fade=1000, turnonvalue="230" ]
 chaser ampel  [dmxid="10,12,13", steps="100:255,0,0:1000|100:255,255,0:500|100:0,0,255:1000|100:0,255,0:500]"] 
}

Items:

Color MyColorItem "My Color Item" { channel="dmx:dimmer:rgb:color" }
Dimmer MyDimmerItem "My Dimmer Item" { channel="dmx:dimmer:single:brightness" }
Switch MyChaserItem "My Chaser Item" { channel="dmx:dimmer:chaser:ampel" }

Sitemap:

Colorpicker item= MyColorItem 
Slider item= MyDimmerItem 
Switch item= MyChaserItem

I think OH2 is connected to the Converter because an Status LED lights when OH2 is running.
But there is no changing in the values.

Log:

2017-02-03 08:45:56.101 [INFO ] [ore.internal.i18n.LocaleProviderImpl] - Locale set to de_DE
2017-02-03 08:46:02.258 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.items'
2017-02-03 08:46:02.709 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2017-02-03 08:46:05.844 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.rules'
2017-02-03 08:46:06.915 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.script'
2017-02-03 08:46:07.946 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2017-02-03 08:46:08.537 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.things'
2017-02-03 08:46:10.824 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2017-02-03 08:46:12.983 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-02-03 08:46:13.068 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-02-03 08:46:13.681 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2017-02-03 08:46:13.683 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto'
2017-02-03 08:46:14.923 [INFO ] [ulation.internal.HueEmulationServlet] - Started Hue Emulation service at /api
2017-02-03 08:46:15.783 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-02-03 08:46:30.647 [ERROR] [nding.network.service.NetworkService] - Cannot use DHCP listen: Permission denied (Bind failed)
2017-02-03 08:46:30.657 [ERROR] [nding.network.service.NetworkService] - Cannot use DHCP listen: Permission denied (Bind failed)
2017-02-03 08:46:31.111 [ERROR] [ssories.AbstractHomekitAccessoryImpl] - Type dmx_chaser_mybridge_ampel_control is a org.eclipse.smarthome.core.library.items.StringItem instead of the expected org.eclipse.smarthome.core.library.items.SwitchItem
2017-02-03 08:46:31.330 [WARN ] [nding.dmx.handler.ChaserThingHandler] - could not add step value to thing 100:0,255,0:500], malformed
2017-02-03 08:46:31.341 [WARN ] [nding.dmx.handler.DimmerThingHandler] - cannot link color channel with less than three DMX channels in thing dmx:dimmer:mybridge:single
2017-02-03 08:46:31.342 [WARN ] [nding.dmx.handler.ChaserThingHandler] - command class org.eclipse.smarthome.core.types.RefreshType not supported in channel dmx:chaser:mybridge:ampel:switch
2017-02-03 08:46:31.346 [WARN ] [nding.dmx.handler.ChaserThingHandler] - command class org.eclipse.smarthome.core.types.RefreshType not supported in channel dmx:chaser:mybridge:ampel:control
2017-02-03 08:46:32.537 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-moon at midnight for thing astro:moon:home
2017-02-03 08:46:32.554 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-positional with interval of 60 seconds for thing astro:moon:home
2017-02-03 08:46:32.562 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:home
2017-02-03 08:46:32.566 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-positional with interval of 60 seconds for thing astro:sun:home
2017-02-03 08:46:32.719 [INFO ] [.astro.internal.job.AbstractDailyJob] - Scheduled astro event-jobs for thing astro:moon:home
2017-02-03 08:46:32.727 [INFO ] [.astro.internal.job.AbstractDailyJob] - Scheduled astro event-jobs for thing astro:sun:home
2017-02-03 08:49:31.848 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:31.853 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.036 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.040 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.152 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.155 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '44' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.354 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '67' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:32.358 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '67' for item 'MyDimmerItem' to handler for channel 'dmx:dimmer:single:brightness', because no thing with the UID 'dmx:dimmer:single' could be found.
2017-02-03 08:49:33.582 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command 'ON' for item 'MyChaserItem' to handler for channel 'dmx:dimmer:chaser:ampel', because no thing with the UID 'dmx:dimmer:chaser' could be found.
2017-02-03 08:49:33.590 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'ON' for item 'MyChaserItem' to handler for channel 'dmx:dimmer:chaser:ampel', because no thing with the UID 'dmx:dimmer:chaser' could be found.
2017-02-03 08:49:35.593 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '294,47,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.
2017-02-03 08:49:35.596 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '294,47,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.
2017-02-03 08:49:35.836 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '195,57,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.
2017-02-03 08:49:35.843 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '195,57,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.
2017-02-03 08:49:36.604 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command '136,60,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.
2017-02-03 08:49:37.612 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '136,60,100' for item 'MyColorItem' to handler for channel 'dmx:dimmer:rgb:color', because no thing with the UID 'dmx:dimmer:rgb' could be found.

I have try it again and after some restarts i can control the ArtNet Converter via the Paper UI
but not over the Basic UI.
I do not understand completely what Item on the Sitemap i could be us.
I think thats my problem!

@J-N-K

I try this, but nothing shows up

openhab>log:tail org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler

I looked at the openhab.log and discovered strange things there. :slight_smile:

2017-02-02 20:56:28.361 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:cfb2d24e:switch', because no thing with the UID 'dmx:dimmer:cfb2d24e' could be found.
2017-02-02 20:56:28.362 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:301ff365:switch', because no thing with the UID 'dmx:dimmer:301ff365' could be found.
2017-02-02 20:56:28.363 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:c642d22d:switch', because no thing with the UID 'dmx:dimmer:c642d22d' could be found.  
2017-02-02 20:56:28.366 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:cfb2d24e:switch', because no thing with the UID 'dmx:dimmer:cfb2d24e' could be found.
2017-02-02 20:56:28.366 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:301ff365:switch', because no thing with the UID 'dmx:dimmer:301ff365' could be found.
2017-02-02 20:56:28.366 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'OFF' for item 'DMXDimmer_Switch' to handler for channel 'dmx:dimmer:c642d22d:switch', because no thing with the UID 'dmx:dimmer:c642d22d' could be found.
2017-02-02 21:13:07.550 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'OFF' for item 'ArtNetBridge_Mute' to handler for channel 'dmx:artnet-bridge:a175cd7c:mute', because no thing with the UID 'dmx:artnet-bridge:a175cd7c' could be found. 
2017-02-02 21:13:07.550 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'OFF' for item 'ArtNetBridge_Mute' to handler for channel 'dmx:artnet-bridge:1ba63d05:mute', because no thing with the UID 'dmx:artnet-bridge:1ba63d05' could be found.
2017-02-02 21:19:19.652 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '0,0,50' for item 'DMXDimmer_Color' to handler for channel 'dmx:dimmer:cfb2d24e:color', because no thing with the UID 'dmx:dimmer:cfb2d24e' could be found.
2017-02-02 21:19:19.652 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '0,0,50' for item 'DMXDimmer_Color' to handler for channel 'dmx:dimmer:301ff365:color', because no thing with the UID 'dmx:dimmer:301ff365' could be found.
2017-02-02 21:19:19.653 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '0,0,50' for item 'DMXDimmer_Color' to handler for channel 'dmx:dimmer:c642d22d:color', because no thing with the UID 'dmx:dimmer:c642d22d' could be found

But when I look at all dmx things then there is only this:

openhab>smarthome:things
dmx:artnet-bridge:80d7d675 (Type=Bridge, Status=ONLINE, Label=ArtNet Bridge, Bridge=null)
dmx:dimmer:dbb3ba17 (Type=Thing, Status=ONLINE, Label=DMX Dimmer, Bridge=dmx:artnet-bridge:80d7d675)

So I delete everything things, items and create new item, things…

Now I the openhab.log shows error message that dmx:artnet-bridge:80d7d675 and dmx:dimmer:dbb3ba17 are missing.

It seems like old things would be saved but the new ones would not be recognized.

Best Regards,

This is strange. Is this still happening after a restart? If you set

log:set TRACE org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler
```

your log should be flooded with messages. Don't forget to turn it of again:

``` 
log:set INFO org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler
```

Please note that setting it back to `DEFAULT` will not be persisted properly and you'll get `TRACE` back after a restart.

EDIT: This is not so strange as it looks. I have found a bug in the logic removing listeners from DMX channels. Please update your binding and report back. Thank you.

Please open another thread for this. I don’t think it#s related to this binding. Thank you.