unexpected token < in JSON at position 0

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
The issue occurs in line 126 Column 23005 onwards:
Error: "SyntaxError: Unexpected token < in JSON at position 0"
 

Attachments

  • WLED HTML Issue.txt
    101.5 KB · Views: 5
Last edited:

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
Yep ok, it all adds up - so there are a few things to note here:

FPP can run assist with one of two modes when running split networks. The first being FPP Proxy, and the second being IP Routing.
1. Proxy mode is where FPP has a connection to both your show and home networks, and using a special web server, it can allow you to connect to FPP from the home network, and it then connects on your behalf to the show network, when you click the links in the FPP interface for your controllers. This only works for HTTP, which is why your ping is failing, and the WLED is failing (it's using websockets for real-time communication, which is another protocol, related to, but not the same as HTTP).
Proxy mode requires no configuration on your PC/home router or on your show network devices to operate, as it runs independently within the two networks.

2. IP Routing is where FPP (actually, the underlying linux OS) operates as a router and can move packets between the two networks. This doesn't care about the protocols, but requires more configuration.

DNS configuration is used on FPP as a DNS client - it allows the FPP instance (via your home internet) to be able to convert hostnames back to IP addresses - for example 'github.com' is used for checking for updates, and the default NTP servers for Time synchronisation.

Now, given you are using (1), you will never get WLED to work the way you want to - without manual tweaking of either WLED (to disable the unsupported protocol) or by enabling websockets within FPP proxy.
It sounds like (2) would be a better option for you.

This requires you to:
1. Make sure all your show network devices - controllers, WLEDs, etc all use the FPP IP address as their Default Gateway - this should be the FPP IP on the show network
2. Enable IP routing in FPP - This is under Networking -> And the 4th tab (can't remeber what it's called)
3. Define a static route on either your home network, or your PC, that says to access your show network, to use your FPP Home Network IP as your gateway.

A typical config might be like this picture ( from my Sydney Mini Advanced networking round table)
* Your controllers would have 192.168.77.30 as their default gateway (FPP show network IP).
* The home router would have a route of destination 192.18.77.0/255.255.255.0 using gateway 192.168.0.30 (FPP home network IP)
* Alternatively, if your home network router isn't capable of doing a proper route, you can do it on your PC - for the example network (and windows) the command would be
route add 192.168.77.0 mask 255.255.255.0 192.168.0.30 -p
The -p makes it permanent so it lasts between reboots.

Once this is configured, you don't need to use FPP Proxy. You can then access your show network devices using the IP address directly from your home PC. It also means that your show network devices will have internet access, should they need them.
1654603296248.png
 

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
These are my current settings. I have already enabled Interface Routing.
I believe that I have been aiming at setting up fpp as you mentioned (2). Is there a setting or such that I need to alter to change it from using proxies to using ip?
1654603738131.png
1654603788626.png
1654603825676.png
 

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
Ok, so first off, remove the gateway from the interface that connects to your show network eth0
You don't (shouldnt) have a router on there which connects to the internet. The two gateways will cause issues

You then need to specify FPP as your gateway on your WLED - 192.168.2.2

On your home router or on your PC, you will need to set up a route for 192.168.2.0 / 255.255.255.0 using 192.168.1.85 as the gateway device.
 

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
Ok, I have got that to work on my PC.

By doing this, will it provide an internet connection so that I can get the WLED controller to access ntp servers?
 

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
Cool. So you should be set now. That should give you full networking access between the two networks, and you can put your WLED IP address in directly to the browser, and not have issues with the GUI.
 

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
If I connect my laptop, would it get an internet connection? What should I set as my primary DNS?
 

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
You wont need to connect your laptop to your show network anymore - if you've got it set up as above, anything on your home network can access your show devices.
But if you do connect it, you can use the same DNS server you use on the rest of your home network.
Often your router - 192.18.1.1 - or a public DNS server like:
Google - 8.8.8.8
Cloudflare - 1.1.1.1
Quad9 - 9.9.9.9
 

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
You wont need to connect your laptop to your show network anymore - if you've got it set up as above, anything on your home network can access your show devices.
But if you do connect it, you can use the same DNS server you use on the rest of your home network.
Often your router - 192.18.1.1 - or a public DNS server like:
Google - 8.8.8.8
Cloudflare - 1.1.1.1
Quad9 - 9.9.9.9
Thank you for all of your help! I have been scratching my head for the last few days. One other thing, is it possible to output from Xlights to my show without uploading a sequence to fpp? I.e. using the 'Output to Lights' on Xlights.
 

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
You will need to remove the FPP Proxy configuration from your controllers tab - just specify the IP addresses of your controllers only.
That way xLights doesn't try to involve FPP and your Output to Lights will work fine.
 

corfoto4

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
You will need to remove the FPP Proxy configuration from your controllers tab - just specify the IP addresses of your controllers only.
That way xLights doesn't try to involve FPP and your Output to Lights will work fine.
Thank you very much!
 

Skymaster

Crazy elf
Global moderator
Generous elf
Joined
Dec 19, 2021
Messages
1,042
Location
Western Sydney
You're welcome!

Summary for those watching at home:
  • WLED does not support FPP Proxy mode for accessing the configuration interface (due to it needing websockets)
    • I am going to do further testing on this and see if there's a quick way to get it working without building a custom WLED.
  • However - push from xLights works fine, as it's using simple API calls, and not using the websockets
  • If you want to access WLED using dual networks, you need to set up routing via FPP, which involves a static route on your home router, and show devices using FPP as their default gateway
 
Top