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

Haspmota switch widget causes bad json event changed on touch #18229

Closed
Silverstar opened this issue Mar 20, 2023 Discussed in #18203 · 7 comments · Fixed by #18791
Closed

Haspmota switch widget causes bad json event changed on touch #18229

Silverstar opened this issue Mar 20, 2023 Discussed in #18203 · 7 comments · Fixed by #18791
Assignees

Comments

@Silverstar
Copy link

Discussed in #18203

Lanbon L8, flashed with different tasmota32-lvgl versions, 12.3.1, 12.4.0, 12.4.0.3 dev and self compiled dev (to enable PSRAM and tried to fix this bug myself, no dice).
I created a switch in the pages.jsonl and added val_rule:power1#state to it, so the switch follows if the relay is toggled.

When I touch the switch and it toggles its state, an event changed will be triggered, but in the console (weblog 4) the following error occurs:
BRY: ERROR, bad json: {"hasp":{"p1b1":{"event":"changed","val":,"text":"Relay 1"}}}
"val" is empty.

simple pages.jsonl:

{ "page": 0, "id": 0, "bg_color": "#000000", "text_color": "#FFFFFF" }

{ "page": 1, "id": 0, "bg_color": "#AAAAAA", "text_color": "#000000" }
{ "page": 1, "id": 1, "obj":"switch", "x": 37,  "y": 120, "w": 120, "h": 28, "text":"Relay 1", "val_rule":"POWER1#State", "bg_color":"#1fa3ec"}

I researched for the relevant source and found haspmota.be.
I tried to fix it myself, but no matter what I change (and do gen_haspmota.sh afterwards), there is no change in behavior on the device.

As advised in the discussion, I tried to work with a haspmota.be in the filesystem rather than compiling the whole image.
Creating a new haspmota.be on device with own changes in the file and performing load('haspmota.be') returns true, but no change in behavior.
import haspmota thereafter, no change in behavior.
haspmota.start() thereafter, no change in behavior.
No matter if I delete haspmota.bec or not, no matter what I change in file, it is ignored.

Trying the solidify procedure in the header of the file, error.

import path 
path.remove("haspmota.bec")
import solidify
var haspmota
load('haspmota.be')
BRY: Exception> 'import_error' - module 'solidify' not found
stack traceback:
	<unknown source>: in function `main`

Tried many things for many hours, wanted to fix it myself and push a PR, but now I am at my wits' end.

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Apr 14, 2023
@s-hadinger
Copy link
Collaborator

Bump

@github-actions github-actions bot removed the stale Action - Issue left behind - Used by the BOT to call for attention label Apr 14, 2023
@github-actions
Copy link

github-actions bot commented May 9, 2023

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Action - Issue left behind - Used by the BOT to call for attention label May 9, 2023
@Silverstar
Copy link
Author

Bump

@github-actions github-actions bot removed the stale Action - Issue left behind - Used by the BOT to call for attention label May 10, 2023
@stefanbode
Copy link
Contributor

The main reason is that the be files need a special "solidify" to get active in the firmware. This was solved into the automation just a week ago. Please submit the fixed be file and we will add it to the source. Then with the next version it should work. There is also a manual way to do it depending on the operating system you do the compile. I had this learning in fixing the shutter matter Support in be.

@s-hadinger
Copy link
Collaborator

I will do it. HASPmota solidification is more complex

@s-hadinger
Copy link
Collaborator

Fixed

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

Successfully merging a pull request may close this issue.

3 participants