quazzie / tellstick-plugin-mqtt-hass

Plugin for tellstick, connect to homeassistant via mqtt with autodiscovery.
39 stars 7 forks source link

This would be amazing if thermostats and SETPOINT_TYPE_HEATING were supported #8

Closed tb-lund closed 4 years ago

tb-lund commented 4 years ago

Hi, Thank you for fantastic work with this plugin. It works really well. I have however one issue in my setup and this is that the setpoint temperature for Z-wave thermostats is not passed onto MQTT neither as status nor as set. I'm not sure if this is possible as I don't have any experience in developing plugins for the Tellstick devices, but I know that it is retrievable and possible via LUA scripting. Here is a link to a post where this has been done. https://forum.telldus.com/viewtopic.php?t=6587

It is unfortunately in Swedish, but the code is readable and is seen below. Can this be useful as a starting point to implement it in you plugin? I would be very happy to help out as much as I can in the development.

Thank you again for great work!

All the best

Tomas


- File: SetTempElementLevel1.lua
local deviceManager = require "telldus.DeviceManager"
local COMMAND_CLASS_THERMOSTAT_SETPOINT = 0x43
local SETPOINT_TYPE_HEATING = '1'

function onDeviceStateChanged(device, state, stateValue)
    if device:name() ~= "DummyLevel1" then
        return
    end

    if (device:state() == 1) then
        print("DummyLevel1:on")

        for index, device in python.enumerate(deviceManager:retrieveDevices()) do
            if (string.find(device:name(),"ElementLevel1") ~= nil) then
                print(device:name())
                setDanfossTemperature(device, 18)
                return
            end
        end     
        return

    else
        print("DummyLevel1:off")

        for index, device in python.enumerate(deviceManager:retrieveDevices()) do
            if (string.find(device:name(),"ElementLevel1") ~= nil) then
                print(device:name())
                setDanfossTemperature(device, 22)
                return
            end
        end     
        return
    end
end

function setDanfossTemperature(device, temperature)
    if (device:typeString() ~= 'zwave') then
        print("Device %s is not a Z-Wave device", device:name())
        return
    end
    -- Get the raw zwave node
    local zwaveNode = device:zwaveNode()
    -- Extract the thermostat setpoint command class
    local cmdClass = zwaveNode:cmdClass(COMMAND_CLASS_THERMOSTAT_SETPOINT)
    if (cmdClass == nil) then
        print("Device %s does not support THERMOSTAT_SETPOINT", device:name())
        return
    end
    -- Set new value to be sent the next time the device is awake
    cmdClass:setSetpoint(SETPOINT_TYPE_HEATING, temperature)
end
quazzie commented 4 years ago

Swedish is not a problem as i'm Swedish :) Do you have one of these ? Could you capture the debug output on startup of znet so i can get a feel for the device? if using linux and mosquitto mosquitto_sub -t "(Base topic)/(Device name)/debug" -v > capture.log Change (Base topic) and (Device name) to what you have in the config for the plugin.

tb-lund commented 4 years ago

Strålande!

Thank you for thinking about this. I attach the debug information from the startup below. The Thermostat is called SRT321 and it is device 53, last in the list. it looks to me that the device ID https://api.telldus.com/documentation/constDeviceType is identifying it correctly as a thermostat according to this page https://api.telldus.com/documentation/constDeviceType so that is at least a start. (The Znet identifies the thermostat correctly when adding it with a correct picture and everything works through the web interface, so I was expecting this.)

Here is the manual for the specific Thermostat I have connected. However, I don't think that that may be very crucial here. http://manuals-backend.z-wave.info/make.php?lang=en&sku=SEC_SRT321&cert=ZC10-16015001

It is the z-wave Command Class "Thermostat Setpoint" Which would be key to be able to set and to get the status from. This should be general for all Z-wave thermostats.

Tack för hjälpen!

Here is the debug information:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 6, "sensors": {}, "name": "dining_room_crystal", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "16"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 6 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/6/set", "schema": "json", "name": "dining_room_crystal", "brightness": true}, "deviceTopic": "homeassistant/light/znet/6", "deviceType": "light"}
/telldus/znet/debug deviceState 6, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "kitchen_window", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 133], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "kitchen_window", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 133
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 8, "sensors": {}, "name": "hall_stairlamp_old", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 8 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/8/set", "schema": "json", "name": "hall_stairlamp_old", "brightness": true}, "deviceTopic": "homeassistant/light/znet/8", "deviceType": "light"}
/telldus/znet/debug deviceState 8, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 9, "sensors": {}, "name": "office_ceiling", "parameters": {"house": "15874710", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [16, 94], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 9 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/9/set", "schema": "json", "name": "office_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/9", "deviceType": "light"}
/telldus/znet/debug deviceState 9, state: 16, value: 94
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 10, "sensors": {}, "name": "attic_hall", "parameters": {"house": "4978370", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "3"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 10 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/switch/znet/10/set", "name": "attic_hall"}, "deviceTopic": "homeassistant/switch/znet/10", "deviceType": "switch"}
/telldus/znet/debug deviceState 10, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 11, "sensors": {}, "name": "bedroom_ceiling", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [16, 204], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 11 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/11/set", "schema": "json", "name": "bedroom_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/11", "deviceType": "light"}
/telldus/znet/debug deviceState 11, state: 16, value: 204
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 12, "sensors": {}, "name": "kitchen_bench", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [1, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 12 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/12/set", "schema": "json", "name": "kitchen_bench", "brightness": true}, "deviceTopic": "homeassistant/light/znet/12", "deviceType": "light"}
/telldus/znet/debug deviceState 12, state: 1, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 16, "sensors": {}, "name": "bookshelf_dining_room", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "15"}, "state": [16, 59], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 16 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/light/znet/16/set", "schema": "json", "name": "bookshelf_dining_room", "brightness": true}, "deviceTopic": "homeassistant/light/znet/16", "deviceType": "light"}
/telldus/znet/debug deviceState 16, state: 16, value: 59
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 21, "sensors": {}, "name": "RT-Augusta", "parameters": {"house": "13053585", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 21 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/switch/znet/21/set", "name": "RT-Augusta"}, "deviceTopic": "homeassistant/switch/znet/21", "deviceType": "switch"}
/telldus/znet/debug deviceState 21, state: 2, value: 
/telldus/znet/debug {"methods": 0, "battery": null, "isSensor": true, "deviceId": 51, "sensors": {"1024": [{"scale": 0, "lastUpdated": 1579206568, "value": "3.9"}], "1": [{"scale": 0, "lastUpdated": 1579206568, "value": "4.7"}], "2": [{"scale": 0, "lastUpdated": 1579206568, "value": "95.6"}], "2048": [{"scale": 0, "lastUpdated": 1579206568, "value": "102.48"}], "32": [{"scale": 0, "lastUpdated": 1579206568, "value": "3.0"}], "64": [{"scale": 0, "lastUpdated": 1579206568, "value": "4.9"}], "16": [{"scale": 0, "lastUpdated": 1579206568, "value": "176.1"}]}, "name": "YR local weather", "parameters": {"devicetype": "00000000-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "yr", "type": "binary_sensor", "isDevice": false}
/telldus/znet/debug device 51 has sensors
/telldus/znet/debug sensortype 1024 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'3.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'3.9'}
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'4.7'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'4.7'}
/telldus/znet/debug sensortype 2 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'95.6'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'95.6'}
/telldus/znet/debug sensortype 2048 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'102.48'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'102.48'}
/telldus/znet/debug sensortype 32 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'3.0'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'3.0'}
/telldus/znet/debug sensortype 64 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'4.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'4.9'}
/telldus/znet/debug sensortype 16 has [{'scale': 0, 'lastUpdated': 1579206568, 'value': u'176.1'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579206568, 'value': u'176.1'}
/telldus/znet/debug {"methods": 2051, "battery": 100, "isSensor": true, "deviceId": 18, "sensors": {"1": [{"scale": 0, "lastUpdated": 1574366613, "value": "23.1"}]}, "name": "Vardagsrummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [1, ""], "typeStr": "zwave", "type": "switch", "isDevice": true}
/telldus/znet/debug device 18 has battery
/telldus/znet/debug device 18 has sensors
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1574366613, 'value': u'23.1'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1574366613, 'value': u'23.1'}
/telldus/znet/debug device 18 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/switch/znet/18/set", "name": "Vardagsrummet"}, "deviceTopic": "homeassistant/switch/znet/18", "deviceType": "switch"}
/telldus/znet/debug deviceState 18, state: 1, value: 
/telldus/znet/debug {"methods": 2051, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579207252, "value": "23.9"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "zwave", "type": "switch", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 has sensors
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579207252, 'value': u'23.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579207252, 'value': u'23.9'}
/telldus/znet/debug device 53 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"command_topic": "homeassistant/switch/znet/53/set", "name": "SRT321"}, "deviceTopic": "homeassistant/switch/znet/53", "deviceType": "switch"}
/telldus/znet/debug deviceState 53, state: 2, value: 
/telldus/znet/debug Updating config.devices_configured to : [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('sensor', '18', '18_1_0'), ('switch', '18', '18'), ('sensor', '53', '53_1_0'), ('switch', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('sensor', '18', '18_1_0'), ('switch', '18', '18'), ('sensor', '53', '53_1_0'), ('switch', '53', '53')]
/telldus/znet/debug subscribing
quazzie commented 4 years ago

I made a test version, https://drive.google.com/open?id=1EH-focuzSkhee_ozv3mYLytMfZI5QhkS Could you try it and see what happens ? It should remove the switch and sensor from HA and add a climate entity.

tb-lund commented 4 years ago

Hi again,

Thank you for this test version! I have installed it and here is now some debug output after reboot:

homeassistant/sensor/znet/ACCA54013CBC_53_battery/config {"unit_of_measurement": "%", "name": "SRT321 - Battery", "device_class": "battery", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_ACCA54013CBC_53_battery"}
homeassistant/sensor/znet/ACCA54013CBC_53_battery/state 63

It appears to be recognizing it correctly as climate so this is great. The state value presented as 63 I believe is the battery level.

When I then change the temperature on Thermostat I see the following debug output:

/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 2, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug A wild climate device appeared! deviceId: 53

In Home Assistant it shows up as "SRT321 - Battery sensor.srt321_battery" and shows the battery level as 63%

I guess you have not yet implemented anything to supply status or set the Thermostat setpoint or temperature? Please let me know if you need any additional information.

Thank you for the great work so far!

quazzie commented 4 years ago

Hmm there should be a climate device besides the battery sensor. Could you link full debug from startup. Seems like there is an error somewhere.

tb-lund commented 4 years ago

Hi again! Sorry for the post above, I pasted the wrong text above in the debug. Below is the complete debug from the boot sequence. To me, the error appears to be shown in /telldus/znet/debug discovery global name 'deviceType' is not defined and that the device number 53 is not added to "updated devices_configured"

Everytime the Thermostat is sending an update to the Tellstick there is a repeated message in the debug output:

/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 1, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug A wild climate device appeared! deviceId: 53

I hope that this helps. I was trying to look at your new code to try to help but I see that it is compiled Python so that is a bit tough without the sourcecode.

Thanks again

Here is the full debug:

/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 6, "sensors": {}, "name": "dining_room_crystal", "parameters": {"house": "4978370", "devicetype":
 "00000005-0001-1000-2005-ACCA54000000", "unit": "16"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 6 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/6/state", "command_topic": "homeassistant/light/znet/6/set", "schema": "json", "name
": "dining_room_crystal", "brightness": true}, "deviceTopic": "homeassistant/light/znet/6", "deviceType": "light"}
/telldus/znet/debug deviceState 6, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "kitchen_window", "parameters": {"house": "4978370", "devicetype": "000
00005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name
": "kitchen_window", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 8, "sensors": {}, "name": "hall_stairlamp_old", "parameters": {"house": "4978370", "devicetype": 
"00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 8 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/8/state", "command_topic": "homeassistant/light/znet/8/set", "schema": "json", "name
": "hall_stairlamp_old", "brightness": true}, "deviceTopic": "homeassistant/light/znet/8", "deviceType": "light"}
/telldus/znet/debug deviceState 8, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 9, "sensors": {}, "name": "office_ceiling", "parameters": {"house": "15874710", "devicetype": "00
000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [16, 94], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 9 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/9/state", "command_topic": "homeassistant/light/znet/9/set", "schema": "json", "name
": "office_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/9", "deviceType": "light"}
/telldus/znet/debug deviceState 9, state: 16, value: 94
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 10, "sensors": {}, "name": "attic_hall", "parameters": {"house": "4978370", "devicetype": "000000
10-0001-1000-2005-ACCA54000000", "unit": "3"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 10 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/10/state", "command_topic": "homeassistant/switch/znet/10/set", "name": "attic_hall
"}, "deviceTopic": "homeassistant/switch/znet/10", "deviceType": "switch"}
/telldus/znet/debug deviceState 10, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 11, "sensors": {}, "name": "bedroom_ceiling", "parameters": {"house": "19327942", "devicetype": "
00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [16, 204], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 11 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/11/state", "command_topic": "homeassistant/light/znet/11/set", "schema": "json", "na
me": "bedroom_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/11", "deviceType": "light"}
/telldus/znet/debug deviceState 11, state: 16, value: 204
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 12, "sensors": {}, "name": "kitchen_bench", "parameters": {"house": "19327942", "devicetype": "00
000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [1, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 12 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/12/state", "command_topic": "homeassistant/light/znet/12/set", "schema": "json", "na
me": "kitchen_bench", "brightness": true}, "deviceTopic": "homeassistant/light/znet/12", "deviceType": "light"}
/telldus/znet/debug deviceState 12, state: 1, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 16, "sensors": {}, "name": "bookshelf_dining_room", "parameters": {"house": "4978370", "devicetyp
e": "00000005-0001-1000-2005-ACCA54000000", "unit": "15"}, "state": [16, 59], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 16 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/16/state", "command_topic": "homeassistant/light/znet/16/set", "schema": "json", "na
me": "bookshelf_dining_room", "brightness": true}, "deviceTopic": "homeassistant/light/znet/16", "deviceType": "light"}
/telldus/znet/debug deviceState 16, state: 16, value: 59
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 21, "sensors": {}, "name": "RT-Augusta", "parameters": {"house": "13053585", "devicetype": "00000
010-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 21 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/21/state", "command_topic": "homeassistant/switch/znet/21/set", "name": "RT-Augusta
"}, "deviceTopic": "homeassistant/switch/znet/21", "deviceType": "switch"}
/telldus/znet/debug deviceState 21, state: 2, value: 
/telldus/znet/debug {"methods": 0, "battery": null, "isSensor": true, "deviceId": 51, "sensors": {"1024": [{"scale": 0, "lastUpdated": 1579341624, "value": "2.8"}], "1": [{"scale": 
0, "lastUpdated": 1579341624, "value": "5.6"}], "2": [{"scale": 0, "lastUpdated": 1579341624, "value": "83.7"}], "2048": [{"scale": 0, "lastUpdated": 1579341624, "value": "101.43"}]
, "32": [{"scale": 0, "lastUpdated": 1579341624, "value": "8.6"}], "64": [{"scale": 0, "lastUpdated": 1579341624, "value": "14.3"}], "16": [{"scale": 0, "lastUpdated": 1579341624, "
value": "229.1"}]}, "name": "YR local weather", "parameters": {"devicetype": "00000000-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "yr", "type": "binary_sensor", "is
Device": false}
/telldus/znet/debug device 51 has sensors
/telldus/znet/debug sensortype 1024 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'2.8'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'2.8'}
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'5.6'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'5.6'}
/telldus/znet/debug sensortype 2 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'83.7'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'83.7'}
/telldus/znet/debug sensortype 2048 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'101.43'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'101.43'}
/telldus/znet/debug sensortype 32 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'8.6'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'8.6'}
/telldus/znet/debug sensortype 64 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'14.3'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'14.3'}
/telldus/znet/debug sensortype 16 has [{'scale': 0, 'lastUpdated': 1579341624, 'value': u'229.1'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579341624, 'value': u'229.1'}
/telldus/znet/debug {"methods": 2051, "battery": 100, "isSensor": true, "deviceId": 18, "sensors": {"1": [{"scale": 0, "lastUpdated": 1574366613, "value": "23.1"}]}, "name": "Vardag
srummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 18 has battery
/telldus/znet/debug device 18 is climate
/telldus/znet/debug discovery global name 'deviceType' is not defined
/telldus/znet/debug {"methods": 2051, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579286516, "value": "21.9"}]}, "name": "SRT321"
, "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug discovery global name 'deviceType' is not defined
/telldus/znet/debug Updating config.devices_configured to : [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '1
1', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '5
1', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0')]
/telldus/znet/debug config updated devices_configured [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '1
1'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '5
1_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0')]
/telldus/znet/debug subscribing
quazzie commented 4 years ago

Ahh you have 2 thermostats, 18&53. And I see a problem with my code discovery global name 'deviceType' is not defined. I'll look over my code

tb-lund commented 4 years ago

Yes, that is correct. I have two thermostats connected currently. Sorry if this was confusing you! The goal is to connect four actually. Three of this type and one for the in-floor heating in the bathroom. That one should be very similar but is connected to mains power (so it will not have any battery indicator).

I hope that you will find the source of the error.

quazzie commented 4 years ago

Think i found the error. New version if you would like to test: https://drive.google.com/file/d/1vLKsS2DB1PPxrHszd5QXbqDTo7MEeKoi

tb-lund commented 4 years ago

Great progress! I had to test it here over lunch.

The recognition and setup of the climate device do appear much more correct. However, it is not fully functional yet.

The "State" in initially empty and does not appear to ever update neither if the temperature is set on the Thermostat, in the "Telldus live" webpage or via MQTT/Home assistant. The Thermostat temperature is also never reported to MQTT (the current temperature not the setpoint)

The only error message I get in the debug is when I update the temperature in Home assistant. then I get /telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'

The MQTT message Home assistant sends is homeassistant/climate/znet/53/set/setpoint 18.0

The same is true when I set the mode homeassistant/climate/znet/53/set/mode heat

Then the debug is also /telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'

Thanks again

Here comes the complete debug and then the output from the topic homeassistant

/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 6, "sensors": {}, "name": "dining_room_crystal", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "16"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 6 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/6/state", "command_topic": "homeassistant/light/znet/6/set", "schema": "json", "name": "dining_room_crystal", "brightness": true}, "deviceTopic": "homeassistant/light/znet/6", "deviceType": "light"}
/telldus/znet/debug deviceState 6, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "kitchen_window", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "kitchen_window", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 8, "sensors": {}, "name": "hall_stairlamp_old", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 8 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/8/state", "command_topic": "homeassistant/light/znet/8/set", "schema": "json", "name": "hall_stairlamp_old", "brightness": true}, "deviceTopic": "homeassistant/light/znet/8", "deviceType": "light"}
/telldus/znet/debug deviceState 8, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 9, "sensors": {}, "name": "office_ceiling", "parameters": {"house": "15874710", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [16, 94], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 9 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/9/state", "command_topic": "homeassistant/light/znet/9/set", "schema": "json", "name": "office_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/9", "deviceType": "light"}
/telldus/znet/debug deviceState 9, state: 16, value: 94
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 10, "sensors": {}, "name": "attic_hall", "parameters": {"house": "4978370", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "3"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 10 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/10/state", "command_topic": "homeassistant/switch/znet/10/set", "name": "attic_hall"}, "deviceTopic": "homeassistant/switch/znet/10", "deviceType": "switch"}
/telldus/znet/debug deviceState 10, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 11, "sensors": {}, "name": "bedroom_ceiling", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [16, 204], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 11 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/11/state", "command_topic": "homeassistant/light/znet/11/set", "schema": "json", "name": "bedroom_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/11", "deviceType": "light"}
/telldus/znet/debug deviceState 11, state: 16, value: 204
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 12, "sensors": {}, "name": "kitchen_bench", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [1, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 12 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/12/state", "command_topic": "homeassistant/light/znet/12/set", "schema": "json", "name": "kitchen_bench", "brightness": true}, "deviceTopic": "homeassistant/light/znet/12", "deviceType": "light"}
/telldus/znet/debug deviceState 12, state: 1, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 16, "sensors": {}, "name": "bookshelf_dining_room", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "15"}, "state": [16, 59], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 16 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/16/state", "command_topic": "homeassistant/light/znet/16/set", "schema": "json", "name": "bookshelf_dining_room", "brightness": true}, "deviceTopic": "homeassistant/light/znet/16", "deviceType": "light"}
/telldus/znet/debug deviceState 16, state: 16, value: 59
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 21, "sensors": {}, "name": "RT-Augusta", "parameters": {"house": "13053585", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 21 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/21/state", "command_topic": "homeassistant/switch/znet/21/set", "name": "RT-Augusta"}, "deviceTopic": "homeassistant/switch/znet/21", "deviceType": "switch"}
/telldus/znet/debug deviceState 21, state: 2, value: 
/telldus/znet/debug {"methods": 0, "battery": null, "isSensor": true, "deviceId": 51, "sensors": {"1024": [{"scale": 0, "lastUpdated": 1579518732, "value": "4.3"}], "1": [{"scale": 0, "lastUpdated": 1579518732, "value": "5.7"}], "2": [{"scale": 0, "lastUpdated": 1579518732, "value": "91.2"}], "2048": [{"scale": 0, "lastUpdated": 1579518732, "value": "104.02"}], "32": [{"scale": 0, "lastUpdated": 1579518732, "value": "5.8"}], "64": [{"scale": 0, "lastUpdated": 1579518732, "value": "9.0"}], "16": [{"scale": 0, "lastUpdated": 1579518733, "value": "249.7"}]}, "name": "YR local weather", "parameters": {"devicetype": "00000000-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "yr", "type": "binary_sensor", "isDevice": false}
/telldus/znet/debug device 51 has sensors
/telldus/znet/debug sensortype 1024 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'4.3'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'4.3'}
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'5.7'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'5.7'}
/telldus/znet/debug sensortype 2 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'91.2'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'91.2'}
/telldus/znet/debug sensortype 2048 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'104.02'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'104.02'}
/telldus/znet/debug sensortype 32 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'5.8'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'5.8'}
/telldus/znet/debug sensortype 64 has [{'scale': 0, 'lastUpdated': 1579518732, 'value': u'9.0'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518732, 'value': u'9.0'}
/telldus/znet/debug sensortype 16 has [{'scale': 0, 'lastUpdated': 1579518733, 'value': u'249.7'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579518733, 'value': u'249.7'}
/telldus/znet/debug {"methods": 2051, "battery": 100, "isSensor": true, "deviceId": 18, "sensors": {"1": [{"scale": 0, "lastUpdated": 1574366613, "value": "23.1"}]}, "name": "Vardagsrummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 18 has battery
/telldus/znet/debug device 18 is climate
/telldus/znet/debug climateState 18, state: 1, value: 
/telldus/znet/debug {"methods": 2051, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579481227, "value": "20.0"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000"}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, state: 1, value: 
/telldus/znet/debug Updating config.devices_configured to : [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0')]
/telldus/znet/debug config updated devices_configured [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0')]
/telldus/znet/debug subscribing
/telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'
/telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'
/telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'
/telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'

And the homeassistant/# topics since reboot

homeassistant/light/znet/6/config {"name": "dining_room_crystal", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/6/state", "command_topic": "homeassistant/light/znet/6/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_6", "schema": "json"}
homeassistant/light/znet/6/state {"state": "OFF", "brightness": 0}
homeassistant/light/znet/7/config {"name": "kitchen_window", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_7", "schema": "json"}
homeassistant/light/znet/7/state {"state": "OFF", "brightness": 0}
homeassistant/light/znet/8/config {"name": "hall_stairlamp_old", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/8/state", "command_topic": "homeassistant/light/znet/8/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_8", "schema": "json"}
homeassistant/light/znet/8/state {"state": "OFF", "brightness": 0}
homeassistant/light/znet/9/config {"name": "office_ceiling", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/9/state", "command_topic": "homeassistant/light/znet/9/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_9", "schema": "json"}
homeassistant/light/znet/9/state {"state": "ON", "brightness": 94}
homeassistant/light/znet/11/config {"name": "bedroom_ceiling", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/11/state", "command_topic": "homeassistant/light/znet/11/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_11", "schema": "json"}
homeassistant/light/znet/11/state {"state": "ON", "brightness": 204}
homeassistant/light/znet/12/config {"name": "kitchen_bench", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/12/state", "command_topic": "homeassistant/light/znet/12/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_12", "schema": "json"}
homeassistant/light/znet/12/state {"state": "ON", "brightness": 255}
homeassistant/light/znet/16/config {"name": "bookshelf_dining_room", "brightness": true, "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/light/znet/16/state", "command_topic": "homeassistant/light/znet/16/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_16", "schema": "json"}
homeassistant/light/znet/16/state {"state": "ON", "brightness": 59}
homeassistant/switch/znet/10/config {"device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "name": "attic_hall", "state_topic": "homeassistant/switch/znet/10/state", "command_topic": "homeassistant/switch/znet/10/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_10"}
homeassistant/switch/znet/10/state OFF
homeassistant/switch/znet/21/config {"device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "name": "RT-Augusta", "state_topic": "homeassistant/switch/znet/21/state", "command_topic": "homeassistant/switch/znet/21/set", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_21"}
homeassistant/switch/znet/21/state OFF
homeassistant/sensor/znet/51_1024_0/config {"unit_of_measurement": "", "json_attributes_topic": "homeassistant/sensor/znet/51_1024_0/state", "name": "YR local weather dewp - ", "value_template": "{{ value_json.value }}", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/sensor/znet/51_1024_0/state", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_1024_0"}
homeassistant/sensor/znet/51_1024_0/state {"lastUpdated": 1579518732, "value": "4.3"}
homeassistant/sensor/znet/51_1_0/config {"unit_of_measurement": "\u00b0C", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "json_attributes_topic": "homeassistant/sensor/znet/51_1_0/state", "name": "YR local weather temp - \u00b0C", "device_class": "temperature", "state_topic": "homeassistant/sensor/znet/51_1_0/state", "value_template": "{{ value_json.value }}", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_1_0"}
homeassistant/sensor/znet/51_1_0/state {"lastUpdated": 1579518732, "value": "5.7"}
homeassistant/sensor/znet/51_2_0/config {"unit_of_measurement": "%", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "json_attributes_topic": "homeassistant/sensor/znet/51_2_0/state", "name": "YR local weather humidity - %", "device_class": "humidity", "state_topic": "homeassistant/sensor/znet/51_2_0/state", "value_template": "{{ value_json.value }}", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_2_0"}
homeassistant/sensor/znet/51_2_0/state {"lastUpdated": 1579518732, "value": "91.2"}
homeassistant/sensor/znet/51_2048_0/config {"unit_of_measurement": "kPa", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "json_attributes_topic": "homeassistant/sensor/znet/51_2048_0/state", "name": "YR local weather barpress - kPa", "device_class": "pressure", "state_topic": "homeassistant/sensor/znet/51_2048_0/state", "value_template": "{{ value_json.value }}", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_2048_0"}
homeassistant/sensor/znet/51_2048_0/state {"lastUpdated": 1579518732, "value": "104.02"}
homeassistant/sensor/znet/51_32_0/config {"unit_of_measurement": "m/s", "json_attributes_topic": "homeassistant/sensor/znet/51_32_0/state", "name": "YR local weather wavg - m/s", "value_template": "{{ value_json.value }}", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/sensor/znet/51_32_0/state", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_32_0"}
homeassistant/sensor/znet/51_32_0/state {"lastUpdated": 1579518732, "value": "5.8"}
homeassistant/sensor/znet/51_64_0/config {"unit_of_measurement": "m/s", "json_attributes_topic": "homeassistant/sensor/znet/51_64_0/state", "name": "YR local weather wgust - m/s", "value_template": "{{ value_json.value }}", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/sensor/znet/51_64_0/state", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_64_0"}
homeassistant/sensor/znet/51_64_0/state {"lastUpdated": 1579518732, "value": "9.0"}
homeassistant/sensor/znet/51_16_0/config {"unit_of_measurement": "", "json_attributes_topic": "homeassistant/sensor/znet/51_16_0/state", "name": "YR local weather wdir - ", "value_template": "{{ value_json.value }}", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "state_topic": "homeassistant/sensor/znet/51_16_0/state", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_51_16_0"}
homeassistant/sensor/znet/51_16_0/state {"lastUpdated": 1579518733, "value": "249.7"}
homeassistant/sensor/znet/ACCA54013CBC_18_battery/config {"unit_of_measurement": "%", "name": "Vardagsrummet - Battery", "device_class": "battery", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_ACCA54013CBC_18_battery"}
homeassistant/sensor/znet/ACCA54013CBC_18_battery/state 100
homeassistant/sensor/znet/ACCA54013CBC_52_battery/config {"unit_of_measurement": "%", "device": {"sw_version": "1.2.0", "name": "telldus", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "name": "Thermostat - Battery", "device_class": "battery", "state_topic": "homeassistant/sensor/znet/ACCA54013CBC_52_battery/state", "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_ACCA54013CBC_52_battery"}
homeassistant/sensor/znet/ACCA54013CBC_52_battery/state 88
homeassistant/sensor/znet/ACCA54013CBC_53_battery/config {"unit_of_measurement": "%", "name": "SRT321 - Battery", "device_class": "battery", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "availability_topic": "/telldus/znet/available", "unique_id": "ACCA54013CBC_ACCA54013CBC_53_battery"}
homeassistant/sensor/znet/ACCA54013CBC_53_battery/state 63
homeassistant/climate/znet/18/config {"temperature_state_topic": "homeassistant/climate/znet/18/state", "name": "Vardagsrummet", "mode_command_topic": "homeassistant/climate/znet/18/set/mode", "mode_state_template": "{{ value_json.mode }}", "mode_state_topic": "homeassistant/climate/znet/18/state", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/18/set/setpoint", "availability_topic": "/telldus/znet/available", "temperature_state_template": "{{ value_json.temperature }}", "unique_id": "ACCA54013CBC_18"}
homeassistant/climate/znet/18/state ""
homeassistant/climate/znet/53/config {"temperature_state_topic": "homeassistant/climate/znet/53/state", "name": "SRT321", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "mode_state_template": "{{ value_json.mode }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "device": {"sw_version": "1.2.0", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "temperature_state_template": "{{ value_json.temperature }}", "unique_id": "ACCA54013CBC_53"}
homeassistant/climate/znet/53/state ""
homeassistant/climate/znet/53/set/mode heat
homeassistant/climate/znet/53/set/setpoint 20.0
homeassistant/climate/znet/53/set/mode heat
tb-lund commented 4 years ago

Another quick observation is that when the thermostat posts a new temperature reading to the Tellstick or when it changes from non-heating to heating, there is an empty status post to MQTT i.e., homeassistant/climate/znet/53/state ""

quazzie commented 4 years ago

Mmm, made a few changes :) Please try this: https://drive.google.com/open?id=1_8d7K95QbM4F0Ce5RwdyJAilDmzlcYhO Post telldus/znet/debug and homeassistant/climate/#

tb-lund commented 4 years ago

Hi again! Something must, unfortunately, have happened with this build. When installing it, it installs fine and in requests a reboot, as it should. However, the "gear" enabling the setting of MQTT server et.c., is gone and it does not appear to retain any of the settings from the b2 version as there is no activity in the debug feed of the MQTT. When I re-install the b2 everything works well again.

quazzie commented 4 years ago

Oops my bad, sorry. Missed an import, that's what you get when you skip testing it yourself. Btw, you must be running the beta firmware on you tellstick for this plugin to work (1.3.1).

https://drive.google.com/open?id=1sGoasRTDmCqvO9xAysaM_7Tro1pJugy9

tb-lund commented 4 years ago

That definitely did it for the installation. Now it installs fine but there is still something blocking the status update. When the temperature is changed on the thermostat I get the following debug post: /telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 1, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"} /telldus/znet/debug climateState 53, state: {u'setpoint': None, u'mode': None}, mode: None /telldus/znet/debug climateState exception 'NoneType' object has no attribute 'get'

In this code, "state":1 is heating and "state":2 is non-heating.

mosquitto_pub -t "homeassistant/climate/znet/53/set/setpoint" -m "14" still throws the message: /telldus/znet/debug onMessage exception invalid literal for int() with base 10: 'set'

Of note is that the stable version f the firmware is also 1.3.1 now but I changed it to the beta firmware just in case, so all of this has been conducted on the beta firmware.

Thanks again for all the hard work with this and I'm sorry that the last part is causing problems. It feels like its very close now...

Below is again the debug at startup:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 6, "sensors": {}, "name": "dining_room_crystal", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "16"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 6 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/6/state", "command_topic": "homeassistant/light/znet/6/set", "schema": "json", "name": "dining_room_crystal", "brightness": true}, "deviceTopic": "homeassistant/light/znet/6", "deviceType": "light"}
/telldus/znet/debug deviceState 6, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "kitchen_window", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "kitchen_window", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 8, "sensors": {}, "name": "hall_stairlamp_old", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 8 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/8/state", "command_topic": "homeassistant/light/znet/8/set", "schema": "json", "name": "hall_stairlamp_old", "brightness": true}, "deviceTopic": "homeassistant/light/znet/8", "deviceType": "light"}
/telldus/znet/debug deviceState 8, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 9, "sensors": {}, "name": "office_ceiling", "parameters": {"house": "15874710", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [16, 94], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 9 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/9/state", "command_topic": "homeassistant/light/znet/9/set", "schema": "json", "name": "office_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/9", "deviceType": "light"}
/telldus/znet/debug deviceState 9, state: 16, value: 94
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 10, "sensors": {}, "name": "attic_hall", "parameters": {"house": "4978370", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "3"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 10 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/10/state", "command_topic": "homeassistant/switch/znet/10/set", "name": "attic_hall"}, "deviceTopic": "homeassistant/switch/znet/10", "deviceType": "switch"}
/telldus/znet/debug deviceState 10, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 11, "sensors": {}, "name": "bedroom_ceiling", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [16, 204], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 11 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/11/state", "command_topic": "homeassistant/light/znet/11/set", "schema": "json", "name": "bedroom_ceiling", "brightness": true}, "deviceTopic": "homeassistant/light/znet/11", "deviceType": "light"}
/telldus/znet/debug deviceState 11, state: 16, value: 204
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 12, "sensors": {}, "name": "kitchen_bench", "parameters": {"house": "19327942", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "2"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 12 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/12/state", "command_topic": "homeassistant/light/znet/12/set", "schema": "json", "name": "kitchen_bench", "brightness": true}, "deviceTopic": "homeassistant/light/znet/12", "deviceType": "light"}
/telldus/znet/debug deviceState 12, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 16, "sensors": {}, "name": "bookshelf_dining_room", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "15"}, "state": [16, 59], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 16 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/16/state", "command_topic": "homeassistant/light/znet/16/set", "schema": "json", "name": "bookshelf_dining_room", "brightness": true}, "deviceTopic": "homeassistant/light/znet/16", "deviceType": "light"}
/telldus/znet/debug deviceState 16, state: 16, value: 59
/telldus/znet/debug {"methods": 35, "battery": null, "isSensor": false, "deviceId": 21, "sensors": {}, "name": "RT-Augusta", "parameters": {"house": "13053585", "devicetype": "00000010-0001-1000-2005-ACCA54000000", "unit": "1"}, "state": [2, ""], "typeStr": "433", "type": "switch", "isDevice": true}
/telldus/znet/debug device 21 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/switch/znet/21/state", "command_topic": "homeassistant/switch/znet/21/set", "name": "RT-Augusta"}, "deviceTopic": "homeassistant/switch/znet/21", "deviceType": "switch"}
/telldus/znet/debug deviceState 21, state: 2, value: 
/telldus/znet/debug {"methods": 0, "battery": null, "isSensor": true, "deviceId": 51, "sensors": {"1024": [{"scale": 0, "lastUpdated": 1579637674, "value": "3.6"}], "1": [{"scale": 0, "lastUpdated": 1579637674, "value": "5.6"}], "2": [{"scale": 0, "lastUpdated": 1579637674, "value": "87.4"}], "2048": [{"scale": 0, "lastUpdated": 1579637674, "value": "102.77"}], "32": [{"scale": 0, "lastUpdated": 1579637674, "value": "6.9"}], "64": [{"scale": 0, "lastUpdated": 1579637674, "value": "10.9"}], "16": [{"scale": 0, "lastUpdated": 1579637674, "value": "289.9"}]}, "name": "YR local weather", "parameters": {"devicetype": "00000000-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "yr", "type": "binary_sensor", "isDevice": false}
/telldus/znet/debug device 51 has sensors
/telldus/znet/debug sensortype 1024 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'3.6'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'3.6'}
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'5.6'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'5.6'}
/telldus/znet/debug sensortype 2 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'87.4'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'87.4'}
/telldus/znet/debug sensortype 2048 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'102.77'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'102.77'}
/telldus/znet/debug sensortype 32 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'6.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'6.9'}
/telldus/znet/debug sensortype 64 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'10.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'10.9'}
/telldus/znet/debug sensortype 16 has [{'scale': 0, 'lastUpdated': 1579637674, 'value': u'289.9'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579637674, 'value': u'289.9'}
/telldus/znet/debug {"methods": 2048, "battery": 100, "isSensor": true, "deviceId": 18, "sensors": {"1": [{"scale": 0, "lastUpdated": 1574366613, "value": "23.1"}]}, "name": "Vardagsrummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 18 has battery
/telldus/znet/debug device 18 is climate
/telldus/znet/debug climateState 18, state: {u'setpoint': 18.0, u'mode': None}, mode: None
/telldus/znet/debug climateState exception 'float' object has no attribute 'get'
/telldus/znet/debug {"methods": 2048, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579637854, "value": "19.5"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, state: {u'setpoint': None, u'mode': None}, mode: None
/telldus/znet/debug climateState exception 'NoneType' object has no attribute 'get'
/telldus/znet/debug Updating config.devices_configured to : [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('sensor', '18', 'ACCA54013CBC_18_battery'), ('climate', '18', '18'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '6', '6'), ('light', '7', '7'), ('light', '8', '8'), ('light', '9', '9'), ('switch', '10', '10'), ('light', '11', '11'), ('light', '12', '12'), ('light', '16', '16'), ('switch', '21', '21'), ('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('sensor', '18', 'ACCA54013CBC_18_battery'), ('climate', '18', '18'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 1, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug climateState 53, state: {u'setpoint': None, u'mode': None}, mode: None
/telldus/znet/debug climateState exception 'NoneType' object has no attribute 'get'
quazzie commented 4 years ago

There seem to be something strange going on, i can't seem to find where the devices saves their state (like temperature, setpoint and modes). I've fixed some bugs and added more debug on "climateState" message. This version will not work correctly but i might find how to read the state from. https://drive.google.com/open?id=1SOuXKDZwCTDls0nPxPq8Rd-f0xtXFZbK

And as usual please report 'telldus/znet/debug' and 'homeassistant/climate/#'. And please capture above messages both at startup and when adjusting the thermostat and switching modes and such.

Thanks for your patience.

tb-lund commented 4 years ago

Here comes the debug output.

I have tried to remove all devices and sensors from the Tellstick so that I only have one Thermostat and one other device. I have removed the "YR" Weather service as well, but it keeps showing in the debug output despite multiple reboots and it is gone in the Web interface. Sorry about that.

The Thermostat is called "SRT321" and the other device is "mantis"

The 18.5 as seen in device 53 is the current temperature recorded on the Thermostat so that is promising at least. The setpoint for the Thermostat was 20.0 but that I d not see in the debug, unfortunately.

I hope that this helps.

Here is the debug:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 0, "battery": null, "isSensor": true, "deviceId": 51, "sensors": {"1024": [{"scale": 0, "lastUpdated": 1579695946, "value": "2.7"}], "1": [{"scale": 0, "lastUpdated": 1579695946, "value": "7.4"}], "2": [{"scale": 0, "lastUpdated": 1579695946, "value": "72.8"}], "2048": [{"scale": 0, "lastUpdated": 1579695946, "value": "102.74"}], "32": [{"scale": 0, "lastUpdated": 1579695946, "value": "6.2"}], "64": [{"scale": 0, "lastUpdated": 1579695946, "value": "10.4"}], "16": [{"scale": 0, "lastUpdated": 1579695946, "value": "338.3"}]}, "name": "YR local weather", "parameters": {"devicetype": "00000000-0001-1000-2005-ACCA54000000"}, "state": [2, ""], "typeStr": "yr", "type": "binary_sensor", "isDevice": true}
/telldus/znet/debug device 51 has sensors
/telldus/znet/debug sensortype 1024 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'2.7'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'2.7'}
/telldus/znet/debug sensortype 1 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'7.4'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'7.4'}
/telldus/znet/debug sensortype 2 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'72.8'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'72.8'}
/telldus/znet/debug sensortype 2048 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'102.74'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'102.74'}
/telldus/znet/debug sensortype 32 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'6.2'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'6.2'}
/telldus/znet/debug sensortype 64 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'10.4'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'10.4'}
/telldus/znet/debug sensortype 16 has [{'scale': 0, 'lastUpdated': 1579695946, 'value': u'338.3'}]
/telldus/znet/debug sensorState {'scale': 0, 'lastUpdated': 1579695946, 'value': u'338.3'}
/telldus/znet/debug device 51 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/binary_sensor/znet/51/state", "name": "YR local weather"}, "deviceTopic": "homeassistant/binary_sensor/znet/51", "deviceType": "binary_sensor"}
/telldus/znet/debug deviceState 51, state: 2, value: 
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [2, ""], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 2, value: 
/telldus/znet/debug {"methods": 2048, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579693290, "value": "18.5"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, state: {u'setpoint': None, u'mode': None}, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579693290, 'value': u'18.5'}]}, devState: 1, devStateValues: 
/telldus/znet/debug Updating config.devices_configured to : [('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('binary_sensor', '51', '51'), ('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('sensor', '51', '51_1024_0'), ('sensor', '51', '51_1_0'), ('sensor', '51', '51_2_0'), ('sensor', '51', '51_2048_0'), ('sensor', '51', '51_32_0'), ('sensor', '51', '51_64_0'), ('sensor', '51', '51_16_0'), ('binary_sensor', '51', '51'), ('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing

and the status output:

homeassistant/climate/znet/53/config {"current_temperature_state_topic": "homeassistant/climate/znet/53/state", "temperature_state_topic": "homeassistant/climate/znet/53/state", "json_attributes_template": "{{ json_value.setpoint }}", "mode_state_template": "{{ value_json.mode }}", "json_attributes_topic": "homeassistant/climate/znet/53/state", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "availability_topic": "/telldus/znet/available", "current_temperature_state_template": "{{ value_json.temperature }}", "name": "SRT321", "mode_state_topic": "homeassistant/climate/znet/53/state", "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "temperature_state_template": "{{ value_json.setpoint }}", "unique_id": "ACCA54013CBC_53"}
homeassistant/climate/znet/53/state {"devState": 1, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579693290, "value": "18.5"}]}, "thermostat": {"setpoint": null, "mode": null}, "devValues": ""}

When the Thermostat send a new temperature reading, here is the debug output:

/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 2, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug climateState 53, state: {u'setpoint': None, u'mode': None}, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579693290, 'value': u'18.5'}]}, devState: 2, devStateValues: 

and state update:

homeassistant/climate/znet/53/state {"devState": 2, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579693290, "value": "18.5"}]}, "thermostat": {"setpoint": null, "mode": null}, "devValues": ""}
homeassistant/climate/znet/53/state {"devState": 2, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579693290, "value": "18.5"}]}, "thermostat": {"setpoint": null, "mode": null}, "devValues": ""}
quazzie commented 4 years ago

The other devices doesn't bother me. What bothers me is that the mode and setpoint is nowhere to be found :\ Can you see the temperature, mode and setpoint on live.telldus.com ?

quazzie commented 4 years ago

https://drive.google.com/open?id=17z5hhbwSmk8QXMsZw9zQZ3BADkB-90Vw Should now report current temperature correctly to HA and you should be able to set mode and setpoint from HA. But as i can't seem to find where mode and setpoints are stored i don't know what the states will be in HA. It's a tad hard to develop something you don't have access to =)

tb-lund commented 4 years ago

I fully understand that this is very challenging and I'm impressed with your work so far! Below is a lua script showing how another developer has managed to access and change the setpoint. I'm not sure if it is directly transferable but it at least shows that they are accessible through the Tellstick.

For the HA integration, it is not fully there yet. HA does not recognize the thermostat device through the auto-discovery. It still only shows the battery but no sensor detected. I attach the new debug and status outputs.

For the tellldus live. The setpoint is seen in the configuration of the device (Clicking on the name of the device as seen in this screenshot:

Screenshot 2020-01-23 at 11 29 47

The temperature recording is seen in the sensors page as seen here:

Screenshot 2020-01-23 at 11 47 54

Of note is that the Tellldus Live API appears to only provide the temperature recording from the Thermostats and no setpoint. This is my main driving point for getting this to work in MQTT instead as there is no way to use thermostats with HA otherwise. In the "Telldus Live" addon in HA I do see the temperature and battery level:

Screenshot 2020-01-23 at 11 52 06

Here is the example lua script (this script works well in my hands for the SRT321 as well:

-- File: DanfossLC13Control.lua
-- 2017-10-01
-----------------------------------------------------------------------------
-- Script for control of Danfoss LC-13 zwave thermostats.
-- Tellstick Znet has limited function for control of LC-13.
-- This lua script makes it possible to control LC-13 devices via dummy devices. Each 
-- termostat should have a parallell dummy device. An on/off device or a dimmer that 
-- could have several states. When the state for the dummy device is changed, this 
-- lua script sets a new temperature for the corresponding LC-13.
--
-- The dummy device and the physical thermostat should have the same name, but different
-- prefix before the name. E.g. "RT-Kitchen" and "D-Kitchen". These prefixes should be 
-- defined. See below.
--
-- The temperatures corresponding to "off" on an on/off dummy and to "min" on a dimmer
-- should also be defined. The same for the on/max temperature. See below.
-- 
-- The function setDanfossTemperature below is written by Telldus.
---------------------------------------------------------------------------

--------------------------Parameters that could be edited------------------

local PREFIX_DEVICE="DT-"       -- Prefix for Danfoss LC-13 Thermostats
local PREFIX_DUMMY="RT-"        -- Prefix for Dummy devices (On/Off or dimmers)
local HEATING_MIN=8             -- Temperature when heating is off/min
local HEATING_MAX=25            -- Temperature when heating is on/max

---------------------------------------------------------------------------

local deviceManager = require "telldus.DeviceManager"
local COMMAND_CLASS_THERMOSTAT_SETPOINT = 0x43
local SETPOINT_TYPE_HEATING = '1'
local PrefixLgd=string.len(PREFIX_DUMMY)

function onInit()
    print("DanfossLC13 started %s ", os.date())
end

function onDeviceStateChanged(device, state, stateValue)
local temp, name, radDev
local PrefixLgd=string.len(PREFIX_DUMMY)

 if (string.find( device:name(), PREFIX_DUMMY, 1) == 1 ) then
        name = PREFIX_DEVICE .. string.sub(device:name(), PrefixLgd+1)
        radDev = deviceManager:findByName(name)
        if (device == nil) then
            print("Illegal device name ")
            return
        end

        if (state == 1 ) then
            temp = HEATING_MAX
        elseif (state == 16 ) then --state 16 means dimmer. stateValue is dim level. 
            temp = HEATING_MIN + math.floor((HEATING_MAX-HEATING_MIN) * stateValue/255)
        elseif (state == 2 ) then
            temp = HEATING_MIN
        else
            return
        end 
        setDanfossTemperature(radDev, temp) 
   end 
end

function setDanfossTemperature(dev, temperature)
   if (dev:typeString() ~= "zwave") then
      print("Device %s is not a Z-Wave device", dev:name())
      return
   end
   -- Get the raw zwave node
   local zwaveNode = dev:zwaveNode()
   -- Extract the thermostat setpoint command class
   local cmdClass = zwaveNode:cmdClass(COMMAND_CLASS_THERMOSTAT_SETPOINT)
   if (cmdClass == nil) then
      print("Device %s does not support THERMOSTAT_SETPOINT", dev:name())
      return
   end
   -- Set new value to be sent the next time the device is awake
   cmdClass:setSetpoint(SETPOINT_TYPE_HEATING, temperature)
    print("New temp %s C set for Danfoss thermostat: %s,  %s",temperature, dev:name(), os.date())
end

homeassistant/climate/# topics:

homeassistant/climate/znet/53/config {"current_temperature_state_topic": "homeassistant/climate/znet/53/state", "temperature_state_topic": "homeassistant/climate/znet/53/state", "json_attributes_template": "{{ json_value.setpoints | tojson }}", "mode_state_template": "{{ value_json.mode }}", "json_attributes_topic": "homeassistant/climate/znet/53/setpoints", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "availability_topic": "/telldus/znet/available", "current_temperature_state_template": "{{ value_json.temperature }}", "name": "SRT321", "mode_state_topic": "homeassistant/climate/znet/53/state", "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "temperature_state_template": "{{ value_json.setpoint }}", "unique_id": "ACCA54013CBC_53"}

and debug:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579714591, "value": "20.6"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, stateValues: {u'2048': {u'setpoint': None, u'mode': None}}, stateValueThermostat: {u'setpoint': None, u'mode': None}, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579714591, 'value': u'20.6'}]}, devState: 1, devStateValues: 
/telldus/znet/debug climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug remove discovered device sensor,51,51_16_0 : homeassistant/sensor/znet/51_16_0
/telldus/znet/debug remove discovered device sensor,51,51_2048_0 : homeassistant/sensor/znet/51_2048_0
/telldus/znet/debug remove discovered device sensor,51,51_2_0 : homeassistant/sensor/znet/51_2_0
/telldus/znet/debug remove discovered device binary_sensor,51,51 : homeassistant/binary_sensor/znet/51
/telldus/znet/debug remove discovered device sensor,51,51_64_0 : homeassistant/sensor/znet/51_64_0
/telldus/znet/debug remove discovered device sensor,51,51_32_0 : homeassistant/sensor/znet/51_32_0
/telldus/znet/debug remove discovered device sensor,51,51_1_0 : homeassistant/sensor/znet/51_1_0
/telldus/znet/debug remove discovered device sensor,51,51_1024_0 : homeassistant/sensor/znet/51_1024_0
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
quazzie commented 4 years ago

The lua code is not directly usable as the plugin is in python. I have not found a way to get the raw zwave device in python, i've requested support from telldus about that.

But i made a bunch more changes and it should work now. Except you won't see the "correct/current" setpoint from the device as i have not been able to locate where that is saved. But you should be able to set the thermostat from HA and it should update the zwave device and optimistically update the setpoint state in HA.

Beware though that from what i can find on the net it can take a while for your specific device (SRT321) to update.

That is of course there are no more bugs/typos in my code :\ They are hard to find because i can't run the code that happens when you fiddle with the thermostat.

Keep me posted :) https://drive.google.com/open?id=1FpsHv5FmRL1yegLQoF_NjYqP8mXXXeWD (edited, new version b8)

quazzie commented 4 years ago

Hmm i wonder if this device should not map to a climate component in HA with all this limitations. Maybe it should map to a battery sensor, a temp sensor and uhm a service call to change the setpoint.

tb-lund commented 4 years ago

Thank you for your hard work. Unfortunately, there appears to be something blocking the successful posting to MQTT. I get

homeassistant/climate/znet/53/config (null)
homeassistant/climate/znet/53/state (null)

and

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 63, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579714591, "value": "20.6"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug discoverThermostat global name 'modes' is not defined
/telldus/znet/debug climateState exception global name 'thermoValues' is not defined
/telldus/znet/debug remove discovered device climate,53,53 : homeassistant/climate/znet/53
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery')]
/telldus/znet/debug subscribing
quazzie commented 4 years ago

https://drive.google.com/open?id=1VmLvlvBkUTtexALbnLab4p3C-p1L9DFd

tb-lund commented 4 years ago

Now it is recognized again in HA as a climate device so this is great. However, when I change the setpoint in HA I get the following error: /telldus/znet/debug onMessage exception local variable 'mode' referenced before assignment and the temperature is not set on the thermostat. I hope that this tells you something.

Here is the debug:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 70, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579823437, "value": "19.6"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579823437, 'value': u'19.6'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: heat
/telldus/znet/debug climateState exception type object 'Device' has no attribute 'MODE_FAN'
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
/telldus/znet/debug {"command": "18.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug onMessage exception local variable 'mode' referenced before assignment
/telldus/znet/debug {"command": "heat", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug onMessage exception global name 'changeMode' is not defined
/telldus/znet/debug {"command": "10.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug onMessage exception local variable 'mode' referenced before assignment
/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 1, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579823437, 'value': u'19.6'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: heat
/telldus/znet/debug climateState exception type object 'Device' has no attribute 'MODE_FAN'
/telldus/znet/debug {"origin": "Incoming signal", "stateValue": "", "state": 1, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579823437, 'value': u'19.6'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: heat
/telldus/znet/debug climateState exception type object 'Device' has no attribute 'MODE_FAN'

And the HA topic:

homeassistant/climate/znet/53/attr {"modes": ["heat"]}
homeassistant/climate/znet/53/config {"current_temperature_topic": "homeassistant/climate/znet/53/state", "json_attributes_topic": "homeassistant/climate/znet/53/attr", "name": "SRT321", "current_temperature_template": "{{ value_json.temperature }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "mode_state_template": "{{ value_json.mode }}", "json_attributes_template": "{{ json_value }}", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "unique_id": "ACCA54013CBC_53", "modes": ["heat"]}
homeassistant/climate/znet/53/set/setpoint 18.0
homeassistant/climate/znet/53/set/mode heat
homeassistant/climate/znet/53/set/setpoint 10.0
quazzie commented 4 years ago

Sorry about that. My lack of python experience, missed an obvious thing. I think i'll have to take the time to set up some proper testing and linting.

Anyway here's a new version if your still interested :) https://drive.google.com/open?id=1zZEpgOt5xO8CPTX1mX9LvdRU5rzC_0ou

tb-lund commented 4 years ago

I'm always happy to test new versions :)

This new version spits out a different error message now and that is: /telldus/znet/debug Device command failed: 0

Here is the debug:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 70, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579973865, "value": "25.9"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579973865, 'value': u'25.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug climateState exception type object 'Device' has no attribute 'MODE_FAN'
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
/telldus/znet/debug {"command": "16.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug Device command failed: 0
/telldus/znet/debug {"command": "heat", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug onMessage exception float() argument must be a string or a number

And the HA topic:

homeassistant/climate/znet/53/attr {"modes": ["heat"]}
homeassistant/climate/znet/53/config {"current_temperature_topic": "homeassistant/climate/znet/53/state", "json_attributes_topic": "homeassistant/climate/znet/53/attr", "name": "SRT321", "current_temperature_template": "{{ value_json.temperature }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "mode_state_template": "{{ value_json.mode }}", "json_attributes_template": "{{ json_value }}", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "unique_id": "ACCA54013CBC_53", "modes": ["heat"]}
homeassistant/climate/znet/53/set/setpoint 16.0
homeassistant/climate/znet/53/set/mode heat
quazzie commented 4 years ago

Hmm "Device command failed: 0" does not bod well. I made some fixes and i'm talking to telldus support about the lua setpoint command. I'm doing it the python way and it seems that's what you are getting the "Device command failed" from.

https://drive.google.com/open?id=1Bcj61dWBNj6-QZbGsSbl1ByiVjKdHfHk

tb-lund commented 4 years ago

Thank you for fighting with this! In the b11 the errors are slightly different with /telldus/znet/debug onMessage exception global name 'isfloat' is not defined when I post the new temperature from HA.

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 70, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1579973865, "value": "25.9"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1579973865, 'value': u'25.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
/telldus/znet/debug {"command": "15.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug onMessage exception global name 'isfloat' is not defined

And the HA topic:

homeassistant/climate/znet/53/attr {"modes": ["heat"]}
homeassistant/climate/znet/53/config {"current_temperature_topic": "homeassistant/climate/znet/53/state", "json_attributes_topic": "homeassistant/climate/znet/53/attr", "name": "SRT321", "current_temperature_template": "{{ value_json.temperature }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "mode_state_template": "{{ value_json.mode }}", "json_attributes_template": "{{ json_value }}", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "unique_id": "ACCA54013CBC_53", "modes": ["heat"]}
homeassistant/climate/znet/53/set/setpoint 15.0
quazzie commented 4 years ago

https://drive.google.com/open?id=1ka5LLoEZcQCzK2B20Bh1jrqaOV3pvT7T

tb-lund commented 4 years ago

Thanks for the new beta version. Unfortunately, the debug output looks very much like the last:

/telldus/znet/debug discover devices
/telldus/znet/debug {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug device 7 is a device
/telldus/znet/debug device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug deviceState 7, state: 16, value: 40
/telldus/znet/debug {"methods": 2048, "battery": 70, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1580304843, "value": "24.9"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug device 53 has battery
/telldus/znet/debug device 53 is climate
/telldus/znet/debug climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1580304843, 'value': u'24.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug subscribing
/telldus/znet/debug {"command": "16.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug Device command failed: 0
/telldus/znet/debug {"command": "12.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug Device command failed: 0

And the HA topic:

`` homeassistant/climate/znet/53/attr {"modes": ["heat"]} homeassistant/climate/znet/53/config {"current_temperature_topic": "homeassistant/climate/znet/53/state", "json_attributes_topic": "homeassistant/climate/znet/53/attr", "name": "SRT321", "current_temperature_template": "{{ value_json.temperature }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "mode_state_template": "{{ value_json.mode }}", "json_attributes_template": "{{ json_value }}", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "unique_id": "ACCA54013CBC_53", "modes": ["heat"]} homeassistant/climate/znet/53/set/setpoint 16.0 homeassistant/climate/znet/53/set/setpoint 12.0

quazzie commented 4 years ago

Ok, isfloat error is gone. Got a mail from Telldus today that said they are rolling out 1.3.1 with some fixes for thermostats. I think we need to wait for that and see.

quazzie commented 4 years ago

Hmm I see that I am running 1.3.1 beta on my Dev Tellstick. Can you check your version?

tb-lund commented 4 years ago

Yes, that is a little strange indeed. I'm running 1.3.1 beta as well and the stable version I was running before updating was also called 1.3.1. It feels like they have gotten stuck on that number...

fredrike commented 4 years ago

I'm following this with great enthusiasm! When this gets official we could deprecate the Tellstick plugin in HA :).

quazzie commented 4 years ago

https://drive.google.com/open?id=18iDb7E-43Ew7isLeL29SgieJbib9fNOD

Telldus said it the command should work. The code i'm running should produce same result as the LUA thing. "Device command failed: 0" should be expected as it is a battery powered device and the command should be queued and if the device is not responsive in some time i should get this "error". But the command should be queued and sent to the device when it periodically wakes up.

tb-lund commented 4 years ago

Thank you for all the communication with Telldus. It is unfortunately still not totally there yet. It does not change the temperature on the thermostat. There is a new error message now climateState exception 'list' object has no attribute 'get' This error is the same even if the Thermostat is in active listening mode (where the new temperature is set directly when done on the Telldus live webpage).

Here is the full debug:

/telldus/znet/debug 14:28:14: discover devices
/telldus/znet/debug 14:28:14: {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 40], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug 14:28:14: device 7 is a device
/telldus/znet/debug 14:28:14: device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug 14:28:14: deviceState 7, state: 16, value: 40
/telldus/znet/debug 14:28:15: {"methods": 2048, "battery": 70, "isSensor": true, "deviceId": 53, "sensors": {"1": [{"scale": 0, "lastUpdated": 1580405648, "value": "23.9"}]}, "name": "SRT321", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [2, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug 14:28:15: device 53 has battery
/telldus/znet/debug 14:28:15: device 53 is climate
/telldus/znet/debug 14:28:15: climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1580405648, 'value': u'23.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug 14:28:15: climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug 14:28:15: Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug 14:28:15: config updated devices_configured [('light', '7', '7'), ('sensor', '53', 'ACCA54013CBC_53_battery'), ('climate', '53', '53')]
/telldus/znet/debug 14:28:15: subscribing
/telldus/znet/debug 14:42:08: {"command": "14.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug 14:42:08: Command THERMOSTAT value: {'changeMode': False, 'mode': 'off', 'temperature': 14.0}
/telldus/znet/debug 14:42:08: Device command failed: 0
/telldus/znet/debug 14:56:17: {"origin": "Incoming signal", "stateValue": "", "state": 2, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug 14:56:17: climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1580405648, 'value': u'23.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug 14:56:17: climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug 14:56:17: {"origin": "Incoming signal", "stateValue": "", "state": 2, "devicetype": "climate", "deviceId": 53, "type": "deviceStateChanged"}
/telldus/znet/debug 14:56:17: climateState 53, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1580405648, 'value': u'23.9'}]}, thermovalues: {u'setpoint': None, u'mode': None}, setPoint: None, mode: off
/telldus/znet/debug 14:56:17: climateState exception 'list' object has no attribute 'get'
/telldus/znet/debug 14:58:56: {"command": "12.0", "type": "command", "device_type": "climate", "device_id": 53}
/telldus/znet/debug 14:58:56: Command THERMOSTAT value: {'changeMode': False, 'mode': 'off', 'temperature': 12.0}
/telldus/znet/debug 14:58:56: Device command failed: 0

HA topic:

homeassistant/climate/znet/53/attr {"modes": ["heat"]}
homeassistant/climate/znet/53/config {"current_temperature_topic": "homeassistant/climate/znet/53/state", "json_attributes_topic": "homeassistant/climate/znet/53/attr", "name": "SRT321", "current_temperature_template": "{{ value_json.temperature }}", "mode_state_topic": "homeassistant/climate/znet/53/state", "mode_state_template": "{{ value_json.mode }}", "json_attributes_template": "{{ json_value }}", "device": {"sw_version": "1.3.1", "name": "znet", "identifiers": "ACCA54013CBC", "connections": [["mac", "AC:CA:54:01:3C:BC"]], "model": "tellstick-znet-lite", "manufacturer": "Telldus Technologies"}, "temperature_command_topic": "homeassistant/climate/znet/53/set/setpoint", "availability_topic": "/telldus/znet/available", "mode_command_topic": "homeassistant/climate/znet/53/set/mode", "unique_id": "ACCA54013CBC_53", "modes": ["heat"]}
homeassistant/climate/znet/53/set/setpoint 14.0
homeassistant/climate/znet/53/set/setpoint 12.0
quazzie commented 4 years ago

Hmm missed the list error, it should not affect the setpoint command though. It affects the state update to HA. I'll take a look at the error.

quazzie commented 4 years ago

https://drive.google.com/open?id=1HjaLbpLmE5bdbfSRU_5_XDz9DvxxXK39

tb-lund commented 4 years ago

Great success! The configuration into HA works as it should and the setpoint, when set in HA is correctly propagated to the Thermostat. This whole thing now works flawlessly.

The only thing that does not work is the update of the Setpoint in HA when it is changed on the Thermostat. it is still reported as "null" in the HA state: homeassistant/climate/znet/53/state {"setpoint": null, "mode": "heat", "temperature": "20.9"} I know that this is reported back from the Thermostat to the Tellstick as it is correctly updated in the Telldus Live interface. Do you think that this could be solved somehow? Although not as crucial as the other functions, it would clearly be a very nice to have component. I guess it would require some kind of polling?

Could I also suggest an additional function? I have seen in other Z-wave implementations of Thermostats that three different "Entities" are created. One "Climate" entity, one "Sensor" entity for the battery level and one "Sensor" entity for the actual room temperature. This would be very useful for easy incorporation in other functions and scripts dependent on the reporting of the temperature. Would this be possible to implement? I know that it would report the same thing twice but it would provide parity with other Thermostat implementations in HA.

Thank you again for all the hard work with this! I will now be able to set this up and use it in my cottage. It will be very appreciated by the family!

quazzie commented 4 years ago

The null value for setpoint is what i get from telldus. So there must be something wrong on their end. This is what i said earlier in this issue. I'll inform them. The 3 entities i really don't see why. You should have 2 entities now, one battery entity and one climate (which should include setpoint (if telldus reports it) and current temp). If you really need the current temperature as a separate sensor you should make a template sensor and pick "current_temperature" attribute from the climate sensor.

tb-lund commented 4 years ago

Ok, thanks' for the information. I hope that they will get back to you with a solution there or that they implement a fix on their end.

For the 3 entities, this was solely a suggestion based on my previous observations in HA. When the same type of Thermostat is connected to HA through a Z-Stick USB controller directly, it shows up as 3 entities, as I described it. Thus, the suggestion was made to provide parity with that implementation. I'm not a HA person. I'm running my home in OpenHab. Therefore I cannot say if this is needed in HA. If you say that it isn't then this is fine.

quazzie commented 4 years ago

From telldus:

Är denna termostat inkluderad secure eller inte? Det finns en buggrapport om att termostat-parametrar inte rapporteras korrekt, men det verkar kunna handla om enheter som har inkluderats secure. Vi har inte kunnat återskapa denna bugg ännu, så har du mer information är vi tacksamma.

quazzie commented 4 years ago

@tb-lund är den ansluten som secure ? Så kan jag informera telldus. Funkar det fortfarande? :)

tb-lund commented 4 years ago

Hi again! Sorry for the belated response. I have been away for a week.

The thermostat was indeed added as secure. I have tried to connect it so many times that I forgot that I apparently did that the last time. It was surprisingly difficult to see for this one.

When I excluded it and re-added it it now works just as it should. This is absolutely not a big deal for me at least. I guess this will then maybe sort itself out when Telldus manages to make a fix?

It could be a worthwhile note to include in the documentation but otherwise, I would call this a complete success!

Thank you again for all the great work with this.

Jättetack för hjälpen!

quazzie commented 4 years ago

Great. So the setpoint and all work when not added as secure? If possible could you capture the mqtt Telldus/debug output ?

tb-lund commented 4 years ago

Yes! So far everything has been working as expected. The setpoint is updated from the thermostat to HA and in the opposite direction from HA to the thermostat. The current temperature is also updating correctly from the thermostat to HA.

Here is the debug output:

/telldus/znet/debug 19:21:18 - discover devices
/telldus/znet/debug 19:21:18 - {"methods": 51, "battery": null, "isSensor": false, "deviceId": 7, "sensors": {}, "name": "Mantis", "parameters": {"house": "4978370", "devicetype": "00000005-0001-1000-2005-ACCA54000000", "unit": "4"}, "state": [16, 89], "typeStr": "433", "type": "light", "isDevice": true}
/telldus/znet/debug 19:21:18 - device 7 is a device
/telldus/znet/debug 19:21:18 - device is device: {"deviceConfig": {"state_topic": "homeassistant/light/znet/7/state", "command_topic": "homeassistant/light/znet/7/set", "schema": "json", "name": "Mantis", "brightness": true}, "deviceTopic": "homeassistant/light/znet/7", "deviceType": "light"}
/telldus/znet/debug 19:21:19 - deviceState 7, state: 16, value: 89
/telldus/znet/debug 19:21:19 - {"methods": 2048, "battery": 100, "isSensor": true, "deviceId": 55, "sensors": {"1": [{"scale": 0, "lastUpdated": 1581499021, "value": "20.3"}]}, "name": "Vardagsrummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug 19:21:19 - device 55 has battery
/telldus/znet/debug 19:21:19 - device 55 is climate
/telldus/znet/debug 19:21:19 - climateState 55, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1581499021, 'value': u'20.3'}]}, thermovalues: {u'setpoint': {u'heat': 11.0}, u'mode': u'heat'}, setPoint: 11.0, mode: heat
/telldus/znet/debug 19:21:19 - {"methods": 2048, "battery": 255, "isSensor": true, "deviceId": 56, "sensors": {"1": [{"scale": 0, "lastUpdated": 1581491466, "value": "18.9"}]}, "name": "Sovrummet", "parameters": {"devicetype": "00000011-0001-1000-2005-ACCA54000000", "thermostat": {"setpoints": {"heat": {}}, "modes": ["heat"]}}, "state": [1, ""], "typeStr": "zwave", "type": "climate", "isDevice": true}
/telldus/znet/debug 19:21:19 - device 56 has battery
/telldus/znet/debug 19:21:19 - device 56 is climate
/telldus/znet/debug 19:21:19 - climateState 56, sensorValues: {1: [{'scale': 0, 'lastUpdated': 1581491466, 'value': u'18.9'}]}, thermovalues: {u'setpoint': {u'heat': 17.0}, u'mode': u'heat'}, setPoint: 17.0, mode: heat
/telldus/znet/debug 19:21:19 - Updating config.devices_configured to : [('light', '7', '7'), ('sensor', '55', 'ACCA54013CBC_55_battery'), ('climate', '55', '55'), ('sensor', '56', 'ACCA54013CBC_56_battery'), ('climate', '56', '56')]
/telldus/znet/debug 19:21:19 - config updated devices_configured [('light', '7', '7'), ('sensor', '55', 'ACCA54013CBC_55_battery'), ('climate', '55', '55'), ('sensor', '56', 'ACCA54013CBC_56_battery'), ('climate', '56', '56')]
/telldus/znet/debug 19:21:19 - subscribing
quazzie commented 4 years ago

Great news! Thanks for the debug output, looks good!