nuimo-openhab-python
nuimo-openhab-python copied to clipboard
Missing icons
I have created a fairly basic sitemap:
sitemap nuimo label="Nuimo"
{
Slider item=Volume icon="music"
Text label="Light" icon="light" {
Switch item=Light_GF_Living_Wall
Slider item=Light_GF_Living_Wall
}
}
Everything works and I can also navigate between the two features. BUT: My Nuimo does not show me ANYTHING on the dot matrix display. After starting the integration, the last thing after the bluetooth symbol is the tick mark. Once this disappears, the display simply does nothing at all. No feedback on the dial, no navigation icons, nothing.
Any idea what could be the cause of this and what I can do to further analyse it?
First, I would check whether 9x9-led-icons.yml is present in your led_icons folder. If not, you have to check out the submodule, e.g. by running git pull --recurse-submodules && git submodule update --recursive --remote on the root repository. If that does not work out, please set the log level to DEBUG and post the log.
Yes, the file is present and "music" and "light" are both defined in it.
Debug logging does not really show much more than before:
2020-12-30 11:40:44.382 INFO config - <module>: Loaded config file from config.yml
2020-12-30 11:40:47.193 INFO main - controller_discovered: Discovered Nuimo controller: fa:d9:48:ef:04:dd
2020-12-30 11:40:47.195 INFO main - controller_discovered: Found configured Nuimo with MAC address FA:D9:48:EF:04:DD
2020-12-30 11:40:47.216 DEBUG connectionpool - _new_conn: Starting new HTTP connection (1): 192.168.0.4:8080
2020-12-30 11:40:47.231 DEBUG connectionpool - _make_request: http://192.168.0.4:8080 "GET /rest/sitemaps/nuimo HTTP/1.1" 200 None
2020-12-30 11:40:47.235 DEBUG app_builder - compare_sitemap_config: Sitemap configuration does not match. Value of key name differs or key is not available in other sitemap
2020-12-30 11:40:47.236 INFO app_builder - fetch_sitemap: New/changed sitemap fetched: {'name': 'nuimo', 'label': 'Nuimo', 'link': 'http://192.168.0.4:8080/rest/sitemaps/nuimo', 'homepage': {'id': 'nuimo', 'title': 'Nuimo', 'link': 'http://192.168.0.4:8080/rest/sitemaps/nuimo/nuimo', 'leaf': False, 'timeout': False, 'widgets': [{'widgetId': '00', 'type': 'Slider', 'visibility': True, 'label': 'Volume', 'icon': 'music', 'mappings': [], 'switchSupport': False, 'sendFrequency': 0, 'item': {'link': 'http://192.168.0.4:8080/rest/items/Volume', 'state': '94', 'type': 'Dimmer', 'name': 'Volume', 'tags': [], 'groupNames': []}, 'widgets': []}, {'widgetId': '01', 'type': 'Text', 'visibility': True, 'label': 'Light', 'icon': 'light', 'mappings': [], 'linkedPage': {'id': '01', 'title': 'Light', 'icon': 'light', 'link': 'http://192.168.0.4:8080/rest/sitemaps/nuimo/01', 'leaf': True, 'timeout': False, 'widgets': [{'widgetId': '0100', 'type': 'Switch', 'visibility': True, 'label': 'Wandleuchten', 'icon': 'light', 'mappings': [], 'state': 'OFF', 'item': {'link': 'http://192.168.0.4:8080/rest/items/Light_GF_Living_Wall', 'state': '0', 'type': 'Dimmer', 'name': 'Light_GF_Living_Wall', 'label': 'Wandleuchten', 'category': 'light', 'tags': ['Lighting'], 'groupNames': ['GF_Living', 'MLights']}, 'widgets': []}, {'widgetId': '0101', 'type': 'Slider', 'visibility': True, 'label': 'Wandleuchten', 'icon': 'light', 'mappings': [], 'switchSupport': False, 'sendFrequency': 0, 'item': {'link': 'http://192.168.0.4:8080/rest/items/Light_GF_Living_Wall', 'state': '0', 'type': 'Dimmer', 'name': 'Light_GF_Living_Wall', 'label': 'Wandleuchten', 'category': 'light', 'tags': ['Lighting'], 'groupNames': ['GF_Living', 'MLights']}, 'widgets': []}]}, 'widgets': []}]}}
2020-12-30 11:40:47.239 INFO model - __init__: Create app: Volume(parent: None)
2020-12-30 11:40:47.240 INFO model - __init__: Create app: Light(parent: None)
2020-12-30 11:40:47.244 INFO listener - started_connecting: Connecting...
2020-12-30 11:40:56.659 INFO main - initialize_controller: Controller and Listener (re-)initialized!
Or is there any other way to enable more debug messages?
Basically, if there would be a problem resolving the correct icon, we would see an error/exception in the log. I tried your exact sitemap and it works fine for me.
Next step I would try is just setup a minimalistic python script that just outputs something on the LED matrix (the tick does not proof anything here because it comes from the local nuimo firmware and not from the python stuff). Example can be found here https://github.com/getsenic/nuimo-linux-python#connecting-to-a-nuimo-controller-and-receiving-user-input-events
If it does not work with that minimalistic script, then it's nothing wrong with this project, but with your Nuimo. Could you post the firmware version? The version can be found within the BLE attributes of your Nuimo, there are many smartphone apps which are able to show those attributes (it must also work via linux somehow of course, but that's maybe more complicated than just a smartphone app).
I've created this script:
import nuimo
import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
manager = nuimo.ControllerManager(adapter_name='hci0')
controller = nuimo.Controller(mac_address='FA:D9:48:EF:04:DD', manager=manager)
controller.listener = nuimo.ControllerListener() # Use an instance of your own nuimo.ControllerListener subclass
controller.connect()
logging.info("Discovered Nuimo controller: %s", controller.mac_address)
matrix = nuimo.LedMatrix(
"* *"
" * * "
" * * "
" * * "
" * "
" * * "
" * * "
" * * "
"* *"
)
controller.display_matrix(matrix)
manager.run()
Should that do the trick? I don't see anything displayed on the matrix either here...
Firmware version of my Nuimo is 2.0.0. What version is the latest one? How could I do a firmware upgrade? I cannot find any information on the Senic website on this as they seem to have wiped that all already...
Yes, that should do it. So the best guess would be it's because of the old firmware. The newest one is 2.5.0. Unfortunately, there is no official way anymore to update the firmware and I'm also not aware yet of an "unofficial" way. Anyhow, I'll meet the Senic guys in the next weeks also because of an other issue and wanted to discuss whether they could just provide a firmware flasher tool with the latest image (or any other possibility). So you could either wait for that, or contact the Senic support on your own.
Any updates here?