TCP commands for Ethernet relay

/config/configuration.yaml contains the config and the script is in /config/python_scripts/
Is that wrong?

should be ok, and whats the error if you run the script from SSH ?

That seems to be ok

Strange, it keeps appearing in my logs as failure:

I got the normal lamps working in the meantime.
Only dimming doesn’t work yet.

Any idea how I can solve this error?

Tue Feb 25 2020 23:36:51 GMT+0100 (Central European Standard Time)

Error running command: python3 /config/python_scripts/dimmer.py {{ '%02.f'%((((states('input_number.living_spots_salon_d') | float / 255 ) * 90) // 10) * 10) }}, return code: 1

NoneType: None

Try with ssh with manual values? I believe you need to send HEX values… You can see current values with your sensor

Ok I have my dobiss2mqtt thing going. Support is extremely limited. Sorry :’)

The only thing it can do is expose your lights and their accurate states (no dimmers, no moods, no switches, no nothing) on mqtt and via device discovery to home assistant. Configure dobiss2mqtt with your CAN programmer details, relay + output config + mqtt info and you should be good to go. Example is included. It does so by opening up a socket connection and polling it constantly. Fair Warning: Current version hogs up the full socket so other integrations via the socket won’t work well. Like the mobile app. I’m planning to leave some breathing room on the socket by disconnecting from it on low load.

There’s documentation on how to spin up a docker container etc. Read the readme please.

If it doesn’t work you can clone the repo -> follow development instructions and run it manually. It’ll give you a lot of output so you might be able to verify what’s wrong. If something’s wrong and it needs a fix you can open up a PR.

If you have dimmers and want support on it you can attempt to create a PR for it. Learning TypeScript & rxjs is a challenge. And challenges should be met. (edit: I might add dimmer support if I know exactly what to do. Could try it on an experimental branch)

Dockerfile is included so if I die from corona -> you can spin up your own containers with your own forks :stuck_out_tongue:

I’m looking into switches but I asked the folks at dobiss and apparently the CAN programmer does not expose something over the socket to read a switch press. So we will have to figure out something else. Right now I am waiting on hardware to hopefully hook into the UTP wires that the switches are on.

edit: You will also need to enable mqtt discovery in home assistant with the default homeassistant prefix. See: https://www.home-assistant.io/docs/mqtt/discovery/

amazing stuff, need to read it when i have sometime
allthough, not sure if it will work for the older Evolution series, i dont know if i have the CAN stuff
how does it look like?

It’s the thing you program your dobiss installation with and you send the socket messages to. (http://www.dobiss.com/en/our-solutions/ambiance-pro/ip-interface/can-programmer) I think everyone has it. It’s the thing you put the RJ45 cable in. Am I maybe using the wrong terminology ? Then I should update my code / documentation. edit: I seem to have been using the wrong terminology. I’ll rename it to CAN Programmer.

But for you, you use dimmers, no ? I don’t have support for this yet. I will look into it though as regular lights + dimmers is probably a very common setup.

I’ll also have to look up my firmware and document which firmware I tested this on. Because I did notice we use different messages when talking to the CAN programmer. But you could test it and see if it works. I’d advice just configuring 1 relay and only the first output on it. That way it creates only 1 device in HASS. Less cleanup if it doesn’t work :stuck_out_tongue:

yeah, something for next week :slight_smile:)

but that can module, i think its only for the newer Ambience/evolution Pro series
i think my lan cable goes directly in the MAX module itself

Ok. Test it and let’s see what happens :slight_smile: Maybe they still speak the old protocol.

I did update the terminology already though. In order to avoid confusion.

@spobo , i have not tested it yet, but some questions
is your code based on these protocols? or is it completely different with the CAN?


because my actions are based on these commands here:

as you can see slightly different

here also a picture of the evolution SX, in the picture you can see i also have the CAN, but there is no network cable there, my cable goes directly to master … i have a USB CAN module :slight_smile:

so if your code is based on the first pdf, its useless to test for me :slight_smile:

also, second question , you sait you are reading/controlling lights/switches only, you mean by switch an outlet right? and not a press on a Niko Button?
what would be nice for a future update, is that you can also read the state of a “programmation”, so we can turn on/off a programation, from a Niko button, that actually does nothing, so if a programmation is on, “a ghost device” , we can read that state, based on that state we can can turn on/off something completely different from Dobiss itselff…

You have the CAN Interface. Which is the upgrade from the regular CAN Programmer I think.

I am doing the messages as described here: TCP commands for Ethernet relay

It’s what the android dobiss app does too. Maybe it inspects the CAN and checks if it is an “Interface” or a “Programmer”. My guess is that it works for all dobiss stuff. I am guessing the android app just talks in 1 protocol. If not, I can look into what I have to send for other hardware.

But yes if I compare the payloads that I send it is the same as on the first PDF.

And for me a switch is a button. Like a switch in home assistant. An output is something which is toggled on a relay. But actually relay seems to be the wrong terminology too. It should be module. And currently I only support relay modules it seems.

I am going to rework the config and the protocol. The config will be modules. Every module will have a type. A single module has multiple outputs. Depending on the module the types of outputs are different and support different actions. Like dimming. If I do it like that it maps to the real dobiss hardware and it’ll be hopefully less confusing and more expandable.

I can then look into creating messages for the SX Evolution hardware based on the info you gave me. But I still wonder if the SX Evolution hardware might simply support the Dobiss PRO protocol. That would be the easiest.

In any case, for now the dobiss2mqtt can only deal with a dobiss installation consisting only of relays. No dimmers or other modules. And perhaps only with CAN Programmer / Dobiss PRO.

yeah, mine is not dobiss Pro protocol, i also cant use the Android App, i only have the “webserver” app
so guess it will not work for me

but, what technical info do you need, do you want me to make a wireshark log? maybe you can see if it will work or not?

I think I will have enough from what you documented here (TCP commands for Ethernet relay). I’ll create an experimental branch when I find the time to support the socket messages you documented. For poll you create a message where you ask the state for every output on the module. And to toggle a relay output you gave me he documentation.

I did refactor things a bit already and I already made a breaking change to the config. This is still alpha for anyone wanting to try it. But documentation should be up to date.

Ah, so I can already try it with my system?

Yeah, I posted that one indeed for others, I was already so happy that I was able to control my whole dobiss system :wink:

No too soon :stuck_out_tongue:

First need to implement something for your dobiss setup. But I did some groundwork to make it easier to do the config for supporting modules other than relays and configuring different hardware than my own basically :slight_smile:

Will probably work on it in the weekend.

Yeah, no hurry, maybe you can create some example script that I can run, to see if it generates correct output…
So I don’t have to install the whole custom component