UniversalDevicesInc-PG3 / udi-poly-notification

Polyglot v2 NodeServer for Notifications
MIT License
2 stars 1 forks source link

Not all service node defaults are being passed to send #29

Closed jimboca closed 3 years ago

jimboca commented 3 years ago

The priority and sound did not get passed to the /send ?

2021-07-25 11:26:47,919 Thread-1   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:do_send: params={'message': '<b>Kitchen Freezer:</b> -7.5°F&nbsp;&nbsp;&nbsp;51.5%\n&nbsp;&nbsp;&nbsp;&nbsp;Battary Voltage: 3.9 Volts\n\n2021/07/25 11:26:49 AM\n', 'node': 'po_wtag'}
2021-07-25 11:26:47,920 Thread-1   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:get_pushover_priority: val=None
2021-07-25 11:26:47,920 Thread-1   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:get_pushover_priority: val=0
2021-07-25 11:26:47,921 Thread-1   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:get_pushover_sound: val=None
2021-07-25 11:26:47,922 Thread-1   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:get_pushover_sound: val=103
2021-07-25 11:26:47,923 Thread-7   polyinterface      INFO     Pushover:l_info: pushover_wtag:Service Pushover wtag:set_error: 0
2021-07-25 11:26:47,924 Thread-1   polyinterface      INFO     PolyglotREST:log_message: wtHandler:log_message"POST /send?node=po_wtag HTTP/1.1" 200 -

Confirmed this was caused by previous change so it was passing the sound index to pushover instead of sound name.

MrBill12 commented 3 years ago

I should add I don't know if the HTML parameter is actually getting passed or if pushover defaults to HTML the body of the NR is:

<b>${sys.node.n004_84e7b435fe8785.name}:</b> ${sys.node.n004_84e7b435fe8785.CLITEMP}&nbsp;&nbsp;&nbsp;${sys.node.n004_84e7b435fe8785.CLIHUM}
&nbsp;&nbsp;&nbsp;&nbsp;Battary Voltage: ${sys.node.n004_84e7b435fe8785.CV}

${sys.date} ${sys.time12}

(finally got the right markdown)

jimboca commented 3 years ago

The default is not html, you should see html 1 if enabled:

2021-07-25 12:26:40,815 Thread-7   polyinterface      DEBUG    Pushover:l_debug: pushover_devel:Service Pushover devel:post: params={'message': 'This is the body', 'node': 'po_devel', 'Subject': 'My Subject', 'device': 'JimsPhone', 'priority': 0, 'sound': 'cashregister', 'html': 1, 'user': '...', 'token': '...'}