yes, in case of “Bureau”, yes, the first two decimals are the state of bureau light, 00 is off 01 is on
my sensor state command looks like below
so ignore this string : ED63300000000000000000000000AFAF
then you see that i request : 4205
so yes, that my “bureau” light , on dobiss relay B, output 5
#!/usr/bin/python3
import socket
import codecs
import binascii
host = '192.168.0.10'
port = 1001
message = binascii.a2b_hex ("ED63300000000000000000000000AFAF4205420a410041014102410341044105410B42024304430A430B4408440943074306440A4500450145024503410A4106")
mySocket = socket.socket()
mySocket.connect((host,port))
mySocket.send(message)
data = mySocket.recv(1024)
data = binascii.hexlify(data).decode()
message2 = binascii.a2b_hex ("ED63300000000000000000000000AFAF42084207420943004206420442034400440144024403440444054406440743084309430243034305FFFFFFFFFFFFFFFF")
mySocket.send(message2)
data2 = mySocket.recv(1024)
data2 = binascii.hexlify(data2).decode()
print (data + '--' + data2)
mySocket.close()
i just created data2 , since the message that you send is limited to x amount of data
so i send 2 strings to get 1 sensor
you could also make 2 sensors, with 2 differents output, but that meays, you need to query the dobiss 2 times in the scan_interval
so therefore my message2 , you can see at the end of the string, that i have some ffffffff over, so i am waterproof for some more extra lights
ok, because I have with:
#!/usr/bin/python3
import socket
import codecs
import binascii
host = ‘192.168.2.102’
port = 1001
message = binascii.a2b_hex (“af01ff060000000100ffffffffffffaf06000601060206030604060506060607FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF”)
mySocket = socket.socket()
mySocket.connect((host,port))
mySocket.send(message)
data = mySocket.recv(1024)
data = binascii.hexlify(data).decode()
message2 = binascii.a2b_hex (“af01ff080000000100ffffffffffffafFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF080008010802080308040805080608070808FFFFFFFFFFFFFFFFFFFFFFFFFFFF”)
mySocket.send(message2)
data2 = mySocket.recv(1024)
data2 = binascii.hexlify(data2).decode()
#message3 = binascii.a2b_hex (“ED63300000000000000000000000AFAF070007010702070307040705070607080709070a070b080008010802080308040805080608070808FFFFFFFFFFFFFFFF”)
#mySocket.send(message3)
#data3 = mySocket.recv(1024)
#data3 = binascii.hexlify(data3).decode()
print (data + ‘–’ + data2)
mySocket.close()
the result will be:
af01ff0600 00000100ff ffffffffff afffffffff ffffffffff ffffffffff ffff010101 010101010100000000ffffffffffffffffffffffffffffffffffffffff–af01ff080000000100ffffffffffffafffffffffffffffffffffffffffffffff010101010101010101000000ffffffffffffffffffffffffffffffffffffffff
so if I would like to check the status of an input then need to check
value_template: “{{ states.sensor.dobiss.state[75:76] == ‘01’ }}”
coz that will be the status of module 6 first input
that should work indeed
damn, you have lots of lights
how did you find out the header of your message? and why is your message 3 different than 1 and 2 ? the header part?
thanks. well a lot of garbage in that string but now i’m going to compare and send some mails if a state goes off…
ah ok, yes, thats why i included the – in the middle of data1 and data2 , was easier to count and to see it visible
wireshark my friend opened wireshark, started a wifi adapter and then open dobiss evolution pro and looked for the inputs module, when this was open wireshark shows me the data of the action taken
whats also nice to know, now with your switches on the wall, probaly niko, you can only turn on/off dobiss stuff
what i also did before , you can make a dummy mood , that actually does nothing, just turn nothing on
so your niko switchs turns on / off a mood, just collect the state , like you do with a light, based on that state , you can controll whatever you want in HA? like for example , turn on a television and cast a nice aquarium to it with chromecast
1 Like
i believe to receive the state of a mood, starts with 57
but you need to setup a higer scan_interval then offcourse… you dont want to wait 10 sec before the televison goes on
well the sequence should start when I push the button a shell_command (?) - no polling of the state I guess?
i am not sure what you mean?
if you have a push button then if HA doesn’t see the state then nothing will be started, therefore it might be better to do a shell_command from the button to start the mood, on the other side we might can ‘set’ a flag and reset it when the mood have been actioned
ahh, for the television stuff , yeah but i was wrong, i dont receive state of a mood
i receive the state of a “program” in dobiss,
so i created a dummy program, a program can be on or off …
so with a switch i toggle a program, not a mood , i was wrong
great idea anyway! now I know the states of my universal inputs, do you know can we send a mail by HA or should I do it with python?
why do you want to send a mail ? why do you want a mail to see if your lights is on ?
for my alarm, I would like to start a mood as well
so your alarm send a mail when it is armed/disarmed? yeah i do that too , cause my alarm doesnt have an integration with HA (yet)
so is setup a seperate inbox , that i poll every 5 sec, so if i go to sleep or arm the house, i turn off every light and media players and television, i do it like below :
#home mode uit
- alias: Home mode uit
initial_state: 'on'
trigger:
- entity_id: sensor.alarmmail
platform: state
condition:
- condition: template
value_template: '{{ "Event Full Set" in states.sensor.alarmmail.attributes.body }}'
action:
- service: shell_command.emptyinbox
- service: switch.turn_off
entity_id: switch.home_mode
# - service: input_boolean.turn_off
# entity_id: input_boolean.homemode
- service: remote.turn_off
entity_id: remote.harmony
- service: media_player.turn_off
entity_id: media_player.chromecast
- service: media_player.turn_off
entity_id: media_player.spotify
- service: media_player.turn_off
entity_id: media_player.denon_avrx4000
- service: media_player.turn_off
entity_id: media_player.zone2
- service: media_player.turn_off
entity_id: media_player.zone3
- service: switch.turn_off
entity_id: switch.ikea_switch_2
1 Like
hey @Billybobbob i am interested in that wireshark stuff,
nut do you need a managed switch for that? do you need stuff like portfast/spanning tree?
or is is enough to just look at traffic a,d pointing to the dobiss IP + port?
How-to
here you go (click on the How-to link above)