Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIZWITS_WITTY_CLOUD sensors do not appear #981

Closed
AlbertWeterings opened this issue Jun 23, 2018 · 8 comments
Closed

GIZWITS_WITTY_CLOUD sensors do not appear #981

AlbertWeterings opened this issue Jun 23, 2018 · 8 comments

Comments

@AlbertWeterings
Copy link
Contributor

AlbertWeterings commented Jun 23, 2018

I have a few GIZWITS_WITTY_CLOUD devices build firmware in Arduino IDE.
Switch #0 and the channels appear in the web interface but no sign of the analog sensor and some Dallas sensors I have connected to it. Also the sensor menu item is missing. The values of the sensors are available in the MQTT messages

I'm building V1.13.0 dev

@AlbertWeterings AlbertWeterings changed the title GIZWITS_WITTY_CLOUD sensord do not appear GIZWITS_WITTY_CLOUD sensors do not appear Jun 23, 2018
@AlbertWeterings
Copy link
Contributor Author

Found where the issue is coming from but don't have a solution. This occurs due to "static/index.light.html.gz.h" is used in web.ino if I uncomment "static/index.light.html.gz.h" and use "static/index.sensor.html.gz.h" in the web interface shows the sensors but Lights it then gone.

It seems not possible to have both.

@xoseperez
Copy link
Owner

I see. The thing is that the Witty is a light (so LIGHT_PROVIDER != LIGHT_PROVIDER_NONE). If you add sensors to it if will still use the static/index.light.html.gz.h. The solution is to add a static/index.all.html.gz.h image and load it when this happens. I'd like to create individual images for each device but that would add too much build time at the moment and increase the build complexity. It's something to reconsider in the future.

@AlbertWeterings
Copy link
Contributor Author

Initially it is a RGB light with a analog sensor. Maybe it is a idea to be able to configure it as it is now, and have a option to configure it as a device with sensors and just 3 LEDs with a on off switch.

I use it with a Dallas sensors and according to the readout of the sensor I have the LED light red, green or blue.

@AlbertWeterings
Copy link
Contributor Author

Disabling in hardware.h
// #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
// #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER

Brings up the sensors. I will have to check if it is still possible now to control the RGB LED via MQTT if that works in my application this is a good solution.

@xoseperez
Copy link
Owner

I have the fix, I'm checking if other boards have been affected too..

@xoseperez
Copy link
Owner

@AlbertWeterings Can you test the code in the dev branch?

@AlbertWeterings
Copy link
Contributor Author

Just flashed it in one device and it now shows both light and sensors. In the morning I will flash it in all devices that are using multiple modules.

@AlbertWeterings
Copy link
Contributor Author

Ok during compiling for RFBRIDGE I run into a error.
web:44: error: operator '==' has no left operand
#if ITEAD_SONOFF_RFBRIDGE == 1
exit status 1
operator '==' has no left operand

Changing line 44 to "#if ITEAD_SONOFF_RFBRIDGE" is solving this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants