Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- connection:
- To discover a rev ritter iComfort gateway send a UDP packet as BROADCAST to port 5556
- with payload message "D", the response from a gateway is send to udp port 5556 as broadcast...
- to cummunicate with a gateway use tcp port 5555 (netcat will do fine in default mode).
- first explain a few parameters used in requests and responses:
- a=0099CCCC -> a = device adress (0099CCCC is an invalid example), unknown for now is which device ID rages are for which kind of devices (e.g. power switches and power dimming devices)
- h=0 -> h = a handler id for a timeplan (valid from 0-31)
- d=3F -> d = Device status: 00=off, 3F=on (for dimming devices, NO \n at the end of the line!); D0= unidentified internal code seen only on non exitent devices like 9999D026, FF=slot/handle unused
- y=1320 -> y = minutes after midnight a status event from a timeplan is triggered (180=03:00am;1320=22:00pm); 65535=unused/invalidated shedule
- z=0011111 -> z = bit mask for days of week, high=sun, low=mon -> 0000001 is monday (1000000-> sunday, 0000010 -> tuesday, 0010100 -> friday + wednesday, 0011111 -> fri-mo, 1000001 -> sun+mon)
- commands, most require to send a "\n" at teh end of the line, but not all!:
- G\n -> status of all devices, only active devices returned
- G?a=0099CCCC\n -> status of selected device (kind of unreliable, not recomended)
- R\n -> list of all Timeplans
- B\n -> reboot gateway
- S?a=0099CCCC&d=00\n -> switch device XX to status off, for dimming devices a hex value
- between 00 and 3F is valid, but you must use NO \n at the end of
- the line (S?a=0099CCCC&d=1A for example)
- W?d=00&z=0000001&y=60&h=1&a=0099CCCC -> (important: no \n at end of line!)
- set timeplan handle id 1 for device 0099CCCC to
- set switch to state "on" at01:00am on monday
- response:
- after sending a command you get one or two responses, dependig if the device responded
- imideately with a positive result to the gateway.
- all communications with devices is bidectional, they confirm the commands recived -
- and the gateway does re-send the commands by default. Because of timing
- offsets you might recieve two responses or only one.
- In general sending a command to a device that was not active in the last minutes gives
- two responses, first being a failure. Also changing the stats usualy gives two responses,
- sucessfull for both if the device had been active in the last minutes.
- sending a command imideately a second time to the gateway gives usualy only one successful response.
- Important is to only check the last response, the first one can be an error or not.
- If in doubt always repeat any command.
- Error responses are staring with "F", suscessfull responses start with "G" for status or switch commands
- and "R" for time shedule commands.
- This is the response to "S?a=0099CCCC&d=00\n"
- F?a=0099CCCC
- G?a=0099CCCC&d=00
- If repeated the response is:
- G?a=0099CCCC&d=3F
- An imideately triggered status change (S?a=0099CCCC&d=3F\n) responses:
- G?a=0099CCCC&d=3F
- G?a=0099CCCC&d=3F
- For a new or changed time shedule command and response look like this (no \n at the end of the line):
- command "W?a=0099CCCC&d=00&h=0&y=180&z=1111111"
- response "R?a=0099CCCC&d=00&h=0&y=180&z=1111111"
- a=99999999 or a=FFFFFFFF indicate unused timeplan slots, h=X is the identifier of the timeslot (0-31)
- Important: to create a new time shedule you must pick an unused slot,
- unsed slots are having a=99999999 when they had been used but where cleared or a=FFFFFFFF when they never had been used.
- Some slots may remain in unclear status, like a=9999D026 (not a valid device ID)
- or refer to device ID's no longer used with he gateway, e.g. a broken device or one no langer used on that gateway.
- You should reset unclear timer handles with a unused setting like:
- "W?a=99999999&d=00&h=13&y=0&z=0000000\n" when you encounter unclear status or device ID fields.
- The clear command may end with \n but I suggest to use the default format for clearing:
- "W?d=00&z=0000000&y=0&h=26&a=99999999"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement