vdomos / domogik-plugin-onewired Goto Github PK
View Code? Open in Web Editor NEWAnother Domogik (no xPL) plugin for 1-wire bus
Another Domogik (no xPL) plugin for 1-wire bus
Salut,
Je n'ai pas de onewire mais en debugant celui de tikismoke je suis tombé sur la perte des sensors progressive après plusieurs read.
2016-02-04 23:28:13,112 domogik-onewired INFO ==> Reading sensor '/28.551F2C030000/temperature'
2016-02-04 23:28:13,112 domogik-onewired INFO ==> Reading sensor '/28.9CEB2B030000/temperature'
2016-02-04 23:28:13,313 domogik-onewired ERROR ### Sensor '28.551F2C030000' NOT FOUND.
2016-02-04 23:28:13,314 domogik-onewired ERROR ### Sensor '28.9CEB2B030000' NOT FOUND.
2016-02-04 23:28:13,314 domogik-onewired ERROR Traceback (most recent call last):
File "/var/lib/domogik/domogik_packages/plugin_onewired/lib/onewired.py", line 93, in readSensor
value = ow.owfs_get(str(sensor)).strip() # Ex.: ow.owfs_get('/26.D050E7000000/B1-R1-A/pressure')
File "/usr/lib/python2.7/dist-packages/ow/init.py", line 159, in _get
raise exUnknownSensor(path)
exUnknownSensor: '/28.551F2C030000/temperature'
2016-02-04 23:28:13,315 domogik-onewired DEBUG => 'Couloir premier étage' : wait for 60.0 seconds
2016-02-04 23:28:13,315 domogik-onewired ERROR Traceback (most recent call last):
File "/var/lib/domogik/domogik_packages/plugin_onewired/lib/onewired.py", line 93, in readSensor
value = ow.owfs_get(str(sensor)).strip() # Ex.: ow.owfs_get('/26.D050E7000000/B1-R1-A/pressure')
File "/usr/lib/python2.7/dist-packages/ow/init.py", line 159, in _get
raise exUnknownSensor(path)
exUnknownSensor: '/28.9CEB2B030000/temperature'
Il semblerait que cela provienne de la config de certains GPIO, voir la discution suivante : ow Python makes sensors disappear surtout la fin.
Have to put this on udevrules under debian jessie (domogik 0.5.2) :
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04fa", ATTRS{idProduct}=="2490", SYMLINK+="onewire", MODE="0666
Here's the log for the plugin :
`2017-05-29 14:00:26,617 domogik-onewired INFO Value for '1-wire_cache' is : N
2017-05-29 14:00:26,617 domogik-onewired INFO Casting value for key '1-wire_cache' in type 'boolean'...
2017-05-29 14:00:26,618 domogik-onewired INFO Value is : False
2017-05-29 14:00:26,618 domogik-onewired INFO Retrieve the devices list for this client...
2017-05-29 14:00:26,675 domogik-onewired INFO - id : 55 / name : baie serveurs / device type id : onewire.thermometer_temp
2017-05-29 14:00:26,675 domogik-onewired INFO xpl_stats features :
2017-05-29 14:00:26,676 domogik-onewired INFO xpl_commands features :
2017-05-29 14:00:26,677 domogik-onewired INFO ==> OWFS version : 2.9p8
2017-05-29 14:00:26,841 domogik-onewired ERROR ### Access to onewire device is not possible: Traceback (most recent call last):
File "/var/lib/domogik/domogik_packages/plugin_onewired/lib/onewired.py", line 69, in init
ow.init(dev)
File "/usr/lib/python2.7/dist-packages/ow/init.py", line 224, in init
raise exNoController
exNoController
2017-05-29 14:00:26,842 domogik-onewired DEBUG force_leave called
2017-05-29 14:00:26,842 domogik-onewired DEBUG Send client status : stopped
2017-05-29 14:00:26,846 domogik-onewired INFO The thread send_status_loop was not registered, killing it
2017-05-29 14:00:26,888 domogik-onewired INFO Thread send_status_loop stopped.
2017-05-29 14:00:26,889 domogik-onewired INFO The thread send_process_info was not registered, killing it
2017-05-29 14:00:26,889 domogik-onewired INFO Thread send_process_info stopped.
2017-05-29 14:00:26,953 domogik-onewired DEBUG Delete the file /var/run/domogik//onewired_return_code_1273
2017-05-29 14:00:26,953 domogik-onewired DEBUG del Single client
2017-05-29 14:00:26,954 domogik-onewired DEBUG force_leave called
`
Got amail alert at 9h41:
Here is the log:
2016-01-26 09:40:22,875 domogik-onewired DEBUG Send client status : alive
2016-01-26 09:40:22,875 domogik-onewired DEBUG => 'Chambre parents' : wait for 60.0 seconds
2016-01-26 09:40:37,875 domogik-onewired DEBUG Send client status : alive
2016-01-26 09:40:51,992 domogik-onewired INFO ==> Reading sensor '/28.D4152C030000/temperature'
2016-01-26 09:40:55,800 domogik-onewired DEBUG Send client status : alive
2016-01-26 09:40:55,800 domogik-onewired DEBUG ==> Send 0MQ message '{177: '20.7'}' for device id 51 (Chambre )
2016-01-26 09:40:55,813 domogik-onewired DEBUG Delete the file /var/run/domogik//onewired_return_code_5214
2016-01-26 09:40:55,813 domogik-onewired DEBUG the stack is :
2016-01-26 09:40:56,390 domogik-onewired DEBUG (<frame object at 0x292a8b0>, '/home/domogik/src/domogik/common/baseplugin.py', 291, 'clean_return_code_file', [' for elt in inspect.stack():\n'], 0)
2016-01-26 09:40:56,390 domogik-onewired DEBUG (<frame object at 0x292a1b0>, '/home/domogik/src/domogik/common/plugin.py', 1054, 'watch', [' self._client.clean_return_code_file()\n'], 0)
2016-01-26 09:40:56,390 domogik-onewired DEBUG (<frame object at 0x2936ea0>, '/home/domogik/src/domogik/common/plugin.py', 1032, 'init', [' self.watch()\n'], 0)
2016-01-26 09:40:56,390 domogik-onewired DEBUG (<frame object at 0x22a0430>, '/home/domogik/src/domogik/common/plugin.py', 120, 'init', [' Watcher(self)\n'], 0)
2016-01-26 09:40:56,391 domogik-onewired DEBUG (<frame object at 0x291f5f0>, '/var/lib/domogik//domogik_packages/plugin_onewired/bin/onewired.py', 56, 'init', [" Plugin.init(self, name='onewired')\n"], 0)
2016-01-26 09:40:56,391 domogik-onewired DEBUG (<frame object at 0x2289710>, '/var/lib/domogik//domogik_packages/plugin_onewired/bin/onewired.py', 170, '', [' OnewireNetManager()\n'], 0)
2016-01-26 09:40:56,391 domogik-onewired DEBUG del Single client
2016-01-26 09:40:56,391 domogik-onewired DEBUG the stack is :
2016-01-26 09:40:56,391 domogik-onewired DEBUG (<frame object at 0x29229c0>, '/home/domogik/src/domogik/common/plugin.py', 922, 'del', [' for elt in inspect.stack():\n'], 0)
2016-01-26 09:40:56,392 domogik-onewired DEBUG force_leave called
2016-01-26 09:40:56,392 domogik-onewired DEBUG the stack is :
2016-01-26 09:40:56,392 domogik-onewired DEBUG (<frame object at 0x2287730>, '/home/domogik/src/domogik/common/plugin.py', 936, 'force_leave', [' for elt in inspect.stack():\n'], 0)
2016-01-26 09:40:56,392 domogik-onewired DEBUG (<frame object at 0x29229c0>, '/home/domogik/src/domogik/common/plugin.py', 925, 'del', [' self.force_leave()\n'], 0)
2016-01-26 09:40:56,401 domogik-onewired DEBUG del Single client
2016-01-26 09:40:56,401 domogik-onewired DEBUG the stack is :
2016-01-26 09:40:56,402 domogik-onewired DEBUG (<frame object at 0x2927e00>, '/home/domogik/src/domogik/common/plugin.py', 922, 'del', [' for elt in inspect.stack():\n'], 0)
2016-01-26 09:40:56,402 domogik-onewired DEBUG force_leave called
2016-01-26 09:40:56,402 domogik-onewired DEBUG the stack is :
2016-01-26 09:40:56,402 domogik-onewired DEBUG (<frame object at 0x2287730>, '/home/domogik/src/domogik/common/plugin.py', 936, 'force_leave', [' for elt in inspect.stack():\n'], 0)
2016-01-26 09:40:56,402 domogik-onewired DEBUG (<frame object at 0x2927e00>, '/home/domogik/src/domogik/common/plugin.py', 925, 'del', [' self.force_leave()\n'], 0)
After restarting all is ok, got the right number of device and value.
Ow is not decribed as a dependencies in plugins.
In advanced page in no error in log i got a code 500 from the admin.
Hello,
If, after install of the plugin, you don't chmod +x admin/geterrorlog.sh
you have an error 500 on page with this message :
`
2017-07-28 17:54:19,383 domogik.admin.application INFO http request for /plugin_onewired/plugin-onewired.chzmdomdmg01p received
Command = /var/lib/domogik//domogik_packages/plugin_onewired/admin/geterrorlog.sh
ERROR:tornado.application:Uncaught exception GET /plugin_onewired/plugin-onewired.chzmdomdmg01p (10.10.7.5)
HTTPServerRequest(protocol='https', host='somewhere', method='GET', uri='/plugin_onewired/plugin-onewired.chzmdomdmg01p', version='HTTP/1.1', remote_ip='10.10.7.5', headers={'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'X-Forwarded-Host': 'somewhere', 'X-Forwarded-For': '10.33.205.1', 'Host': 'somewhere', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0', 'Connection': 'upgrade', 'X-Forwarded-Proto': 'https', 'Referer': 'https://somewhere/plugin_onewired/plugin-onewired.chzmdomdmg01p', 'X-Real-Ip': '10.33.205.1', 'Cookie': '__unam=ec216b-15ac8c6ef59-3f07dc05-60; ga=GA1.2.438013598.1489441316; session=.eJw9kL1ugzAUhV-l8pwBCFmQMrTCsYh0r0XkYNkLagnE2LiVoBUxUd69NEP3c77zcyd1N7aTIVn3PkzthtT9hWR38vJBMsJFM4OgixZl0F6lnJVBSTWDhS3mKgVfGWVPDlgRaWt6LostCnpTSTHDck1gefPIjoMSlUU7ePA4KFt5JY49MJpCfg4rc0FWJqvOgocdSAi4OtEar4VKtUS3cmOelzPm6JVtUp5DAFsZ7Q-rx9KuiePDWmmsau_v1z7-T8B2Mlp4W6rMaC4GLTYg71GKCqHyznm8mCUoDtgazSjEYgm1q_7J-5nasfnHfHjF48mYRA.DFzj2Q.jE_YMkSxNr1rwTawwG2pnrFidQs', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.1-py2.7-linux-x86_64.egg/tornado/web.py", line 1488, in _execute
result = self.prepare()
File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.1-py2.7-linux-x86_64.egg/tornado/web.py", line 2774, in prepare
self.fallback(self.request)
File "/usr/local/lib/python2.7/dist-packages/tornado-4.5.1-py2.7-linux-x86_64.egg/tornado/wsgi.py", line 277, in call
WSGIContainer.environ(request), start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1994, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/var/lib/domogik/domogik_packages/plugin_onewired/admin/init.py", line 74, in index
errorlog = get_errorlog(geterrorlogcmd))
File "/var/lib/domogik/domogik_packages/plugin_onewired/admin/init.py", line 44, in get_errorlog
errorlog = subprocess.Popen([cmd], stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
ERROR:tornado.access:500 GET /plugin_onewired/plugin-onewired.chzmdomdmg01p (10.10.7.5) 508.42ms
`
HO un truc pas cool m'arrive...
J'ai fait quelques nouveaux devices dans d'autres plugins, donc je redémarre domogik comme d'hab (avec une longue pause )
2017-01-13 20:22:24,856 domogik-onewired ERROR ### Access to onewire device is not possible: Traceback (most recent call last):
File "/var/lib/domogik/domogik_packages/plugin_onewired/lib/onewired.py", line 69, in init
ow.init(dev)
File "/usr/lib/python2.7/dist-packages/ow/init.py", line 224, in init
raise exNoController
exNoControllerAccess to onewire device is not possible: Traceback (most recent call last):
File "/var/lib/domogik/domogik_packages/plugin_onewired/lib/onewired.py", line 69, in init
ow.init(dev)
File "/usr/lib/python2.7/dist-packages/ow/init.py", line 224, in init
raise exNoController
exNoController2017-01-13 20:22:24,857 domogik-onewired DEBUG force_leave called
Pourtant en python pur un:
import ow
ow.init('u')
s=ow.Sensor ( '/28.9CEB2B030000' )
print s
/28.9CEB2B030000 - DS18B20
root = owSensor( '/' )
print len( [ s for s in root.find( all = True,type = 'DS18B20' ) ] )
9
The package to install for owshell under debian jessie is "ow-shell"
http://domogik-plugin-onewired.readthedocs.io/en/latest/onewired.html#purpose
Why not working on this one:
https://github.com/Cereal2nd/domogik-plugin-onewire
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.