GithubHelp home page GithubHelp logo

blakadder / nspanel Goto Github PK

View Code? Open in Web Editor NEW
129.0 20.0 34.0 3.03 MB

Sonoff NSPanel protocol and hacking information. Tasmota Berry driver for NSPanel

Home Page: https://blakadder.github.io/nspanel/

License: Creative Commons Zero v1.0 Universal

Python 41.42% Berry 58.58%
tasmota sonoff nspanel

nspanel's Introduction

NSPanel Hacking

Sonoff NSPanel protocol and hacking information and Tasmota Berry driver.

NSPanel protocol manual

Tasmota driver nspanel.be

Installation and configuration for Tasmota

Resources

UI

  • eu-background.xcf - Gimp format XCF file to help you layout your custom UI. Set as the background image in Nextion Editor then use vis <id>,0 to hide it. It shows the section of the screen which is hidden by the bezel in the EU version. The alignment marks take this in to account, so the centre intersection in the image is the centre of the screen on the real device.

To-do List

  • Home Assistant trigger discovery for scene widgets
  • Home Assistant blueprint? for thermostat page

nspanel's People

Contributors

8none1 avatar blakadder avatar hsychla avatar jobr99 avatar jvitkauskas avatar mbo18 avatar michaelheimann avatar r1n4x avatar velijv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nspanel's Issues

Deactivate thermostate widget?

I don't if its possible or not, I didn't find anything.
I want to disable the thermostat widget because its not needed, is there a way?

Thermostat wont show Temperature

I have set up everything and runs quite nice but my thermostat is showing nothing.
I am pretty newbie and dunno what i am doing wrong. THX

NSPAnel

NSpanel psram not working

I have nspanel but psram is not working.
psram available on circuit 16mb
how can i run it via tasmota?
image

[SOLDVED]{"NSPanel":{"error":2}} ... what is it ?

Hi,

NSPanel flashed with tasmota32-nspanel.bin

HA mqtt configured and working,
message well received and command send :
15:46:53.418 MQT: homeassistant/nspanel1/RESULT = {"NSPSend":"Done"}
the command is :
topic -> homeassistant/nspanel1/cmnd/NSPsend
payload : 10
(I've also tryied with payload template ... same error #2)

If I send mqtt through "mqtt explorer", if works ... no error

I guess my HA mqtt message is malformed ... can't see it
:(

SOLVED : the mqtt template payload has to be in quote : '{"temperature":87}'
any suggestion, any ideas ?
(btw : where are defined the errors ?)

Add dimmer only (feature)

Hi ,
first of all great work!

I would like to choose a widget that can only dim without the white value.

is that somehow possible?

greeting
Matten Matten

Timed command to set HMI_dimOpen not working

hi,
please help, I'm struggling with a timer based setting.
I want to send HMI_dimOpen 0 in the morning and 1 in the evening.

I changed nspanel.be as following:

def dimnight()
  nsp.send('{"HMI_dimOpen": 1}')
  print("DimNight called")
end

def dimday()
  nsp.send('{"HMI_dimOpen": 0}')
  print("DimDay called")
end

tasmota.add_rule("Time#Minute=360", dimday)
tasmota.add_rule("Time#Minute=1290", dimnight)

I can see the command being sent in the console, but nothing else happened.
For debugging purposes I chaned it to call DimNight every minute, here is the console:


20:40:00.846 NSP: Sent = {"year":2022,"mon":4,"day":6,"hour":20,"min":40,"week":3}
20:40:00.936 NSP: Sent = {"HMI_dimOpen": 1}
20:40:00.959 DimNight called
20:41:00.859 NSP: Sent = {"year":2022,"mon":4,"day":6,"hour":20,"min":41,"week":3}

But nothing changes, display stays on.

Sending that payload via NSPSend via console, it works.

What's what I am doing wrong?

Freeze at Settings Scrren

Hy all there,
The NSPanel with Tasmota works fine I managed to set Widgets over Mqtt and deal with received Messages. The strange behavior I have is that when I swiped to Settings Screen on the NSPanel it self (swiping from up to down). It is not possible to leave this Screen. I can set All settings which are displayed in the Screen but coming back to Homescreen it's not possible. My solution was to restart Panel over tasmota but I think that's not how the Designer has planed it ;)

Tasmota compilation

Does the tasmota build support temperature sensors like sht3x?
If not, could you please provide a compilation with support for these sensors? I would like to replace the original temperature sensor with the sht30 sensor.

[SOLVED] No WiFi after tasmota flash

Hey there,
flashed my nspanel EU with tasmota32.bin and no WiFi accespoint appears. Before I tried the tasmota32-nspanel.bin file, but the screen left blank/off and also no WiFi available. Both version tasmota 12.0.2.4

Is there a way to get back to basic (factory reset/defaults) ? Any help is appreciated !!

widget feature via mqtt

Hi there,

if a scene is created as a widget, only the ID is displayed in the payload (mqtt).

{"NSPanel":{"id":"6"}}

Is it possible to integrate a status string with the value "scene"?

greetings
Matten Matten

HMI_weather stopped working (?)

Hi !
My panel has worked fine, showing the weather info perfectly well for a few months until around the 12:th of November (no updates or interaction from my part was done those days).
It just started to show 0 for current, min and max temps and always sunny (113).
I've tried to update the weather info manually using the console with, for example like this :

{"HMI_weather":116,"HMI_outdoorTemp":{"current":26,"range":"18,30"}}

No error message comes back so I assume all is ok but the weather info is just showing 0 degrees for current, min and max and a sunny icon.

I updated to Tasmota 12.2.0 (from 12.1.0) but the error in weather is till there.
This is not location-dependant, wttr returns all the data needed and in the correct format too.

Does anyone have a clue why HMI_weather just stopped working and any work-around to fix it ?

Cheers !

Widgets layout dissapear after panel restart

Hello,

I have flashed Tasmota to my NSPanel (EU). I can add/remove widgets using MQTT publish command.

After the restart all my changes diseppear - widgets schema looks as factory setup.

Any hint ?

Portrait Mode?

I have the US version
How can i use portrait mode? (vertical)
Any command?

bad json payload

i have found a weird bug(?) …using the original blakadder’s nspanel.be .When i change the thermostat’s setting for example from 19 to 20 i get at mqtt

{"NSPanel":{"ATCMode":0,"ATCExpect0":20}}

and everything is working ok parsing and transforming reading the number setpoint in openhab
but when i set to 21 and only then i get

{"NSPanel":{"ATCMode":0,"ATCExpect0":21}B}}

This is only happening with “21” value…

Relais schalten nicht zuverlässig auf Tastendruck

Hallo,
wenn das modul keine WLAN Verbindung hat oder das wetter aus irgendeinem Grund nicht abrufen kann, funktioniert das Relais nicht zuverlässig auf den Tasten Druck. Ist das möglich abzuändern? Vielleicht in ein extra Script auslagern und gesondert abzurufen?

Gruß
Matten Matten

Question : Edit UI with Nextion

Do we have any way to change the UI with Nextion Editor ?

I'm looking at a way of showing the temperature of my pool.

Until now I tried :

  • Use the indoor temperature to show the swimming pool one . this one is replaced automatically every min unfortunately
  • Use the Thermostat screen control but this one I never found the command to replace the temperature in the middle - looks to be linked with the indoor temp

Curtain Widget (uuid = 11) doesn't show up

Hello. I use Tasmota 12.0.2.3 flashed from tasmota32-nspanel.bin from Tasmota Web Installer

My nspanel.be file looks like this in var widget definition:

var widget = {
1: ["Rollos", "group", 11],
2: [],
3: ["Index 3", "group", 3],
4: ["Index 4", "group", 4],
5: ["Index 5", "group", 33],
6: ["Index 6", "device", 52],
7: ["Index 7", "device", 69],
8: ["Index 8", "scene"],
}

The problem is that "Rollos" widget does not show up on touchscreen after start. Only Rollos string is visible. Is it supported overall?

Change dateformat shown on screen ?

Hi !
Is there any possibility to change the date format (currently set to the US-standard MM/DD + weekday), preferably definable via a Console command ? (Personally, I am looking to get it to YYYY-MM-DD + the weekday abbreviation.)

Cheers !
/T

Screen Backlight Turns on in Sleep Mode

Issue:
-The screen backlight turns on with a blank screen (so no information / elements / screen is shown) if we change the display_brightness value while the sleep mode is on.

Expected behaviour:

  • In sleep mode I would not expect the screen backligth to turn on. Only if there is a touch on the touchscreen.

Steps to repeat:

  1. Make sure to be in a room with no or limited light for it to be visible.
  2. Turn NSpanel into sleep mode
  3. Wait till screen turns completely off
  4. Change vlaue of display_brightness
  5. Oberserve that screen backlight turns back on, and it is not turning off.

Example:
IMG_6051

Unclear HMI switch behavior

Hello!

I've written a custom Berry script to capture when any of the horizontal switches (index 2) is pressed. The action is a REST API call using the webclient class. What I noticed is that, after a certain delay the switch state is toggled on the display, i.e. it goes back to off after I switched it on.
Actually, all the switches, except index 1, behave like this even if there's no action linked to them.
I checked the console with Weblog 3, but I didn't notice any Tasmota action which would explain this behavior.
I even tried to send a relation command to switch the widget to the expected state after the REST API call finished, but the behavior did not change. Maybe this delay expires after the relation command is issued...
If I just issue the relation command from the Tasmota console, the widget stays as specified in the command and this leads me to believe that there's a special handling in the display firmware when it is pressed.

Could anyone explain this widget behavior with more clarity?
Thanks!

Stock tft file for EU

Hi!
I tried to do some expiriments with NSPanel, and now i have replaced firmwre for Nextion display. I cant find the original stock tft file for EU version of NSpanel in internet. Maybe someone has something similar?

Widget uuid "44 = dimmable light" does not exist

When sending 44 as uuid, the widget does not update. I have tried all numbers from 33 to 55 and none of them show a dimmable light.

{
  "HMI_resources": [
    {
      "index": 8,
      "ctype": "device",
      "id": "8",
      "uiid": 44
    }
  ]
}

Faulty payload of Widget 3 as scene

So I found a weird bug while testing widgets, especially scenes.

If I set the index 3 widget as a scene the MQTT output has an additional brace at the end breaking the parsing.

Console output:

23:28:57.903 NSP: Received Raw = bytes('55AA860A007B226964223A2233227D7DAF00')
23:28:57.915 bytes('7B226964223A2233227D7D')
23:28:57.931 MQT: tele/NSPanel/RESULT = {"NSPanel":{"id":"3"}}}

My quick and dirty workaround so far: R1N4x:widget-3-fix

NSPanel resets after reboot

Hello,

I have flashed Tasmota to my NSPanel (EU) a while ago and by stupidity hooked it up wrongly to the wall so that the fuse blew. Since it didn't fit into my wall socket anyway, I removed it and put it back in the box. I'm now trying to see if it works.

I managed to re-flash tasmota32.bin and tasmota32-nspanel.bin to it. With tasmota32.bin, it wouldn't connect to WiFi at all, so I switched to tasmota32-nspanel.bin. It successfully connects to WiFi, but as soon as it reboots (i.e. when changing the config) it resets. The WiFi-info is gone and the changed config isn't saved as well. I tried using a USB-Powerplug and USB of my PC, same result with both. I definetely set my FT323 to 5V and it should be connected properly as it turns on. When it reboots, the display flashes up 5-6x, then goes dark again.

I'm not sure if I fried anything since it has been working before. The only issue I had before was that the display didn't turn on, but as of now i cannot even change settings. Any ideas?

No touch after NspSend

I just found a strange problem, after sending data to the nsPanel.
I used the console to write something like this:
nspsend {"HMI_resources":[{"index":2,"ctype":"group","id":"1000f190e6","uiid":103}]}
When I'm on the second page, I can see the new generated element and I can use it. But when I swipe to the next screen or the homescreen, there is no more touch possible. I can't change pages or even swipe down to use the dim-tools.
To change the uiid doesn't make a change, I also tried 1, 2 ...
Anybody else with the same issue?

Wrong external temperature reading

Hi, first of all: thanks for your work, this is great I really appreciate it.

I’ve just flashed my first NSPanel and got everything running ok, except for the external temperature reading, I don’t know it may be a faulty sensor? The nspanel is brand new, but it shows 4C when it’s actually around 23C. Couldn’t get around it, the ESP32 cpu sensor I think it’s fine around 53C.

Any suggestions? Thanks!
6930043D-8149-4AD0-A8D3-8356367709BE

Rebooting on switch power off

I've been messing around with an NSPanel on my entryway but only for the use of widgets through mqtt, now I placed another one in the bathroom where I'm using the 2 line outputs: one for the main lights and the other for extractor fan.

Randomly (but very often) when I turn off a switch the device reboots itself. I tried with 11.0.5 and 11.0.03 versions, same behaviour. Very strange it may have something to do with my wiring?

Display not showing correct temperature unit

I recently flashed my NSP panel and am working my way through the system to get it set up. I was able to change the temperature to Fahrenheit using 'SO8 1' and verified that is working in the logs.

08:46:18.993 RSL: SENSOR = {"Time":"2022-08-26T08:46:18","ANALOG":{"Temperature1":82.6},"ESP32":{"Temperature":156.0},"Global":{"Temperature":82.6},"TempUnit":"F"}
08:46:19.017 NSP: Indoor temperature set with {"temperature":82.6,"tempUnit":"F"}

But the screen is still displaying 'C' next to all of the temperatures, I can get it to update by using 'NSPSend {"tempUnit":1}' but it reverts on the next update to the temperature.

Any ideas or help is greatly appreciated.

bug in split_55() ?


  def split_55(b)
    var ret = []
    var s = size(b)   
    var i = s-1   # start from last
    while i > 0
      if b[i] == 0x55 && b[i+1] == 0xAA           
        ret.push(b[i..s-1]) # push last msg to list
        b = b[(0..i-1)]   # write the rest back to b
      end
      i -= 1
    end
    ret.push(b)
    return ret
  end

should be like this i think;

        ret.push(b[(i+2)..s-1]) # push last msg to list

I think it needs that or the split message will still have the split chars in the messsage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.