Skip to content

Commit

Permalink
Merge pull request #10 from jp112sdl/dev_hb-dis-ep42-bw-mains
Browse files Browse the repository at this point in the history
Dev hb dis ep42 bw mains
  • Loading branch information
jp112sdl authored Apr 23, 2019
2 parents 76c922b + 21dcb37 commit ce57c42
Show file tree
Hide file tree
Showing 33 changed files with 666 additions and 53 deletions.
3 changes: 2 additions & 1 deletion patchsource/www/config/ic_common.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ proc cmd_link_paramset2 {iface address pps_descr pps ps_type {pnr 0}} {
set hmDisEPIdentifier "HM-Dis-EP-WM55"
set hmDisWM55Identifier "HM-Dis-WM55"
set hbDis42BWIdentifier "HB-DIS-EP-42BW"
set hbDis42BWMainsIdentifier "HB-DIS-EP-42BW-MAINS"
set hbRc12EpcIdentifier "HB-RC-12-EP-C"
set hbRc12EpBwIdentifier "HB-RC-12-EP-BW"

Expand Down Expand Up @@ -1176,7 +1177,7 @@ proc cmd_link_paramset2 {iface address pps_descr pps ps_type {pnr 0}} {
append s "<td><input type=\"text\" name=\"$param_id\" maxlength=\"10\" onblur=\"encodeStringStatusDisplay('$idval', true);\" value=\"$value\" $id $access /></td>"
}
} else {
if {($parent_type == $hbDis42BWIdentifier)} then {
if {(($parent_type == $hbDis42BWIdentifier) || ($parent_type == $hbDis42BWMainsIdentifier))} then {
if {$param_id == "TEXTLINE_1"} {
append s "<td>[expr $chn * 2 - 1]&nbsp;&nbsp;<input type=\"text\" name=\"$param_id\" maxlength=\"16\" onblur=\"encodeStringStatusDisplay('$idval', true);\" value=\"$value\" $id $access /></td>"
} else {
Expand Down
2 changes: 1 addition & 1 deletion patchsource/www/rega/esp/functions.fn
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function ::showHideRFChannel() {
}

! HB Status Display EPaper 42BW
if(( (oDevHssType == "HB-DIS-EP-42BW") ) && (chNumber == 11)) {
if(( (oDevHssType == "HB-DIS-EP-42BW") || (oDevHssType == "HB-DIS-EP-42BW-MAINS") ) && (chNumber == 11)) {
! Hide channel 11 of this device
bShowChannel = false;
}
Expand Down
8 changes: 6 additions & 2 deletions patchsource/www/rega/esp/side.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
string hm_statusDisplay = "HM-Dis-WM55";
string hm_statusDisplayEPaper = "HM-Dis-EP-WM55";
string hb_statusDisplayEPaper = "HB-DIS-EP-42BW";
string hb_statusDisplayEPaperMains = "HB-DIS-EP-42BW-MAINS";
string hm_rgbw_controller = "HM-LC-RGBW-WM";
string hm_jalousieActor = "HM-LC-Ja1PBU";
string heatingClimateControlTransceiver = "HEATING_CLIMATECONTROL_TRANSCEIVER";
Expand Down Expand Up @@ -458,6 +459,7 @@
integer statusDisplayDevice = hm_statusDisplay.Find(chLabel);
integer statusDisplayEPaperDevice = hm_statusDisplayEPaper.Find(chLabel);
integer statusHbDisplayEPaperDevice = hb_statusDisplayEPaper.Find(chLabel);
integer statusHbDisplayEPaperDeviceMains = hb_statusDisplayEPaperMains.Find(chLabel);
integer rgbw_controller = chLabel.Find(hm_rgbw_controller);
integer i_vir_lg_rgb_dim = chLabel.Find(s_vir_lg_rgb_dim);
integer i_vir_lg_rgbw_dim = chLabel.Find(s_vir_lg_rgbw_dim);
Expand All @@ -467,6 +469,7 @@
if ((statusDisplayDevice != -1)
|| (statusDisplayEPaperDevice != -1)
|| (statusHbDisplayEPaperDevice != -1)
|| (statusHbDisplayEPaperDeviceMains != -1)
|| (rgbw_controller != -1)
|| ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1))
|| (((i_vir_lg_rgb_dim != - 1) && (oDP.HSSID().Find("RGB") != -1)) || ((i_vir_lg_rgbw_dim != - 1) && (oDP.HSSID().Find("RGBW") != -1)) || (( i_vir_lg_group != - 1) && (oDP.HSSID().Find("RGBW") != -1)))
Expand All @@ -487,7 +490,7 @@
Write( '<input id="prgStringOptionValue'#oSD.ID()#'" onfocus="SetStatusDisplay('#oSD.ID()#',\'DIS-EP\');" type="text" class="SelectBox" size="10" value="'#iV#'" onchange="iseSingleDestination.SetValue('#oSD.ID()#',this.value,\'STRING\');" /> ' );
}

if (statusHbDisplayEPaperDevice != -1) {
if (statusHbDisplayEPaperDevice != -1 || statusHbDisplayEPaperDeviceMain != -1) {
if(iV == "1") {
! This is the default string for 'all values not used'
iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03";
Expand Down Expand Up @@ -546,6 +549,7 @@
&& (statusDisplayDevice == -1)
&& (statusDisplayEPaperDevice == -1)
&& (statusHbDisplayEPaperDevice == -1)
&& (statusHbDisplayEPaperDeviceMains == -1)
&& (rgbw_controller == -1)
&& (jalousieActor == -1)
&& (i_vir_lg_rgb_dim == -1)
Expand All @@ -572,7 +576,7 @@
if (statusDisplayEPaperDevice != -1) {
Write( '<span id="setStatusDisplayEPaper'#oSD.ID()#'" class="CLASS02401" onclick="SetStatusDisplay('#oSD.ID()#',\'DIS-EP\');"><img src="/ise/img/notepad.png" /></span>' );
}
if (statusHbDisplayEPaperDevice != -1) {
if (statusHbDisplayEPaperDevice != -1 || statusHbDisplayEPaperDeviceMains != -1) {
Write( '<span id="setHbStatusDisplayEPaper'#oSD.ID()#'" class="CLASS02401" onclick="SetStatusDisplay('#oSD.ID()#',\'DIS-EP42BW\');"><img src="/ise/img/notepad.png" /></span>' );
}
if (rgbw_controller != -1) {
Expand Down
8 changes: 6 additions & 2 deletions patchsource/www/rega/esp/side.inc-3.45
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

string hb_oump3led = "HB-OU-MP3-LED";
string hb_statusDisplayEPaper = "HB-DIS-EP-42BW";
string hb_statusDisplayEPaperMains = "HB-DIS-EP-42BW-MAINS";
string hm_ouled16 = "HM-OU-LED16";
string hm_oucfm = "HM-OU-CFM-Pl";
string hm_oucfmTW = "HM-OU-CFM-TW";
Expand Down Expand Up @@ -465,6 +466,7 @@

integer oump3led = chLabel.Find(hb_oump3led);
integer statusHbDisplayEPaperDevice = hb_statusDisplayEPaper.Find(chLabel);
integer statusHbDisplayEPaperDeviceMains = hb_statusDisplayEPaperMains.Find(chLabel);
integer ouled16 = chLabel.Find(hm_ouled16);
integer oucfm = chLabel.Find(hm_oucfm);
integer oucfmTW = chLabel.Find(hm_oucfmTW);
Expand All @@ -482,6 +484,7 @@
if ((statusDisplayDevice != -1)
|| (statusDisplayEPaperDevice != -1)
|| (statusHbDisplayEPaperDevice != -1)
|| (statusHbDisplayEPaperDeviceMains != -1)
|| (ePaperAcousticDisplay != -1)
|| (rgbw_controller != -1)
|| ((jalousieActor != - 1) && (oDP.HSSID().Find("LEVEL_COMBINED") != -1))
Expand All @@ -503,7 +506,7 @@
Write( '<input id="prgStringOptionValue'#oSD.ID()#'" onfocus="SetStatusDisplay('#oSD.ID()#',\'DIS-EP\');" type="text" class="SelectBox" size="10" value="'#iV#'" onchange="iseSingleDestination.SetValue('#oSD.ID()#',this.value,\'STRING\');" /> ' );
}

if (statusHbDisplayEPaperDevice != -1) {
if (statusHbDisplayEPaperDevice != -1 || statusHbDisplayEPaperDeviceMains != -1) {
if(iV == "1") {
! This is the default string for 'all values not used'
iV = "0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x03";
Expand Down Expand Up @@ -565,6 +568,7 @@
if((ouled16 == -1)
&& (oump3led == -1)
&& (statusHbDisplayEPaperDevice == -1)
&& (statusHbDisplayEPaperDeviceMains == -1)
&& (oucfm == -1)
&& (oucfmTW == -1)
&& (oucmpcb == -1)
Expand Down Expand Up @@ -598,7 +602,7 @@
if (statusDisplayEPaperDevice != -1) {
Write( '<span id="setStatusDisplayEPaper'#oSD.ID()#'" class="CLASS02401" onclick="SetStatusDisplay('#oSD.ID()#',\'DIS-EP\');"><img src="/ise/img/notepad.png" /></span>' );
}
if (statusHbDisplayEPaperDevice != -1) {
if (statusHbDisplayEPaperDevice != -1 || statusHbDisplayEPaperDeviceMains != -1) {
Write( '<span id="setHbStatusDisplayEPaper'#oSD.ID()#'" class="CLASS02401" onclick="SetStatusDisplay('#oSD.ID()#',\'DIS-EP42BW\');"><img src="/ise/img/notepad.png" /></span>' );
}
if (ePaperAcousticDisplay != -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/addon/firmware/rftypes/hb-dis-ep-42bw_e_v1_1.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<device version="1" rx_modes="BURST" supports_aes="true">
<supported_types>
<type name="HB Wireless 4.2 inch bw e-Paper Status Display with push button" id="HB-DIS-EP-42BW" updatable="false" priority="2">
<type name="HB Wireless 4.2 inch bw e-Paper Status Display with push button, battery powered" id="HB-DIS-EP-42BW" updatable="false" priority="2">
<parameter index="9.0" size="1.0" cond_op="E" const_value="0x11"/>
<parameter index="10.0" size="2.0" const_value="0xF343"/>
</type>
Expand Down
215 changes: 215 additions & 0 deletions src/addon/firmware/rftypes/hb-dis-ep-42bw_e_v1_1_mains.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<device version="1" supports_aes="true">
<supported_types>
<type name="HB Wireless 4.2 inch bw e-Paper Status Display with push button, mains powered" id="HB-DIS-EP-42BW-MAINS" updatable="false" priority="2">
<parameter index="9.0" size="1.0" cond_op="E" const_value="0x11"/>
<parameter index="10.0" size="2.0" const_value="0xF353"/>
</type>
</supported_types>
<paramset type="MASTER" id="HB-DIS-EP-42BW_dev_master">
<parameter id="DISPLAY_INVERTING">
<logical type="boolean" default="false"/>
<physical type="integer" interface="config" list="0" index="6.0" size="0.1"/>
</parameter>
<parameter id="HB_DISPLAY_REFRESH_WAIT_TIME">
<logical type="float" min="0.0" max="25.5" default="5.0" unit="s"/>
<physical type="integer" interface="config" list="0" index="7.0" size="1"/>
<conversion type="float_integer_scale" factor="10"/>
</parameter>
<parameter id="DEVICE_LED_MODE">
<logical type="option">
<option id="OFF"/>
<option id="ON" default="true"/>
</logical>
<physical type="integer" interface="config" list="0" index="5.6" size="0.2"/>
<conversion type="integer_integer_map">
<value_map device_value="0x00" parameter_value="0"/>
<value_map device_value="0x01" parameter_value="1"/>
</conversion>
</parameter>
</paramset>
<channels>
<channel index="0" type="MAINTENANCE" ui_flags="internal" class="maintenance" count="1">
<paramset type="MASTER" id="maint_ch_master"/>
<paramset type="VALUES" id="maint_ch_values">
<parameter id="UNREACH" operations="read,event" ui_flags="service">
<logical type="boolean"/>
<physical type="integer" interface="internal" value_id="UNREACH"/>
</parameter>
<parameter id="STICKY_UNREACH" operations="read,write,event" ui_flags="service,sticky">
<logical type="boolean"/>
<physical type="integer" interface="internal" value_id="STICKY_UNREACH"/>
</parameter>
<parameter id="CONFIG_PENDING" operations="read,event" ui_flags="service">
<logical type="boolean"/>
<physical type="integer" interface="internal" value_id="CONFIG_PENDING"/>
</parameter>
<parameter id="AES_KEY" operations="read" ui_flags="invisible">
<logical type="integer" min="0" max="127"/>
<physical type="integer" interface="internal" value_id="AES_KEY"/>
</parameter>
<parameter id="RSSI_DEVICE" operations="read,event">
<logical type="integer"/>
<physical type="integer" interface="internal" value_id="RSSI_DEVICE"/>
</parameter>
<parameter id="RSSI_PEER" operations="read,event">
<logical type="integer"/>
<physical type="integer" interface="internal" value_id="RSSI_PEER"/>
</parameter>
<parameter id="DEVICE_IN_BOOTLOADER" operations="read,event" ui_flags="service">
<logical type="boolean"/>
<physical type="integer" interface="internal" value_id="DEVICE_IN_BOOTLOADER"/>
</parameter>
<parameter id="UPDATE_PENDING" operations="read,event" ui_flags="service">
<logical type="boolean"/>
<physical type="integer" interface="internal" value_id="UPDATE_PENDING"/>
</parameter>
</paramset>
</channel>
<channel autoregister="true" index="1" type="KEY" count="10" pair_function="BA" function="A" paired="true" aes_default="false">
<link_roles>
<source name="SWITCH"/>
<source name="KEYMATIC"/>
<source name="WINMATIC"/>
<source name="REMOTECONTROL_RECEIVER"/>
</link_roles>
<paramset type="MASTER" id="remote_ch_master">
<subset ref="key_paramset"/>
</paramset>
<paramset type="VALUES" id="remote_ch_values">
<subset ref="key_valueset"/>
</paramset>
<paramset type="LINK" id="remote_ch_link">
<subset ref="key_linkset"/>
</paramset>
</channel>
<channel autoregister="true" index="11" type="KEY" count="1" function="A" paired="false" aes_default="false">
<link_roles/>
<paramset type="MASTER" id="remotestatus_ch_master"/>
<paramset type="VALUES" id="remotestatus_ch_values">
<subset ref="key_valueset_2"/>
</paramset>
</channel>
</channels>
<frames>
<frame id="KEY_EVENT_SHORT" direction="from_device" allowed_receivers="CENTRAL,BROADCAST,OTHER" event="true" type="0x40" channel_field="9:0.6">
<parameter type="integer" index="9.6" size="0.1" const_value="0"/>
<parameter type="integer" index="10.0" size="1.0" param="COUNTER"/>
<parameter type="integer" index="10.0" size="1.0" param="TEST_COUNTER"/>
</frame>
<frame id="KEY_EVENT_LONG" direction="from_device" allowed_receivers="CENTRAL,BROADCAST,OTHER" event="true" type="0x40" channel_field="9:0.6">
<parameter type="integer" index="9.6" size="0.1" const_value="1"/>
<parameter type="integer" index="10.0" size="1.0" param="COUNTER"/>
<parameter type="integer" index="10.0" size="1.0" param="TEST_COUNTER"/>
</frame>
<frame id="KEY_EVENT_LONG_BIDI" direction="from_device" allowed_receivers="CENTRAL,BROADCAST,OTHER" event="true" type="0x40" channel_field="9:0.6">
<parameter type="integer" index="1.5" size="0.1" const_value="1"/>
<parameter type="integer" index="9.6" size="0.1" const_value="1"/>
<parameter type="integer" index="10.0" size="1.0" param="COUNTER"/>
<parameter type="integer" index="10.0" size="1.0" param="TEST_COUNTER"/>
</frame>
<frame id="KEY_SIM_SHORT" direction="from_device" type="0x40" channel_field="9:0.6">
<parameter type="integer" index="9.6" size="0.1" const_value="0"/>
<parameter type="integer" index="9.7" size="0.1" const_value="0"/>
<parameter type="integer" index="10.0" size="1.0" param="SIM_COUNTER"/>
</frame>
<frame id="KEY_SIM_LONG" direction="from_device" type="0x40" channel_field="9:0.6">
<parameter type="integer" index="9.6" size="0.1" const_value="1"/>
<parameter type="integer" index="9.7" size="0.1" const_value="0"/>
<parameter type="integer" index="10.0" size="1.0" param="SIM_COUNTER"/>
</frame>
</frames>
<paramset_defs>
<paramset id="key_valueset">
<parameter id="PRESS_SHORT" operations="write,event" loopback="true" control="BUTTON.SHORT" burst_suppression="0">
<logical type="action"/>
<physical type="integer" interface="command" value_id="COUNTER">
<event frame="KEY_EVENT_SHORT" auth_violate_policy="reject"/>
<set request="KEY_SIM_SHORT"/>
</physical>
<conversion type="action_key_counter" sim_counter="SIM_COUNTER"/>
</parameter>
<parameter id="PRESS_LONG" operations="write,event" loopback="true" control="BUTTON.LONG">
<logical type="action"/>
<physical type="integer" interface="command" value_id="COUNTER">
<event frame="KEY_EVENT_LONG" auth_violate_policy="reject"/>
<set request="KEY_SIM_LONG"/>
</physical>
<conversion type="action_key_counter" sim_counter="SIM_COUNTER"/>
</parameter>
<parameter id="PRESS_LONG_RELEASE" operations="event" ui_flags="internal" burst_suppression="0">
<logical type="action"/>
<physical type="integer" interface="command" value_id="COUNTER">
<event frame="KEY_EVENT_LONG_BIDI" auth_violate_policy="reject"/>
</physical>
</parameter>
<parameter id="PRESS_CONT" operations="event" ui_flags="internal" burst_suppression="0">
<logical type="action"/>
<physical type="integer" interface="command" value_id="COUNTER">
<event frame="KEY_EVENT_LONG" auth_violate_policy="reject"/>
</physical>
<conversion type="action_key_same_counter" sim_counter="SIM_CONT_COUNTER"/>
</parameter>
<parameter id="INSTALL_TEST" operations="event" ui_flags="internal">
<logical type="action"/>
<physical type="integer" interface="command" value_id="TEST_COUNTER">
<event frame="KEY_EVENT_SHORT"/>
<event frame="KEY_EVENT_LONG"/>
</physical>
</parameter>
</paramset>
<paramset id="key_paramset">
<parameter id="AES_ACTIVE" ui_flags="internal">
<logical type="boolean" default="false"/>
<physical type="boolean" interface="internal" value_id="AES"/>
</parameter>
<parameter id="HB_EP_SHOW_LINE">
<logical type="boolean" default="false"/>
<physical type="integer" interface="config" list="1" index="144.0" size="0.1"/>
</parameter>
<parameter id="HB_EP_ALIGNMENT">
<logical type="option">
<option id="HB_EP_ALIGN_RIGHT" default="true" />
<option id="HB_EP_ALIGN_CENTER_ICON_RIGHT" />
<option id="HB_EP_ALIGN_CENTER_ICON_LEFT" />
<option id="HB_EP_ALIGN_LEFT" />
</logical>
<physical type="integer" interface="config" list="1" index="145.0" size="1"/>
<conversion type="option_integer">
<value_map device_value="0x00" parameter_value="0"/>
<value_map device_value="0x01" parameter_value="1"/>
<value_map device_value="0x03" parameter_value="2"/>
<value_map device_value="0x02" parameter_value="3"/>
</conversion>
</parameter>
<parameter id="TEXTLINE_1">
<logical type="string"/>
<physical type="string" interface="config_string" list="1" index="54" size="16"/>
</parameter>
<parameter id="TEXTLINE_2">
<logical type="string"/>
<physical type="string" interface="config_string" list="1" index="70" size="16"/>
</parameter>
</paramset>
<paramset id="key_linkset">
<parameter id="PEER_NEEDS_BURST">
<logical type="boolean" default="false"/>
<physical type="integer" interface="config" list="4" index="1.0" size="0.1"/>
</parameter>
<parameter id="EXPECT_AES">
<logical type="boolean" default="false"/>
<physical type="integer" interface="config" list="4" index="1.7" size="0.1"/>
</parameter>
<enforce id="EXPECT_AES" value="$PEER.AES"/>
</paramset>
<paramset id="key_valueset_2">
<parameter id="SUBMIT" operations="write" control="NONE">
<logical type="string"/>
<physical type="string" interface="multiframe_command" value_id="SUBMIT_VALUE">
<multiframe_command_frame max_frames="12" direction="to_device" type="0x11" subtype="0x80" subtype_index="9" channel_field="10.0" payload_index="11" send_immidiately="true" wakeup_on_immidiate_send_failure="false"/>
</physical>
<conversion type="hexstring_bytearray"/>
</parameter>
</paramset>
</paramset_defs>
</device>
Loading

0 comments on commit ce57c42

Please sign in to comment.