Closed fabiotodesco closed 6 years ago
Please install xmltodict (via pip or package manager). I will try add manual today
Also you can take a look here: https://www.domoticz.com/forum/viewtopic.php?f=65&t=21047&p=168537&hilit=enigma2#p168537
thanks Kofec, i tried to use your instrunction and now my domoticz log is:
2018-01-31 14:36:04.164 (test) 'FloorplanAnimateZoom':'1' 2018-01-31 14:36:04.164 (test) 'LogEventScriptTrigger':'1' 2018-01-31 14:36:04.164 (test) 'FloorplanShowSceneNames':'1' 2018-01-31 14:36:04.164 (test) 'HTTPURL':'aHR0cHM6Ly93d3cuc29tZWdhdGV3YXkuY29tL3B1c2h1cmwucGhwP3VzZXJuYW1lPSNGSUVMRDEmcGFzc3dvcmQ9I0ZJRUxEMiZhcGlrZXk9I0ZJRUxEMyZmcm9tPSNGSUVMRDQmdG89I1RPJm1lc3NhZ2U9I01FU1NBR0U=' 2018-01-31 14:36:04.164 (test) 'AcceptNewHardware':'1' 2018-01-31 14:36:04.164 (test) 'ZWaveNetworkKey':'0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10' 2018-01-31 14:36:04.164 (test) 'RaspCamParams':'-w 800 -h 600 -t 1' 2018-01-31 14:36:04.164 (test) 'RemoteSharedPort':'6144' 2018-01-31 14:36:04.164 (test) 'DzVentsLogLevel':'3' 2018-01-31 14:36:04.164 (test) 'ElectricVoltage':'230' 2018-01-31 14:36:04.164 (test) 'EnableTabWeather':'1' 2018-01-31 14:36:04.164 (test) 'TempAway':'15' 2018-01-31 14:36:04.164 (test) 'FloorplanShowSwitchValues':'0' 2018-01-31 14:36:04.164 (test) 'UseEmailInNotifications':'1' 2018-01-31 14:36:04.164 (test) 'EnableTabUtility':'1' 2018-01-31 14:36:04.164 (test) 'CostWater':'16473' 2018-01-31 14:36:04.164 (test) 'UseAutoBackup':'0' 2018-01-31 14:36:04.164 (test) 'HTTPPostContentType':'YXBwbGljYXRpb24vanNvbg==' 2018-01-31 14:36:04.164 (test) 'SecStatus':'0' 2018-01-31 14:36:04.164 (test) 'TempHome':'20' 2018-01-31 14:36:04.164 (test) 'AuthenticationMethod':'0' 2018-01-31 14:36:04.164 (test) 'SecOnDelay':'30' 2018-01-31 14:36:04.164 (test) 'EnableTabLights':'1' 2018-01-31 14:36:04.164 (test) 'MeterDividerGas':'100' 2018-01-31 14:36:04.164 (test) 'FloorplanPopupDelay':'750' 2018-01-31 14:36:04.164 (test) 'SensorTimeoutNotification':'0' 2018-01-31 14:36:04.164 (test) 'WeightUnit':'0' 2018-01-31 14:36:04.164 (test) 'WindUnit':'0' 2018-01-31 14:36:04.164 (test) 'TempComfort':'22.0' 2018-01-31 14:36:04.165 (test) 'LightHistoryDays':'30' 2018-01-31 14:36:04.165 (test) 'ZWaveEnableNightlyNetworkHeal':'0' 2018-01-31 14:36:04.165 (test) 'ShortLogInterval':'5' 2018-01-31 14:36:04.165 (test) 'SendErrorNotifications':'0' 2018-01-31 14:36:04.165 (test) 'UVCParams':'-S80 -B128 -C128 -G80 -x800 -y600 -q100' 2018-01-31 14:36:04.165 (test) 'Title':'Domoticz' 2018-01-31 14:36:04.165 (test) 'ShowUpdateEffect':'0' 2018-01-31 14:36:04.165 (test) 'DashboardType':'0' 2018-01-31 14:36:04.165 (test) 'FloorplanInactiveOpacity':'5' 2018-01-31 14:36:04.165 (test) 'SensorTimeout':'60' 2018-01-31 14:36:04.165 (test) 'TempUnit':'0' 2018-01-31 14:36:04.165 (test) 'EnableTabCustom':'1' 2018-01-31 14:36:04.165 (test) 'EnableTabScenes':'1' 2018-01-31 14:36:04.165 (test) 'MobileType':'0' 2018-01-31 14:36:04.165 (test) 'SendErrorsAsNotification':'0' 2018-01-31 14:36:04.165 (test) 'CM113DisplayType':'0' 2018-01-31 14:36:04.165 (test) 'UseAutoUpdate':'1' 2018-01-31 14:36:04.165 (test) 'FloorplanFullscreenMode':'0' 2018-01-31 14:36:04.165 (test) 'EnableTabTemp':'1' 2018-01-31 14:36:04.165 (test) 'SmartMeterType':'0' 2018-01-31 14:36:04.165 (test) 'MeterDividerWater':'100' 2018-01-31 14:36:04.165 (test) 'FloorplanActiveOpacity':'25' 2018-01-31 14:36:04.165 (test) 'CostGas':'6218' 2018-01-31 14:36:04.165 (test) 'FloorplanShowSensorValues':'1' 2018-01-31 14:36:04.165 (test) 'CostEnergyT2':'2149' 2018-01-31 14:36:04.165 (test) 'CostEnergyR1':'800' 2018-01-31 14:36:04.165 (test) 'RandomTimerFrame':'15' 2018-01-31 14:36:04.165 (test) 'WebTheme':'default' 2018-01-31 14:36:04.165 (test) 'ZWaveEnableDebug':'0' 2018-01-31 14:36:04.165 (test) 'MeterDividerEnergy':'1000' 2018-01-31 14:36:04.165 (test) 'DoorbellCommand':'0' 2018-01-31 14:36:04.165 (test) 'DegreeDaysBaseTemperature':'18.0' 2018-01-31 14:36:04.165 (test) 'ReleaseChannel':'0' 2018-01-31 14:36:04.165 (test) 'Language':'en' 2018-01-31 14:36:04.165 (test) 'CostEnergyR2':'800' 2018-01-31 14:36:04.165 (test) 'NotificationSensorInterval':'43200' 2018-01-31 14:36:04.165 (test) 'FloorplanRoomColour':'Blue' 2018-01-31 14:36:04.165 (test) 'EmailPort':'25' 2018-01-31 14:36:04.165 (test) 'EnableTabFloorplans':'0' 2018-01-31 14:36:04.166 (test) 'DisableEventScriptSystem':'0' 2018-01-31 14:36:04.166 (test) 'CostEnergy':'2149' 2018-01-31 14:36:04.166 (test) 'DisableDzVentsSystem':'0' 2018-01-31 14:36:04.166 (test) 'ActiveTimerPlan':'0' 2018-01-31 14:36:04.166 (test) 'BatteryLowNotification':'0' 2018-01-31 14:36:04.166 (test) 'DB_Version':'116' 2018-01-31 14:36:04.166 (test) '5MinuteHistoryDays':'1' 2018-01-31 14:36:04.166 (test) 'ZWavePollInterval':'60' 2018-01-31 14:36:04.166 (test) 'EmailAsAttachment':'0' 2018-01-31 14:36:04.166 (test) 'HideDisabledHardwareSensors':'1' 2018-01-31 14:36:04.166 (test) 'AllowWidgetOrdering':'1' 2018-01-31 14:36:04.166 (test) 'NotificationSwitchInterval':'0' 2018-01-31 14:36:04.166 (test) Image count: 0 2018-01-31 14:36:04.166 (test) Device count: 0 2018-01-31 14:36:04.166 (test) Connecting to: 10.100.60.11:80 2018-01-31 14:36:04.168 (test) isAlive status :True 2018-01-31 14:36:04.169 (test) Connect via script tinycontrol.py to website: 10.100.60.11 user: admin password: admin 2018-01-31 14:36:04.646 Error: (test) 'onStart' failed 'CalledProcessError'. 2018-01-31 14:36:04.646 Error: (test) ----> Line 407 in /home/pi/domoticz/plugins/domoticz-tinycontrol/plugin.py, function onStart 2018-01-31 14:36:04.646 Error: (test) ----> Line 202 in /home/pi/domoticz/plugins/domoticz-tinycontrol/plugin.py, function onStart 2018-01-31 14:36:04.646 Error: (test) ----> Line 316 in /usr/lib/python3.5/subprocess.py, function check_output 2018-01-31 14:36:04.646 Error: (test) ----> Line 398 in /usr/lib/python3.5/subprocess.py, function run 2018-01-31 14:36:04.646 (test) Heartbeat interval set to: 60. 2018-01-31 14:36:13.662 (test) Calling message handler 'onHeartbeat'. 2018-01-31 14:36:13.662 (test) onHeartbeat called 2018-01-31 14:36:13.665 (test) isAlive status :True 2018-01-31 14:36:13.665 (test) Connect via script tinycontrol.py to website: 10.100.60.11 user: admin password: admin 2018-01-31 14:36:14.194 Error: (test) 'onHeartbeat' failed 'CalledProcessError'. 2018-01-31 14:36:14.194 Error: (test) ----> Line 442 in /home/pi/domoticz/plugins/domoticz-tinycontrol/plugin.py, function onHeartbeat 2018-01-31 14:36:14.194 Error: (test) ----> Line 349 in /home/pi/domoticz/plugins/domoticz-tinycontrol/plugin.py, function onHeartbeat 2018-01-31 14:36:14.194 Error: (test) ----> Line 316 in /usr/lib/python3.5/subprocess.py, function check_output 2018-01-31 14:36:14.195 Error: (test) ----> Line 398 in /usr/lib/python3.5/subprocess.py, function run
the last lines have errors? Another question, if the plugin run without error, the sensors appear in device tab? Thanks
Thi is the log error...
Can you first try to execute script tinycontrol.py - located in /home/pi/domoticz/plugins/domoticz-tinycontrol/ ./tinycontrol.py 10.100.60.11
Oh ok....i have re install domoticz to 0.....All work fine... many thank...it's great great job....
Sorry kofec i have another question...Can i add a controlled plugin switch? If i want to control for example the relay (out0) can i do this? if i add out0 in camp "Which devices should be tracked" it not appear in devices. I add the switch with Dummy and Manual Light/Switch but if turn on or off the relay in web interface of Lan controller the state in domoticz not change.
Many thanks of your time and support if you want i can write a complete guide for my experience for support all people to install the plugin.
thanks a lot
Please execute "git pull" I have updated the plugin. Now, all should work. If not, first execute ./tinycontrol.py 10.100.60.11 if it is ok, then in hardware section of tinycontrol enable Debug and paste log
ok...it work veri fine now...many thanks... Can i apply this plugin in the V3 of lancontroller? If i had any ideas can i question to you?
Sure you can add sugestions. You can also try with V3. If something is wrong raise "issue".
first execute ./tinycontrol.py
The path is wrong - only python 3.x is supported by domoticz. And for some reason your tinycontrol is nor reachable "no route to host"
2018-02-01 16:48 GMT+01:00 fabiotodesco notifications@github.com:
i have change te line in pathOfPackages = '/usr/lib/python2.7/dist-packages/'
in tinycontrol.py and in plugin.py
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kofec/domoticz-tinycontrol/issues/1#issuecomment-362307610, or mute the thread https://github.com/notifications/unsubscribe-auth/ARv6dbjwY-hykccE3QuIiKGMKNEHXh0sks5tQdzUgaJpZM4RyjWY .
In really the plugin for me work if i use this path. If i not change the path python not found the module xmltodict. I don’t know if this is correct but it works for me. The error in my last request is for my Lancontroller had out of line because my lan cable is had not connect corretly….sorry
I would ask you if you have matching table to view corrispondence between sensors and your variables.
Many thanks
Fabio Todesco
Da: kofec [mailto:notifications@github.com] Inviato: giovedì 1 febbraio 2018 17:40 A: kofec/domoticz-tinycontrol domoticz-tinycontrol@noreply.github.com Cc: Fabio Todesco f.todesco@bolznet.com; Author author@noreply.github.com Oggetto: Re: [kofec/domoticz-tinycontrol] Problem with plugin. (#1)
The path is wrong - only python 3.x is supported by domoticz. And for some reason your tinycontrol is nor reachable "no route to host"
2018-02-01 16:48 GMT+01:00 fabiotodesco notifications@github.com<mailto:notifications@github.com>:
i have change te line in pathOfPackages = '/usr/lib/python2.7/dist-packages/'
in tinycontrol.py and in plugin.py
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kofec/domoticz-tinycontrol/issues/1#issuecomment-362307610, or mute the thread https://github.com/notifications/unsubscribe-auth/ARv6dbjwY-hykccE3QuIiKGMKNEHXh0sks5tQdzUgaJpZM4RyjWY .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kofec/domoticz-tinycontrol/issues/1#issuecomment-362324578, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AiTNXz68eZ_JUyzEi0GDeRfJpQqvuqLWks5tQejMgaJpZM4RyjWY.
The plugin was design in generic way. Only one thing have to be define in plugin. What type of device have to be created in Domoticz - base on table: Optional. Common device types, this will set the values for Type and Subtype.
"Air Quality"
"Alert"
"Barometer"
"Counter Incremental"
"Current/Ampere"
"Current (Single)"
"Custom"
"Distance"
"Gas"
"Humidity"
"Illumination"
"kWh"
"Leaf Wetness"
"Percentage"
"Pressure"
"Rain"
"Selector Switch"
"Soil Moisture"
"Solar Radiation"
"Sound Level"
"Switch"
"Temperature"
"Temp+Hum"
"Temp+Hum+Baro"
"Text"
"Usage"
"UV"
"Visibility"
"Voltage"
"Waterflow"
"Wind"
"Wind+Temp+Chill"
from: https://www.domoticz.com/wiki/Developing_a_Python_plugin
and this is python dict - KEY = {....} also have to add this key to: NAMES = {...} or NAMES_vx if this is specific to lancontroler version if someting is missing you can open issue - when I found time I will add
Hi kofek i still need tha you help me. In your old plugin for 2.0 lancontroller i want import in domoticz the value of digital input. I have 1 door sensor in te input and in lancontroller web interface he update correctly the data. But i don’t undarstand how to import contact in domoticz. I tried modify the plugin that you explain me in the mail, but if i add
KEY = {
"out0": "Switch", # Relay/Switch
"out1": "Switch", # Relay/Switch
"out2": "Switch", # Relay/Switch
"out3": "Switch", # Relay/Switch
"out4": "Switch", # Relay/Switch
"out5": "Switch", # Relay/Switch
"ia0": "Temperature", # Board Temperature
"ia1": "Voltage", # VCC SUPPLY
"ia4": "Temperature", # PT1000 Temperature
"ia7": "Temperature", # ds18b20 Temperature
"ia8": "Temperature", # ds18b20 Temperature
"ia9": "Temperature", # ds18b20 Temperature
"ia10": "Temperature", # ds18b20 Temperature
"ia11": "Temperature", # ds18b20 Temperature
"ia12": "Temperature", # ds18b20 Temperature
"di0": "Switch" "Contact", # Relay/Switch
}
# resolve issue when cannot take name from response - search names if doesn't exist take key
NAMES = {
"ia0": "Board Temperature", # Board Temperature
"ia1": "VCC SUPPLY", # VCC SUPPLY
"ia4": "PT1000", # PT1000 Temperature
"ia7": "d0", # ds18b20 Temperature
"ia8": "d1", # ds18b20 Temperature
"ia9": "d2", # ds18b20 Temperature
"ia10": "d3", # ds18b20 Temperature
"ia11": "d4", # ds18b20 Temperature
"ia12": "d5", # ds18b20 Temperature
"di0": "di0",
In domoticz appear the switch, i set it are contact but i not see when status change… Sorry for disturb but i not understand the error.
Fabio Todesco
Da: kofec notifications@github.com Inviato: venerdì 2 febbraio 2018 14:51 A: kofec/domoticz-tinycontrol domoticz-tinycontrol@noreply.github.com Cc: Fabio Todesco f.todesco@bolznet.com; Author author@noreply.github.com Oggetto: Re: [kofec/domoticz-tinycontrol] Problem with plugin. (#1)
The plugin was design in generic way. Only one thing have to be define in plugin. What type of device have to be created in Domoticz - base on table: Optional. Common device types, this will set the values for Type and Subtype.
"Air Quality"
"Alert"
"Barometer"
"Counter Incremental"
"Current/Ampere"
"Current (Single)"
"Custom"
"Distance"
"Gas"
"Humidity"
"Illumination"
"kWh"
"Leaf Wetness"
"Percentage"
"Pressure"
"Rain"
"Selector Switch"
"Soil Moisture"
"Solar Radiation"
"Sound Level"
"Switch"
"Temperature"
"Temp+Hum"
"Temp+Hum+Baro"
"Text"
"Usage"
"UV"
"Visibility"
"Voltage"
"Waterflow"
"Wind"
"Wind+Temp+Chill"
from: https://www.domoticz.com/wiki/Developing_a_Python_plugin
and this is python dict - KEY = {....} also have to add this key to: NAMES = {...} or NAMES_vx if this is specific to lancontroler version
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kofec/domoticz-tinycontrol/issues/1#issuecomment-362591612, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AiTNX0YmiKwy_iG73rnG7j2s4lPFmWzCks5tQxLagaJpZM4RyjWY.
Hello, thank you for your work .... I tried to install your plugin on Raspbberry pi3, domoticz V3.8153 with phyton 3.5 installed but when I add my tinycontrol V2 updated to the latest firmware domoticz gives me the following error ... 2018-01-30 16:33:48.435 Error: (LanControler) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-tinycontrol/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'. 2018-01-30 16:33:48.435 Error: (test) Module Import failed, exception: 'ImportError' 2018-01-30 16:33:48.435 Error: (test) Module Import failed: ' Name: xmltodict'
Would you be kind enough to help me?
Many thanks