-
Notifications
You must be signed in to change notification settings - Fork 12
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
IncompleteInput and InvalidInput when sending jsonl #136
Comments
Here's a log of my downgraded system for comparison. Note how the file is properly split at jsonl entry boundaries.
|
You mixed up the property and value on your comments. {"---- SCREEN PROTECTION":"comment"} to {"comment": "---- SCREEN PROTECTION"} (This affects all your comments) |
Yes, I got a warning in the logs on that, too. The warning is still there using the downgraded system, but loading the layout works regardless. I'll try 0.7.4 when I'm home... |
The error persists. The jsonl file is still split midway through the individual |
I went over #123 and found the above linked difference. Likely the cause for my issue, if I read the docs for file handles right... |
Any idea on how to fix/revert this? I don't have the HA python knowledge myself... so please post a PR. |
@akloeckner can you provide your complete jsonl file in any way? |
You're right, the validator gives some errors, because
However, openhasp accepts the input without errors. Complete jsonl
|
Try this one: {"comment":"---- PAGINATION OPTIONS"}
{"page":1, "id":0, "prev":3}
{"page":1, "id":0, "swipe":true, "back":1}
{"page":2, "id":0, "swipe":true, "back":2}
{"page":3, "id":0, "swipe":true, "back":3}
{"page":3, "id":0, "next":1}
{"page":9, "id":0, "next":9, "prev":9, "back":9}
{"page":0, "id":9, "obj":"label", "x":0, "y":220, "w":320, "h":30, "text":"\u2022 \u2022", "text_font":24, "align":"center", "text_color":"grey"}
{"comment":"---- HEADER LINE"}
{"page": 0,"id": 10,"x":0,"y":0,"w": 320,"h": 24,"obj": "label","text": "<NAME>","align": "left"}
{"page": 0,"id": 11,"x":0,"y":0,"w": 320,"h": 24,"obj": "label","text": "<TIME>","align": "center"}
{"page": 0,"id": 12,"x":0,"y":0,"w": 320,"h": 24,"obj": "label","text": "<WIFI>","align": "right"}
{"comment":"---- SCREEN PROTECTION"}
{"page":0,"id":99,"obj":"obj","x":0,"y":0,"w":320,"h":240,"radius":0,"hidden":1,"bg_grad_dir":0,"bg_color":"black"}
{"comment":"---- FIRST PAGE BUTTONS"}
{"page":1,"id":11,"obj":"btn","x": 5,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":12,"obj":"btn","x": 5,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":13,"obj":"btn","x": 5,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":21,"obj":"btn","x": 84,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":22,"obj":"btn","x": 84,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":23,"obj":"btn","x": 84,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":31,"obj":"btn","x":163,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":32,"obj":"btn","x":163,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":33,"obj":"btn","x":163,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":41,"obj":"btn","x":242,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":42,"obj":"btn","x":242,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":43,"obj":"btn","x":242,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":1,"id":131,"obj":"dropdown","x":163,"y": 25,"w":73,"h":64,"options":"1LIVE\nWDR2","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"comment":"---- SECOND PAGE BUTTONS"}
{"page":2,"id":11,"obj":"btn","x": 5,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":12,"obj":"btn","x": 5,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":13,"obj":"btn","x": 5,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":21,"obj":"btn","x": 84,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":22,"obj":"btn","x": 84,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":23,"obj":"btn","x": 84,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":31,"obj":"btn","x":163,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":32,"obj":"btn","x":163,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":33,"obj":"btn","x":163,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":41,"obj":"btn","x":242,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":42,"obj":"btn","x":242,"y": 95,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"page":2,"id":43,"obj":"btn","x":242,"y":165,"w":73,"h":64,"toggle":true,"text":"\uE335","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"hidden":true,"swipe":true}
{"comment":"---- THIRD PAGE MEDIA PLAYER"}
{"comment":"------PLAYBACK CONTROL"}
{"page":3,"id":101,"obj":"dropdown","x":5,"y":25,"w":152,"h":64,"text_font":32,"options":"1LIVE\nWDR2","swipe":true}
{"page":3,"id":101,"value_align":5,"value_str":"Wiedergabequelle","h":64}
{"page":3,"id":102,"obj":"btn","x":163,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE40A","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":103,"obj":"btn","x":242,"y": 25,"w":73,"h":64,"toggle":true,"text":"\uE4DB","text_font":32,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":102,"text":"\uE40A\uE3E4"}
{"page":3,"id":103,"text":"\uE4DB","toggle":false}
{"comment":"------GROUP CONTROLS"}
{"page":3,"id":211,"obj":"btn","x":5,"y": 95,"w":152,"h":22,"toggle":true,"text_font":16,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":221,"obj":"btn","x":5,"y":123,"w":152,"h":22,"toggle":true,"text_font":16,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":231,"obj":"btn","x":5,"y":151,"w":152,"h":22,"toggle":true,"text_font":16,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":241,"obj":"btn","x":5,"y":179,"w":152,"h":22,"toggle":true,"text_font":16,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":251,"obj":"btn","x":5,"y":207,"w":152,"h":22,"toggle":true,"text_font":16,"align":"center","value_str":"","value_align":5,"value_ofs_x":0,"swipe":true}
{"page":3,"id":211,"text":"Wohnzimmer","tag":"media_player.wohnzimmer_arylic"}
{"page":3,"id":221,"text":"Küche","tag":"media_player.kuche_wiim_mini"}
{"page":3,"id":231,"text":"Bad oben","tag":"media_player.bad_oben_e3"}
{"page":3,"id":241,"text":"Gästezimmer","tag":"media_player.gastezimmer_arylic"}
{"page":3,"id":251,"text":"Kinderzimmer","tag":"media_player.kinderzimmer_wiim"}
{"comment":"------VOLUME CONTROLS"}
{"page":3,"id":212,"obj":"slider","x":174,"y":101,"w":130,"h":10,"min":0,"max":100}
{"page":3,"id":222,"obj":"slider","x":174,"y":129,"w":130,"h":10,"min":0,"max":100}
{"page":3,"id":232,"obj":"slider","x":174,"y":157,"w":130,"h":10,"min":0,"max":100}
{"page":3,"id":242,"obj":"slider","x":174,"y":185,"w":130,"h":10,"min":0,"max":100}
{"page":3,"id":252,"obj":"slider","x":174,"y":213,"w":130,"h":10,"min":0,"max":100}
{"page":3,"id":212,"tag":"media_player.wohnzimmer_arylic"}
{"page":3,"id":222,"tag":"media_player.kuche_wiim_mini"}
{"page":3,"id":232,"tag":"media_player.bad_oben_e3"}
{"page":3,"id":242,"tag":"media_player.gastezimmer_arylic"}
{"page":3,"id":252,"tag":"media_player.kinderzimmer_wiim"}
{"comment":"---- NINTH PAGE BUTTONS"}
{"page":9,"id":9,"obj":"btnmatrix","x":5,"y":25,"w":310,"h":204,"options":["1","2","3","\uE156","\n","4","5","6","\uE12C","\n","7","8","9","0"],"border_side":0,"pad_top":0,"pad_bottom":0,"pad_left":0,"pad_right":0,"pad_inner":6,"text_font":32}
{"comment":"---- NOTIFICATION OVERLAY"}
{"page":0,"id":200,"obj":"obj","x":0,"y":0,"w":320,"h":240,"radius":0,"opacity":150,"bg_color":"black","hidden":true}
{"page":0,"id":210,"parentid":200,"obj":"obj","x":5,"y":25,"w":310,"h":204,"border_side":15,"opacity":255}
{"page":0,"id":211,"parentid":210,"obj":"label","x":5,"y":5,"w":300,"h":30,"text_font":24,"mode":"dots","text":"Es sind Fenster geöffnet"}
{"page":0,"id":212,"parentid":210,"obj":"label","x":5,"y":40,"w":147,"h":159,"mode":"break","text":"Die folgenden Fenster sind geöffnet: Wohnzimmer, Bad unten, Flur"}
{"page":0,"id":213,"parentid":210,"obj":"btnmatrix","x":158,"y":40,"w":147,"h":26,"border_side":0,"pad_top":0,"pad_bottom":0,"pad_left":0,"pad_right":0,"pad_inner":6,"options":["\uE04D","\uE054","\uE156"]}
{"page":0,"id":214,"parentid":210,"obj":"btn","x":158,"y":72,"w":147,"h":26,"text":"Bestätigen"}
{"page":0,"id":215,"parentid":210,"obj":"btnmatrix","x":158,"y":121,"w":147,"h":78,"border_side":0,"pad_top":0,"pad_bottom":0,"pad_left":0,"pad_right":0,"pad_inner":6,"options":["Aktion1","\n","Aktion2","\n","Aktion3"]} |
Thanks. This format gives less warnings. But the lines are still split midway when transferred to the plate. (Without my fix in #138.) |
there was still a "mixed comment" I updated/edited the post above |
Released 0.7.4 please test |
Version of the custom_component
0.7.3
Configuration
The yaml part of the configuration works. It is only sending a jsonl, which generates an error on the plate. Here's the command that does not work:
Describe the bug
I had a power outage today and now the jsonl is not transmitted to my plate correctly anymore. I did HA restarts a few times lately without any problem. However, it has been quite some time that I repowered the plate. I guess that is why the bug didn't manifest so far: After all, the plate had a working jsonl configuration already.
It appears that the jsonl is somehow strangely split, which causes the plate to reject it. See the debug log for the first two chunks of the file and the corresponding response from the plate's telnet console.
I am aware of changes in handling JSON lately, see #123 and #132. So, I just re-checked out my scripting branch for #112, which does not have these changes. It uploads the jsonl perfectly fine.
=> The error seems to stem from either #123 or #132.
Debug log
The log goes on like that...
The text was updated successfully, but these errors were encountered: