karloygard / hassio-addons

My Hass.io addons
6 stars 2 forks source link

Support for RCT devices, temperature controls etc #1

Closed geeewizzz closed 4 years ago

geeewizzz commented 4 years ago

usbstick.txt

geeewizzz commented 4 years ago

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. [11:20:24] INFO: Starting xcomfortd version 0.0.1 (alpha) 2020/04/11 11:20:24 Dp 1: device Switching Actuator (CSAx-01/xx), serial 5709360, channel 0, 'bakd�r utelys' 2020/04/11 11:20:24 Dp 2: device Dimming Actuator (CDAx-01/xx), serial 5740117, channel 0, '1.etg sov 4' 2020/04/11 11:20:24 Dp 3: device Dimming Actuator (CDAx-01/xx), serial 5734031, channel 0, '1.etg sov 3' 2020/04/11 11:20:24 Dp 4: device Dimming Actuator (CDAx-01/xx), serial 5740097, channel 0, '1.etg sov 2' 2020/04/11 11:20:24 Dp 5: device Dimming Actuator (CDAx-01/xx), serial 5733990, channel 0, '1.etg sov.1' 2020/04/11 11:20:24 Dp 6: device Dimming Actuator (CDAx-01/xx), serial 5736891, channel 0, '1.etg bad speil' 2020/04/11 11:20:24 Dp 7: device Dimming Actuator (CDAx-01/xx), serial 5736925, channel 0, '1.etg bad tak' 2020/04/11 11:20:24 Dp 8: device Dimming Actuator (CDAx-01/xx), serial 5734000, channel 0, '1.etg stor gang' 2020/04/11 11:20:24 Dp 9: device Switching Actuator (CSAx-01/xx), serial 5727252, channel 0, 'utelys hovedd�r' 2020/04/11 11:20:24 Dp 10: device Dimming Actuator (CDAx-01/xx), serial 5733992, channel 0, '1.etg tv stue' 2020/04/11 11:20:24 Dp 11: device Dimming Actuator (CDAx-01/xx), serial 5734068, channel 0, '1.etg liten gang' 2020/04/11 11:20:24 Dp 12: device Dimming Actuator (CDAx-01/xx), serial 5734274, channel 0, '1.etg kj�kken spotter' 2020/04/11 11:20:24 Dp 13: device Dimming Actuator (CDAx-01/xx), serial 5741956, channel 0, '1.etg stue lampe spi' 2020/04/11 11:20:24 Dp 14: device Switching Actuator (CSAx-01/xx), serial 5733605, channel 0, 'utelys terrasse' 2020/04/11 11:20:24 Dp 16: device Switching Actuator (CSAx-01/xx), serial 5727387, channel 0, '1.etg bad vk' 2020/04/11 11:20:24 Dp 20: device Switching Actuator (CSAx-01/xx), serial 5727267, channel 0, '1.etg dusj/bad vk' 2020/04/11 11:20:24 Dp 22: device Switching Actuator (CSAx-01/xx), serial 5733608, channel 0, '1.etg liten gang vk' 2020/04/11 11:20:24 Dp 24: device Switching Actuator (CSAx-01/xx), serial 5733583, channel 0, '1.etg stor gang vk' 2020/04/11 11:20:24 Dp 15: device Temperature Input (CTEU-02/xx), serial 5881271, channel 1, '1.etg bad temp (Kanal B)' 2020/04/11 11:20:24 Dp 17: device , serial 6784078, channel 6, '1.etg dusj/bad (ekstern Sensor (PT1000))' 2020/04/11 11:20:24 Dp 18: device , serial 6784078, channel 4, '1.etg dusj/bad (Touch-sensor A)' 2020/04/11 11:20:24 Dp 19: device , serial 6784078, channel 5, '1.etg dusj/bad (Touch-sensor B)' 2020/04/11 11:20:24 Dp 21: device Temperature Input (CTEU-02/xx), serial 5881353, channel 0, '1.etg liten gang temp (Kanal A)' 2020/04/11 11:20:24 Dp 23: device Temperature Input (CTEU-02/xx), serial 5881341, channel 1, '1.etg stor gang temp (Kanal B)' 2020/04/11 11:20:24 Connecting to MQTT broker 'tcp://core-mosquitto:1883' with id 'xcomfort' 2020/04/11 11:20:24 Connected to broker 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5709360_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5740117_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5736891_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5734068_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5733608_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5736925_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5734000_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5727252_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5734274_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5741956_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5727387_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5881271_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_6784078_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5733992_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5727267_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5733583_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5881353_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5734031_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5740097_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5733990_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5733605_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/sensor/xcomfort_5881341_rssi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/light/xcomfort_5727267_1_etg_dusj_bad_vk/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/light/xcomfort_5733992_1_etg_tv_stue/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/light/xcomfort_5734274_1_etg_kj_kken_spotter/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/light/xcomfort_5741956_1_etg_stue_lampe_spi/config 2020/04/11 11:20:24 Sending HA discovery add message: homeassistant/light/xcomfort_5733583_1_etg_stor_gang_vk/config panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]: github.com/karloygard/xcomfortd-go/pkg/xc.(Datapoint).Type(...) /xcomfortd-go/pkg/xc/datapoint.go:46 main.createDpDiscoveryMessages(0xbef91da7, 0xd, 0x29008d0, 0x2965a40, 0x29326f7, 0x2915300) /xcomfortd-go/ha_discovery.go:85 +0x1810 main.(MqttRelay).HADiscoveryAdd.func2(0x29008d0, 0x0, 0x0) /xcomfortd-go/ha_discovery.go:35 +0x54 github.com/karloygard/xcomfortd-go/pkg/xc.(Interface).ForEachDatapoint(0x2974240, 0x2965a9c, 0x0, 0x0) /xcomfortd-go/pkg/xc/interface.go:83 +0x70 main.(MqttRelay).HADiscoveryAdd(0x2974240, 0xbef91da7, 0xd, 0xbef91da7, 0xd) /xcomfortd-go/ha_discovery.go:34 +0xd0 main.usb(0x2930370, 0x0, 0x0) /xcomfortd-go/main.go:131 +0x334 github.com/urfave/cli.HandleAction(0x364738, 0x3df08c, 0x2930370, 0x2930370, 0x0) /go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:526 +0x10c github.com/urfave/cli.Command.Run(0x3bd198, 0x3, 0x0, 0x0, 0x2912c20, 0x1, 0x1, 0x3c4392, 0xf, 0x0, ...) /go/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:174 +0x3fc github.com/urfave/cli.(*App).Run(0x29067e0, 0x29165b0, 0xe, 0xe, 0x0, 0x0) /go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:279 +0x55c main.main() /xcomfortd-go/main.go:68 +0x4c8 [cmd] /run.sh exited 2 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

karloygard commented 4 years ago

Thanks, will fix shortly.

karloygard commented 4 years ago

I've fixed a few bugs, try rebuilding the addon now. It should at least start up now, but doesn't yet handle messages from the temperature sensors or the room controller, that will require a little more fiddling.

geeewizzz commented 4 years ago

Awesome! Seems to be working very nicely! Except for the things you mentioned of course.

Got it to crash a couple of times, not sure how and what I did, but I will create a new issue when I get it next time and have the logfile etc.

karloygard commented 4 years ago

Yes, please report back with issues that you see, this code is virtually untested.