Thanks for your help I’ve managed to get this up and running.
I agree this probably needs a separate thread, plus I’d quite like to help evolve the code/script.
I found it worked the tasmota way cmnd/nspanel_xxxxx/CustomSend
The rules needs to come from trigger channel fired.
Page one was the same as Mikes, with a mqtt topic of tele/nspanel_xxxxx/RESULT
The relay ones needed to also be trigger channels, these are new, not the same as the ones Mike had with trigger mqtt topics of stat/nspanel_xxxxx/POWER1 (and 2).
I originally used the old ones I had setup and the script got really upset.
The page doesn’t come of that content loading screen until the screensaver page is sent correctly. For me this was getting the icons right.
The map files need to go into the transform folder.
OpenHAB has a MAP transformation Add on that is needed to be installed.
The weather icons need to link to a Icon-ID (not an icon), this is only visible on the Local Weather and Forecast Channels when Show Advanced is ticked.
I found a small error in the script with some of the icons, at the time I had a lot of errors and warnings coming up, I’m not sure this is 100% necessary to fix.
weatherIcon[1] = "thermometer" // Transformation.transform("MAP", "OpenWeatherIcons.map", "thermometer")
weatherIcon[2] = "weather-pouring" // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-pouring")
weatherIcon[3] = "weather-windy" // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-windy")
weatherIcon[4] = "weather-cloudy" // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-cloudy")
I also managed to get a lot of null errors at one point. I think there’s a chance the updateCount can hit that if test before being initialised. I added the first line below to solve
if (this.updateCount == null) { this.updateCount = 0 }
// Call WeatherUpdate - switch between current & forecast
if (this.updateCount % 2 == 0) {
There’s lots of logger.info commented out in the script, un-commenting and reviewing logs really helped me track down problems. Along with what was being sent, in a program like MQTT Explorer.
Does anyone know of a link to documentation on what message should be sent?
I found the biggest issue I had was icons, either blank or sending text. It needs to be a byte that’s not readable in the string, and not blank.
To program I compiled in the Nextion editor, to get my own tft file. The openhab/static, html folder didn’t work for me. I’ve had issues using this to host for tasmota flashing too. So I installed Apache and used this to host the file.
I found some issues with the events when I had programmed with the standard lovelace tft. Every time a relay button was pressed the cron event then continually appeared as a button trigger, and hence had no more updates. This issue has gone away with the provided hmi, is there any change there?
It was leading me down a route of possibly splitting up the script into multiple ones.
I haven’t got round to the swipeRight/Left part yet.
Going forward with openHAB, does anyone know the best way to do this?
So seeing how they have done it in HomeAssitant was to use yaml files to configure.
openHAB has a lot of yaml configuration files but I’m not sure you can feed one into a script to configure it?
Is this better written as a binding?