StefCoene / velserver

14 stars 6 forks source link

VMBPIRO dark/light status not correct #8

Closed FinalFrag closed 4 years ago

FinalFrag commented 4 years ago

Although the dark output in velbus is "pressed", the velserv/velserver api reports "OFF". Historic data also shows irregular behaviour.

https://imgur.com/a/ve8i36W

I would expect the dark status to be ON the whole time during the night until the light status becomes ON and vice versa (as shown in the velbuslink ui)

StefCoene commented 4 years ago

I also have a VMBPIRO and the value of the CH1 is reporting correctly as far as I can check in my logs.

Can you set this option in etc/velbus.cfg: LOGPERADDRESS = true If you restart logger, you will find a logger_per_address_34.log in the log directory. Can you send me this file for debugging?

I just pushed this change to github so you will have to update your scripts to be able to set this option.

FinalFrag commented 4 years ago

It's not creating the extra log files for me, but I got this:

root@fc8541f210b2:/home/velbus/velserver/log# cat openHAB.log | grep Sensor_34 ... 2020-01-18_00-09-52 Sensor_34_01: OFF 2020-01-18_00-09-52 Sensor_34_02: OFF 2020-01-18_00-09-52 Sensor_34_03: OFF 2020-01-18_00-09-52 Sensor_34_04: OFF 2020-01-18_00-09-52 Sensor_34_05: OFF 2020-01-18_00-09-52 Sensor_34_06: OFF 2020-01-18_00-09-52 Sensor_34_07: ON 2020-01-18_00-09-52 Sensor_34_08: OFF 2020-01-18_00-09-52 LightSensor_34_99: 907 2020-01-18_00-09-59 Sensor_34_01: OFF 2020-01-18_00-09-59 Sensor_34_02: OFF 2020-01-18_00-09-59 Sensor_34_03: OFF 2020-01-18_00-09-59 Sensor_34_04: OFF 2020-01-18_00-09-59 Sensor_34_05: OFF 2020-01-18_00-09-59 Sensor_34_06: OFF 2020-01-18_00-09-59 Sensor_34_07: ON 2020-01-18_00-09-59 Sensor_34_08: OFF 2020-01-18_00-09-59 LightSensor_34_99: 907

In grafana I can confirm that CH6 is ON during the day and CH7 in ON during the night.

Is your module also build 1817? I'm running the beta velbuslink and have updated all modules.

StefCoene commented 4 years ago

I don't know why or what I was smoking when I wrote that code, but it was totally wrong. I just uploaded a version that works for the sensors I have at home.

Stef

FinalFrag commented 4 years ago

Looks good now, thank you for looking into this

docker exec -it velserver tail -f log/logger_per_address_34.log 2020-01-18_16-36-52 2020-01-18_16-36-52 lo 34=2C ED=COMMAND_MODULE_STATUS Ch=34_01: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_02: ChannelType=Sensor, Name=Sensor, Value=ON, openHAB=$Value Ch=34_03: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_04: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_05: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_06: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_07: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_08: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_99: ChannelType=LightSensor, Name=LightSensor, Value=15, openHAB=$Value 2020-01-18_16-36-59 2020-01-18_16-36-59 lo 34=2C E6=COMMAND_SENSOR_TEMPERATURE Ch=34_09: ChannelType=Temperature, Name=Temperature, Value=9.69, openHAB=$Value 2020-01-18_16-37-02 2020-01-18_16-37-02 lo 34=2C ED=COMMAND_MODULE_STATUS Ch=34_01: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_02: ChannelType=Sensor, Name=Sensor, Value=ON, openHAB=$Value Ch=34_03: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_04: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_05: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_06: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_07: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_08: ChannelType=Sensor, Name=Sensor, Value=OFF, openHAB=$Value Ch=34_99: ChannelType=LightSensor, Name=LightSensor, Value=15, openHAB=$Value 2020-01-18_16-37-09 2020-01-18_16-37-09 lo 34=2C E6=COMMAND_SENSOR_TEMPERATURE Ch=34_09: ChannelType=Temperature, Name=Temperature, Value=9.69, openHAB=$Value