Closed andreas-bulling closed 5 years ago
I am not sure what that error is caused by.
here are the locations it is using
'http://192.168.178.60:9197/dmr', 'http://192.168.178.60:7678/nservice/', 'http://192.168.178.60:7676/rcr/', 'http://192.168.178.60:7677/MainTVServer2/'
do me a favor and manually edit your config file and change the upnp_locations to None. this way it will re-scan. I am curious to see if the values are the same.
also try loading each of the above URL's and see what you come up with.
I just added a print statement to see what the location looks like that is getting passed to requests. so clone the repo again and run it.
Just as a heads-up: The --config-file parameter, when first used, creates a file that is not JSON valid, unfortunately. So the config-file parser gets snippy about the contents of the file. When you modify the file itself according to the example (samsungctl.conf in the samsungctl directory), it'll read it just fine.
I know it creates a non JSON file. it is supposed to. the example samsungctl.conf is strictly for the old style config file. the one where you do not specify anything in the command line except for the command. it would only load from a specific location and it had to have a specific name and it would only load the file if you were running Linux. That whole system is depreciated. if you read the docs you will see that. the new system uses a flat file to make things a whole bunch easier.
I feel it is a wee bit easier to understand (from a newbie standpoint) this kind of a config file
method = websocket
upnp_locations = http://192.168.1.2:5684/location1, http://192.168.1.2:5684/location2, http://192.168.1.2:5684/location3, http://192.168.1.2:5684/location4, 'http://192.168.1.2:5684/location5, http://192.168.1.2:5684/location6
device_id = 1239854
id = 123456789
host = 192.168.1.1
port = 8002
paired = True
token = 123456789:58469
mac = 00:00:00:00:00
timeout = 10
name = samsungctl
description = some_description
vs this kind of a config file
{
"mac": "00:00:00:00:00",
"token": "123456789:58469",
"timeout": 10,
"id": "123456789",
"description": "some_description",
"host": "192.168.1.1",
"method": "websocket",
"upnp_locations": [
"http://192.168.1.2:5684/location1",
"http://192.168.1.2:5684/location2",
"http://192.168.1.2:5684/location3",
"http://192.168.1.2:5684/location4",
"http://192.168.1.2:5684/location5",
"http://192.168.1.2:5684/location6"
],
"port": 8002,
"paired": true,
"device_id": "1239854",
"name": "samsungctl"
}
to much detail in the JSON file for such a small amount of data if so much as one punctuation mark is off it will kick out an error.
way to complex a data structure for what is being stored in the file.
also I do know what the issue is with the UPNP.. I will have it fixed in a few minutes
Agreed, the non-JSON variant is much more 'human readable'. And, from personal experience: Yes it's slightly too easy to forget a comma here and there :)
It should be noted though that the current version of samsungctl (which I'm eternally grateful for) does in fact not parse the easier version of the config file. Which was a great gotcha for me...
On Thu, Jan 31, 2019 at 11:37 AM Kevin Schlosser notifications@github.com wrote:
I know it creates a non JSON file. it is supposed to. the example samsungctl.conf is strictly for the old style config file. the one where you do not specify anything in the command line except for the command. it would only load from a specific location and it had to have a specific name and it would only load the file if you were running Linux. That whole system is depreciated. if you read the docs you will see that. the new system uses a flat file to make things a whole bunch easier.
I feel it is a wee bit easier to understand (from a newbie standpoint) this kind of a config file
method = websocket upnp_locations = http://192.168.1.2:5684/location1, http://192.168.1.2:5684/location2, http://192.168.1.2:5684/location3, http://192.168.1.2:5684/location4, 'http://192.168.1.2:5684/location5, http://192.168.1.2:5684/location6 device_id = 1239854id = 123456789 host = 192.168.1.1 port = 8002 paired = True token = 123456789:58469 mac = 00:00:00:00:00 timeout = 10 name = samsungctl description = some_description
vs this kind of a config file
{ "mac": "00:00:00:00:00", "token": "123456789:58469", "timeout": 10, "id": "123456789", "description": "some_description", "host": "192.168.1.1", "method": "websocket", "upnp_locations": [ "http://192.168.1.2:5684/location1", "http://192.168.1.2:5684/location2", "http://192.168.1.2:5684/location3", "http://192.168.1.2:5684/location4", "http://192.168.1.2:5684/location5", "http://192.168.1.2:5684/location6" ], "port": 8002, "paired": true, "device_id": "1239854", "name": "samsungctl" }
to much detail in the JSON file for such a small amount of data if so much as one punctuation mark is off it will kick out an error.
way to complex a data structure for what is being stored in the file.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kdschlosser/samsungctl/issues/87#issuecomment-459297238, or mute the thread https://github.com/notifications/unsubscribe-auth/AtBdlEHYZ8HwQeCdUn62PZ_LQxCPqDjoks5vIseHgaJpZM4abk5m .
Thanks :) I'll try it tonight!
On Thu, Jan 31, 2019 at 11:38 AM Kevin Schlosser notifications@github.com wrote:
also I do know what the issue is with the UPNP.. I will have it fixed in a few minutes
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kdschlosser/samsungctl/issues/87#issuecomment-459297440, or mute the thread https://github.com/notifications/unsubscribe-auth/AtBdlC1v_y19swLB13VBXMMRDR-qFvKPks5vIsezgaJpZM4abk5m .