What IDE are you using? There is/was a formatter for Eclipse that does this (Then in Eclipse there is a Source / Format menu).
There is also a maven goal, but it’s disabled in the Zigbee binding because this is configured differently than the formatter used previously (and still used in the Zigbee binding), and if we run it on the binding it changes every file which (IMHO) needlessly messes with the history and makes it difficult to work out what changed.
Have made progress but now have two main issues; the custom channels and the configuration options not having “sufficient parts”.
Any insight you can offer would be greatly appreciated.
[WARN ] [ore.thing.internal.ThingFactoryHelper] - Could not create channel 'SendOutDoorTemperature', because channel type 'zigbee:Outdoor_temperature' could not be found.
[WARN ] [ore.thing.internal.ThingFactoryHelper] - Could not create channel 'SendCurrentTimeUnixEpoch', because channel type 'zigbee:current_time' could not be found.
[WARN ] [ore.thing.internal.ThingFactoryHelper] - Could not create channel 'BacklightControl', because channel type 'zigbee:brightness' could not be found.
I have played around with a few options for the types without luck.
I’m guessing it is limited to channels predefined by the binding.
Looks like the outdoor temperature channel might be workable since there is an existing channel for it, albeit with different attributes, but are there channel types I can use for sending time and a binary 1 or 0 to the devices for the backlight?
Was hoping to be able to control the backlight dynamically with rules. ex: Having it turn off when room lights are turned off.
Commenting out the channels allows the definitions to be accepted by the binding and Things can be added.
The configuration options appear but do not work. Screenshot and error log below.
18:20:01.724 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_0204_1_18 has insufficient parts
18:20:01.724 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_0201_1026_30 has insufficient parts
18:20:01.725 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_0201_0401_33 has insufficient parts
18:20:01.726 [DEBUG] [ee.internal.ZigBeeDeviceConfigHandler] - Configuration update: Ignored zigbee_macaddress as no change
18:20:01.727 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_0204_0000_18 has insufficient parts
18:20:01.728 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_FF01_0017_21 has insufficient parts
18:20:01.728 [WARN ] [ee.internal.ZigBeeDeviceConfigHandler] - Config attribute_01_FF01_0276_30 has insufficient parts
The pull request files have been updated to reflect where I’m at now, even if they don’t work.
I know your time is limited but if you can provide any insight it would help a lot.
This error (channel type not found) is caused by the fact that these channels are not defined. For the temperature, you must use measurement_temperature as the type - then you can call it outdoor_temperature if you like.
Time is not currently supported
brightness probably should be switch_dimmer (I’m just going on the name here).
Correct. You can define more if you want though - they just need to be defined somewhere. However unless there’s a good reason I’d avoid creating a new channel type just for a new name.
Do you think there might be a different channel type we could use that would support sending a 32 bit integer, even if it might not be “time” related?
Would the changes required to support a “time” channel be in the channels.xml?
I’d like to get the bulk of the device functions working in order to say the devices are “fully supported”, even if just to thumb my nose at Sinope for not helping.
For that matter, how would you suggest implementing the minimum and maximum allowed setpoints?
They list both 3/4 and 21/22 standard attributes but only 21/22 appear to change when using the on-device configuration.
openhab> zigbee attsupported 61978/1 0x0201
Supported attributes for server cluster Thermostat (0201)
AttrId Data Type Name
3 SIGNED_16_BIT_INTEGER Abs Min Heat Setpoint Limit
4 SIGNED_16_BIT_INTEGER Abs Max Heat Setpoint Limit
21 SIGNED_16_BIT_INTEGER Min Heat Setpoint Limit
22 SIGNED_16_BIT_INTEGER Max Heat Setpoint Limit
Rather than multiple choice options for the configuration parameters is there a way to do a number input field?
Sorry for all the questions. The documentation helps but there isn’t really an “Openhab Zigbee for dummies” book.
Sure - you are free to define channel types in the XM, and then use them in the same XML. I would just ask that the channel name is prefixed by something to avoid there being a coflict.
Eg if a “few devices” suddenly decided to create their own “time” channel, and they all decided to call the channel type current_time, there would be a conflict since the channels are within the scope of the zigbee binding. So I would suggest to prefix it with the device type - eg sinopeth1123zb_currenttime or something like that.
So, to be clear - you need to define the channel type at the end of the file, but within the thing-description tag. Eg -:
`
Long
Time
Sets the time
Time
Then you can use this in the same file as a channel -:
Another thing I just noticed in your XML - the channel IDs can’t have spaces in them - I think that will cause an exception. Personally I would suggest to stick with lower case and use underscores - I know that’s different than the (current) OH recommended way to name channels, but it was the right way in the past, and it is then consistent with the rest of the binding.
The spaces did cause exceptions.
I removed them last night and was able to add the devices with only the two channels enabled.
They did not seem to accept commands but I ran out of time to investigate.
Hi… I was wondering if those changes made their way into a release ? I’d like to test this and see if I can leverage the additional features in the Sinope thermostats…
I was having trouble getting the custom channels for time and temperature to work, and then life got in the way.
It is still on my radar.
Hoping to look at those channels again soon with fresh eyes.
Was having trouble with custom channels but also wondering if it is possible to have a channel and configuration both control the same setting?
Here we have the proposed custom channel (which did not work last time I tried).
Most users would set the configuration once but I was thinking it would be a nice option to tell the thermostat when the lights in the room are turned on or off and force the backlight on or off.