nico0084 / domogik-plugin-notify Goto Github PK
View Code? Open in Web Editor NEWA domogik (www.domogik.org) plugin to send notifications on terminal
License: Other
A domogik (www.domogik.org) plugin to send notifications on terminal
License: Other
2017-03-10 12:54:09,775 domogik-notify INFO Operator Freemobile_sms removed , for device : {'operator': u'Freemobile_sms-web', 'to': u'xxxxx', 'login': u'xxx', 'pwd': u'xxxxxx', 'name': u'T\xe9l\xe9phone Fred'}
ERROR Traceback (most recent call last):
File "/opt/dmg/domogik-mq/src/domogikmq/reqrep/worker.py", line 222, in _on_mpd_message
self.on_mdp_request(mes)
File "bin/notify.py", line 130, in on_mdp_request
Plugin.on_mdp_request(self, msg)
File "/opt/dmg/domogik/src/domogik/common/plugin.py", line 770, in on_mdp_request
self._mdp_reply_client_stop(msg)
File "/opt/dmg/domogik/src/domogik/common/plugin.py", line 848, in _mdp_reply_client_stop
self.force_leave()
File "/opt/dmg/domogik/src/domogik/common/plugin.py", line 1235, in force_leave
cb()
File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify.py", line 39, in stop
for id in self.clients : self.clients[id].close()
File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify_client.py", line 86, in close
self._log.info("Close notification client {0} and his operator {1}".format(self.name, self.operator))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
In develop branch, you may add a u"" for all strings.
See the error :
2017-01-26 21:54:24,840 domogik-notify DEBUG Device list refreshed: [{u'info_changed': u'2017-01-26 21:52:01', u'commands': {u'send_msg': {u'return_confirmation': True, u'id': 59, u'parameters': [{u'conversion': u'', u'key': u'body', u'data_type': u'DT_String'}], u'name': u'Send a message'}}, u'description': u'', u'reference': u'', u'xpl_stats': {}, u'xpl_commands': {}, u'client_version': u'0.3.0', u'client_id': u'plugin-notify.ambre', u'device_type_id': u'notify.smsweb', u'sensors': {u'error_send': {u'conversion': u'', u'value_min': None, u'data_type': u'DT_String', u'reference': u'error_send', u'last_received': None, u'value_max': None, u'incremental': False, u'timeout': 0, u'formula': None, u'last_value': None, u'id': 500, u'name': u'Message error send'}, u'msg_status': {u'conversion': u'', u'value_min': None, u'data_type': u'DT_String', u'reference': u'msg_status', u'last_received': None, u'value_max': None, u'incremental': False, u'timeout': 0, u'formula': None, u'last_value': None, u'id': 499, u'name': u'Message status send '}}, u'parameters': {u'operator': {u'key': u'operator', u'type': u'choice', u'id': 81, u'value': u'Freemobile_sms-web'}, u'to': {u'key': u'to', u'type': u'string', u'id': 80, u'value': u'0688459268'}, u'login': {u'key': u'login', u'type': u'string', u'id': 82, u'value': u'xxxxxx'}, u'pwd': {u'key': u'pwd', u'type': u'password', u'id': 83, u'value': u'xxxxx'}}, u'id': 114, u'name': u'T\xe9l\xe9phone xxxx'}]
2017-01-26 21:54:24,841 domogik-notify INFO Manager Notify Clients is ready.
2017-01-26 21:54:24,842 domogik-notify ERROR Traceback (most recent call last):
File "bin/notify.py", line 76, in __init__
if self.managerClients.addClient(a_device) :
File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify.py", line 43, in addClient
name = getClientId(instance)
File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify_client.py", line 57, in getClientId
return "{0}_{1}".format(device['name'], + device['id'])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
Hi,
When the plugin starts, the user receive a notification. The same when the plugin stops.
Some user may find this usefull... on my side, my domogik is restarted each night and so the plugin will be...
Could you add an option to disable this feature ?
Thanks,
If I send a message with accent it doesn't pass the command.
With apostoph seems ok but no accent :(
Using freemobile
When i send message via REST url (/rest/cmd/id/6?body=test for example), Domogik answer me {"msg": "XPL gateway does not respond"}
However, the first message is sent (send_at_start)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.