Neues Modul VestelTVs für verschiedene TVs (Telefunken, Graetz, Toshiba, Medion)

Begonnen von eki, 04 Januar 2021, 18:56:19

Vorheriges Thema - Nächstes Thema

karpate

ok, ich bekomme im Log jetzt diese Fehlermeldungen. Liegt es daran das ich IO::Socket::INET nicht installiert habe?

2021.02.01 12:01:29 3: FHEMWEB WEB CSRF error: csrf_178160564574627 ne csrf_129642894740473 for client WEB_192.168.X.XXX_55464 / command modify TelefunkenTV BasicVestel 192.168.X.XXX 60. For details see the csrfToken FHEMWEB attribute.
Can't locate object method "new" via package "AnyEvent::WebSocket::Client" (perhaps you forgot to load "AnyEvent::WebSocket::Client"?) at ./FHEM/82_VestelTVs.pm line 666

# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

eki


karpate

Sorry, bin erst heute wieder dazu gekommen...

Zunächst cpan installiert mit
cpan App::cpanminus
anschließend websocket:client installiert mit
cpanm AnyEvent::WebSocket::Client

Nach Reload reload 82_VestelTVs.pm kommt im Log diese Meldung und fhem startet neu:

Can't locate object method "new" via package "AnyEvent::WebSocket::Client" (perhaps you forgot to load "AnyEvent::WebSocket::Client"?) at ./FHEM/82_VestelTVs.pm line 666.


Muss ich den Server neustarten (momentan nicht möglich) oder irgendwie laden?
# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

eki

Grrr. Sorry, ich hatte noch vergessen eine Zeile wieder zu aktivieren. Anbei die korrigierte Version.

karpate

kein Problem, habe die angehängte Version mit allen Ports mit attr "ws_port" durchprobiert und jeweils ein VolumeUp versucht. Leider nirgends eine Reaktion. Das "Positive" ist, ich habe auch keine Fehlermeldungen im Log...

Dann habe ich Verbose=5 eingestellt. Vielleicht kommst du mit den Meldungen weiter....
Gruss

2021.02.08 16:43:58 5: Telefunken: Event received from device global (events are: ATTR Telefunken verbose 5)
2021.02.08 16:44:19 5: Telefunken: Event received from device Telefunken (events are: chlist_loaded: 0)
2021.02.08 16:44:19 4: VestelTVs (Telefunken) - connecting TCP with 192.168.6.18:7382
2021.02.08 16:44:19 5: Telefunken: Event received from device Telefunken (events are: state: on)
2021.02.08 16:44:19 4: VestelTVs (Telefunken) - connecting websocket via AnyEvent::WebSocket::Client=HASH(0x556d97718130) with 192.168.6.18:34016
2021.02.08 16:44:19 5: VestelTVs (Telefunken) - WriteFn called
2021.02.08 16:44:19 5: VestelTVs (Telefunken) - GETVOLUME
2021.02.08 16:44:19 5: VestelTVs (Telefunken) - ReadFn started IO::Socket::INET=GLOB(0x556d978249d8)
2021.02.08 16:44:19 1: PERL WARNING: Wide character in print at fhem.pl line 992.
2021.02.08 16:44:19 4: VestelTVs (Telefunken) - Read from IO::Socket::INET=GLOB(0x556d978249d8) returned &)%)")')()!)V
)� ))), with length 440
2021.02.08 16:44:19 5: Telefunken: Event received from device global (events are: MODIFIED Telefunken)
# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

eki

Tja, das Log zeigt zumindest, dass auf dem TCP socket etwas passiert und dass der TV auch etwas antwortet. Da scheint aber nichts lesbares zu sein sondern nur irgendwelche komischen Zeichen. Ich versuche mal über mögliche Gründe nachzudenken.

Auf dem Websocket scheint erstmal nichts zu passieren, oder entdeckst Du ein Reading mit Namen ,,ws_answer"?


karpate

Zitat von: eki am 08 Februar 2021, 17:35:27
Auf dem Websocket scheint erstmal nichts zu passieren, oder entdeckst Du ein Reading mit Namen ,,ws_answer"?

Sorry, habe ich vergessen zu erwähnen. Es wurde keine neuen Readings angelegt auch nicht "ws_answer"
# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

eki

Irgendwie ist das alles ein bisschen viel geraten.

Hast Du schon mal Wireshark benutzt? Falls ja, könntest Du mal Deinen Netzwerkverkehr aufzeichnen während Du das remote tool aus dem appstore nutzt (das ging ja, hattest Du gesagt), das dann auf die IP des TVs filtern (Quell- und Zieladresse) und das gefilterte Ergebnis aus Wireshark exportieren und mir das dann per PM schicken (natürlich nur, falls Du das willst, private Infos würde ja durch das Filtern entfernt).

karpate

ok, werde ich versuchen zu protokollieren. Werde aber vorraussichtlich erst am Freitag dazu kommen....ich melde mich wieder...Danke für die Geduld und Durchhaltevermögen ;)
# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

karpate

Ich bin erst heute dazu gekommen mit Wireshark zu versuchen den Netzwerkverkehr zu protokollieren. Vermutlich mache ich etwas falsch, da ich im Protokoll keine Einträge mit der IP des TVs entdecken konnte auch wenn ich mit der Telefunken App Programm wechsel, Volume Up/Down, Stumm schalte...
# Pi3 (BBB;FB7390)
# TCM310, CUL V4, HM-CFG-LAN,JeeLink,Tradfri,ESP32-Cam@MQTT: Wasseruhr

eki

Dazu kann ich aus der Ferne nicht so viel sagen. Du musst schauen, dass Du die Traces auf der richtigen Schnittstelle sammelst (also die Schnittstelle, über die auch der TV kommuniziert In dem Fall wahrscheinlich WLAN).

ryonchev

Hallo eki,

Ich habe JVC TV model LT-32V750 (by Vestel). Ich habe das Modul ausprobiert und alles funktioniert.
Ports: tcp (default-1986), http (56791)

... Entschuldigung, aber mein Deutsch nicht so gut ist, so auf English  :-[

I noticed the following:
1. Key codes (0-9) in my case are 1000, 1001.... 1009. Your module sends codes 0000 to 0009. Probably this could be also chosen via attributes.
2. After turning TV off, there is no way to wake it through FHEM. After waking TV from remote control - no problem, everything is ok.
3. It will be good if you can add automatic generation of remote control and corresponding notify in your script. It is hard to work with dropdown menus

Otherwise all is perfect, i.e. Sehr Gut gemacht  ;D

Gruss

eki

Nice to hear that it works with your TV. I will check how to realize the mentioned changes. For the wake up I have to check. Does your TV support WOL (wake on LAN)?

ryonchev

The TV is on WiFi not on LAN. Probably this is the problem. But I also have another TV - Philips, also on WiFi and there is no  problem to wake it from FHEM (module 70_PHTV). Of course this doesn't mean that Vestel have the same function, but there is walk around - I can use remote (smart) wall-plug (I have a lot of them) to power on/off TV so that's actually not so big issue

PS. Remote control - the module 70_PHTV automatically generates remote control and notify when you define your TV. Probably you can use the same code with some modifications of course :)

eki

I have attached a new version which contains 2 changes:

1. Correction of the key values (this was simply a mistake and did not even work on my TV  :-[)
2. The Module now adds 2 layouts to remotecontrol devices. In order to get a remotecontrol you have to do the following:

Reload the Module (reload 82_VestelTVs.pm)
Create a remotecontrol (e.g. defmod myRemote remotecontrol)
Set the layout of the remotecontrol device (set myRemote layout VestelTVs_TV)
Connect the remotecontrol with the TV (set myRemote makenotify myTV) where "myTV" is the name of your TV device.

Could you check if this works for you and provide me feedback.