cblomart / zwaymqtt

RaZberry (z-wave on raspberry pi) to MQTT gateway
MIT License
18 stars 4 forks source link

stellaz thermostats: device not implemented #3

Open luxus opened 8 years ago

luxus commented 8 years ago

Im sorry to bother you again @cblomart May 08 04:36:46 kaipi zwaymqtt[4643]: 2016/05/08 04:36:46 device not implemented. May 08 04:36:46 kaipi zwaymqtt[4643]: 2016/05/08 04:36:46 device not implemented. May 08 04:36:46 kaipi zwaymqtt[4643]: 2016/05/08 04:36:46 device not implemented. May 08 04:36:46 kaipi zwaymqtt[4643]: 2016/05/08 04:36:46 device not implemented.

i have 4 eurotronics stellaz valve radiator thermostats but 1 thermostat have 4 "devices" here my devices.json from z-way https://gist.github.com/luxus/d2940d284f706ae3046293bbc1e17dc9

but still i don't see any messages in mqtt

cblomart commented 8 years ago

I added more logging to know what is the exact generic type of your devices. I saw that there was some kind of thermostat v2 but didn't find back their id (integer). Basicaly zwaymqtt will parse different command class in function of the device type. So next step would be to be sure which command classes to check (at least switch multilevel and sensor multilevel). I see a command class thermostat set point but its workings are not clear to me.

luxus commented 8 years ago

thanks, the set point is the temperature you want in your room. the thermostat turn on the heating until the sensor have the right temperature. there are some "mode" to control more but they don't really work. what i just need is ro access to the sensor, a actual state of the set point and a way to set the set point via mqtt

luxus commented 8 years ago

@cblomart thanks for the update

2016/05/08 10:34:08 device not implemented: type: %!d(float64=8) / name: Badezimmer Heizung
2016/05/08 10:34:08 device not implemented: type: %!d(float64=8) / name: Ankleide Heizung
2016/05/08 10:34:08 device not implemented: type: %!d(float64=8) / name: Wohnzimmer Heizung
2016/05/08 10:34:08 Skipping node 1: basic static controler
2016/05/08 10:34:08 device not implemented: type: %!d(float64=8) / name: Schlafzimmer Heizung

that means all my devices got ignored 👎

cblomart commented 8 years ago

it did :-( and i expected so the commit mainly added the type and name info.

It confirms that the device is of type thermostat (type 8 - in float64 !@#!-)that was not handled by zwaymqtt.

I updated the code to handle thermostat.

Currently: sensor multilevel class and switch binary class

So it should normaly allow to see the temp and to enable/disable the thermostat.

I would require to have a bit more info on the structure of the setpoint class to enable it. Mainly where to find the data in the infromation returned by zway.

Could you:

luxus commented 8 years ago

https://gist.github.com/luxus/6eaec7afcf4d37d27ed0bdf1ce7e8020 i will test the switch now

luxus commented 8 years ago

@cblomart bad news, i checked cloudmqtt.com for any new messages.. but there are none from zwaymqtt can you add some debug code into the console when it try to send a message. perhaps it is some trouble with cloudmqtt

luxus commented 8 years ago

@cblomart wait.. u say u updated the code to handle thermostat. but where? i don't see no code change since the debug code

cblomart commented 8 years ago

just pushed (was still in local git)

luxus commented 8 years ago

okay.. rebuilding my docker..

luxus commented 8 years ago

does it wait for changes or should it send directly the state @cblomart ?

cblomart commented 8 years ago

Changes are detected at the refresh rate and are sent to mqtt

luxus commented 8 years ago

@cblomart sorry my english is not so great! what i meant is does it check for example all sensors on start and post them to the mqtt or does it wait until a change happened. does it read the state on start and post it to mqtt? at the moment it is not working it is not posting anything to mqtt even after the temperature changed

update: i got my first updates in mqtt

cblomart commented 8 years ago

By the way: i did look at continuous integration with drone.io so binaries are automaticaly build and available atvhttps://drone.io/github.com/cblomart/zwaymqtt/files i'd like to add recognition of environment variables and set a dockerhub image... as you are apparently working with docker this might help you.

Further news on updates to mqtt?

I have read your excrept of zway update... i need to look further for set point as there are two "set point" (economy or not)

luxus commented 8 years ago

the economy should be irrelevant.. its a setting for summer, to set the thermostats very low, i think you can't even change the temperature.. the set point is only available on comfort. one thing i notice.. i would love to see all states in mqtt on start of zwaymqtt because home-assistant try to read the values and they are not existing..

another thing is that i see messages receiving and after some time they gone what i saw was battery and temperature.. but both messages should stay or i don't know exactly how it works but for example i always see a message of owntracks and i even don't know how to get rid of the message i post manually :D

about docker i just do a pretty basic one https://github.com/luxus/rpi2-docker-zwaymqtt

luxus commented 8 years ago

@cblomart any update on this? do you think this tool will be able to handle the set point anytime soon? its beside the temperature the only other mandatory thing for me :D

cblomart commented 8 years ago

Last commit tries to deal with setpoint. should popup in dockerhub any minutes now.

luxus commented 8 years ago

hi, i tried the build before and got this error

2016/05/09 20:51:51 Error decoding json: invalid character 'N' looking for beginning of value
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 29 [running]:
panic(0x281430, 0x106c0a80)
    /home/travis/.gimme/versions/go/src/runtime/panic.go:500 +0x33c
main.checkzwayupdate(0x106be370, 0xd, 0x1063d500)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:767 +0x2f8
main.main.func2(0x1063d4c0, 0x1063d500)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:942 +0x80
created by main.main
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:944 +0xa60
cblomart commented 8 years ago

Could you test either the latest release by drone.io or the dockerhub image cblomart/rpi-zwaymqtt:master ?

This because debug references have changed (line 767 is no longer in checkzwayupdate).

luxus commented 8 years ago

i got the same message my dockerfile just downloaded the binary from drone.io

cblomart commented 8 years ago

ok.... same exact line number...

luxus commented 8 years ago

lemme check something quickly yep my fault :D

luxus commented 8 years ago

if you want i can give a access to my z-way-server. perhaps its easier to debug

cblomart commented 8 years ago

I just need to check where to run docker ;-)

cblomart commented 8 years ago

Please do ;-) just set up a docker cloud account.

2016-05-10 0:18 GMT+02:00 Kai notifications@github.com:

if you want i can give a access to my z-way-server. perhaps its easier to debug

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cblomart/zwaymqtt/issues/3#issuecomment-218006971

luxus commented 8 years ago

i see the messages of the set point now.. how could i change them? just i through post a different value in the same topic would do .. or did you implement them just as read only yet? another question, should temperature have so much numbers after the dot? 23.000000 23.0 would be fine i guess?

cblomart commented 8 years ago

zwaymqtt subscribes to actuators to recieve an propagate updates. I moved/renamed setpoint to actuators. Updates should be possible.

i'll check the question about the value altought i don't know if it is wise to trim it. (general float value)

luxus commented 8 years ago

i hope i understand it right. i just send a message to zway/actuators/analogic/badezimmer_heizung/0/heating/c with the text 24.000000 and zwaymqtt change it to 24 on z-way? because i tried that and has no luck yet :( i tried both heating and energy_save_heating bildschirmfoto 2016-05-10 um 15 18 46

cblomart commented 8 years ago

There was a problem on the subcription to actuators so in fact zwaymqtt didn't see the updates. I tested the correction succesfully with cloudmqtt and a light switch (got no "analog" actuators to test).

luxus commented 8 years ago

i saw the updates.. just pulled the latest version from hub. its not starting anymore no error .. just exiting

cblomart commented 8 years ago

docker export zwaymqtt > /tmp/img.tar cd /tmp tar xf img.tar ./zwaymqtt Segmentation fault

:-(

luxus commented 8 years ago
2016/05/10 20:05:41 MQTT: devices.9.instances.0.commandClasses.67.data.1 <> zway/actuators/analogic/badezimmer_heizung/0/heating/c (float) / Value: 15.
2016/05/10 20:05:41 Error updating value: SyntaxError: Unexpected number
2016/05/10 20:05:41 MQTT: devices.9.instances.0.commandClasses.67.data.11 <> zway/actuators/analogic/badezimmer_heizung/0/energy_save_heating/c (float) / Value: 22.
2016/05/10 20:05:41 Error updating value: SyntaxError: Unexpected number
cblomart commented 8 years ago

so removing upx solved the segfault (i liked to trim down a bit more the image :-( ) i see your error and in my case i use tls/ssl to connect to cloudmqtt and there is no ca in the image.

cblomart commented 8 years ago

"22." not "22" or "22.0"

luxus commented 8 years ago
2016/05/10 21:39:44 MQTT: devices.9.instances.0.commandClasses.67.data.1 <> zway/actuators/analogic/badezimmer_heizung/0/heating/c (float) / Value: 15.000
2016/05/10 21:39:44 Error updating value: SyntaxError: Unexpected number
2016/05/10 21:39:44 MQTT: devices.9.instances.0.commandClasses.67.data.11 <> zway/actuators/analogic/badezimmer_heizung/0/energy_save_heating/c (float) / Value: 22.000
2016/05/10 21:39:44 Error updating value: SyntaxError: Unexpected number
luxus commented 8 years ago

setting these setpoints is more complex then i through :(

cblomart commented 8 years ago

the trick is to undestand the zwave class workings... for the device i have, i first used domoticz (based on openzwave) and then openhab. At that point switching back to zway and seeing the class description... i could make somwhat sense of it.

i suppose that changing the used value didn't help.

do you have any logs from zway directly as it is him who is complaining.

Bugging arround doesn't annoy me: it is an occasion to know things better and to evolve zwaymqtt. I am pretty happy with continous delivery and dockerization.

luxus commented 8 years ago

i start with openhab.. switched to home-assistant and lived without the thermostats then we got open-zwave running in home assistant. but i don't know.. z-way runs better.. + with zway i can use siri 💃 now i try to fill the gap with mqtt sensors and some automation to set the set point in home-assistant

btw perhaps the https://github.com/SphtKr/homebridge-zway implementation can help you to understand

about the logs.. if you tell me which logs i will help :D

luxus commented 8 years ago
2016/05/10 22:28:56 MQTT: devices.8.instances.0.commandClasses.67.data.1 <> zway/actuators/analogic/schlafzimmer_heizung/0/heating/c (int) / Value: 15
2016/05/10 22:28:56 Error updating value: SyntaxError: Unexpected number
2016/05/10 22:28:56 MQTT: devices.8.instances.0.commandClasses.67.data.11 <> zway/actuators/analogic/schlafzimmer_heizung/0/energy_save_heating/c (int) / Value: 11
2016/05/10 22:28:56 Error updating value: SyntaxError: Unexpected number
cblomart commented 8 years ago

do you have the zway logs? on a non dockerized install it is at /var/log/z-way-server.log. appatently for dockerized version the use a mounted volume for logz on tmpfs (at least i read that this morning) the error is thrawn by zway not zwaymqtt (repoted tought) so help from them might be usefull (?forum?).

luxus commented 8 years ago

the logs got saved on a folder on the host .. its still littlebit strange with the data volumes and docker.. but i learned so much in the last days here is my log: https://gist.github.com/luxus/6e6d0e9da65e6da6896b61bde99dc878

cblomart commented 8 years ago

apparently there was a reboot at "2016-05-11 09:57". Did you try to set the thermostat temperature after that (and before getting the log ;-)).

luxus commented 8 years ago

new log file.. restarted and changed some temperatures https://gist.github.com/luxus/b34d3f016e2a4094d2fd765226f41a25

luxus commented 8 years ago

hmm there must be something pretty wrong.. even when i set the value to 23 in the z-way interface i don't get correct value in

2016/05/11 12:40:41 Http Get on Z-Way: http://zway:8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[67].data.1.val.value
2016/05/11 12:40:41 MQTT: devices.11.instances.0.commandClasses.67.data.1 <> zway/actuators/analogic/wohnzimmer_heizung/0/heating/c (int) / Value: 15
2016/05/11 12:40:41 Http Get on Z-Way: http://zway:8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[67].data.1.Set(15)
2016/05/11 12:40:41 Error updating value: SyntaxError: Unexpected number
luxus commented 8 years ago

here is my devices ... but this time from /ZWaveAPI/Run/devices https://gist.github.com/luxus/353bf6d5fe8a78c379b16369b970d170

the last time it was from /ZAutomation/api/v1/devices

don't know if it makes a difference

luxus commented 8 years ago

@cblomart any updates on this?

cblomart commented 8 years ago

not much i fear... i got my hands on a danfoss living connect but i can't test it as it is not compatible with my heating.

I should have the necessary adaptors next week.

cblomart commented 8 years ago

reading TFM zwayDev seems like specific functions needs to be called to set "setpoint". I need to checkup how to implement other function than "Set(value)". Here it would be more like "Set(Mode,Value)"

cblomart commented 8 years ago

I just pushed an attempt to implement extra arguments to set function in the dev branch. cblomart/rpi-zwaymqtt:dev

luxus commented 8 years ago
2016/05/15 07:54:52 Parse Z-Way devices
panic: interface conversion: interface is float64, not int

goroutine 39 [running]:
panic(0x283420, 0x1094bc00)
    /home/travis/.gimme/versions/go/src/runtime/panic.go:500 +0x33c
main.jsonIntValue(0x2aeafc, 0x9, 0x10926040, 0x5, 0x0, 0x0)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:484 +0x9c
main.zwayparsedevices(0x108a68c0)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:750 +0x2804
main.checkzwayupdate(0x107ea000, 0x5cb51, 0x1063bf00)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:834 +0x208
main.main.func2(0x1063bec0, 0x1063bf00)
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:1033 +0x80
created by main.main
    /home/travis/gopath/src/github.com/cblomart/zwaymqtt/zwaymqtt.go:1035 +0xa74

i updated to the latest z-way-server but the normal release version runs normally.

cblomart commented 8 years ago

i updated the sensor type... should be pushed any minutes now